Thank you for considering contributing to Bedtime Story Generator! We welcome contributions of all kinds, from bug fixes and documentation to new features and ideas.
This project adheres to the Code of Conduct. By participating, you are expected to maintain a welcoming and respectful environment for everyone.
If you find a bug, please create an issue with the following details:
- A clear and descriptive title.
- Steps to reproduce the issue.
- Expected and actual results.
- Relevant logs or error messages.
If you have a feature idea, create an issue titled "Feature Request:" followed by a short description. Include:
- The problem the feature solves.
- A potential implementation or example of how it could work.
If you're ready to write code, follow these steps:
- Fork the project to your GitHub account.
- Clone your fork locally:
git clone https://github.com/your-username/bedtime-story-generator.git cd bedtime-story-generator
Create a feature or bugfix branch:
git checkout -b your-branch-name
- Write clean, well-documented code.
- Follow the existing code style.
- Test your changes locally.
Write clear commit messages:
git commit -m "Add [description of your changes]"
Push your branch to your fork:
git push origin your-branch-name
- Navigate to the original repository.
- Click "New Pull Request".
- Provide a clear description of your changes.
- Clone the repository:
git clone https://github.com/your-username/bedtime-story-generator.git cd bedtime-story-generator
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables in a
.env
file:OPENAI_API_KEY=your_openai_api_key MONGO_URI=your_mongodb_connection_string
- Run the server:
uvicorn main:app --reload
- Follow PEP 8 for Python code style.
- Use type annotations where appropriate.
- Write modular, reusable code.
- Add or update docstrings for all new functions or classes.
- If your feature impacts usage, update the relevant documentation files.
- Add tests for new features or bug fixes.
- Use existing test files as references.
- Install testing dependencies:
pip install -r requirements-dev.txt
- Run tests using pytest:
pytest
- Ensure all new code has tests.
- Run all tests locally and ensure they pass.
- Address any review feedback.
- Once approved, your pull request will be merged by a maintainer.
Thank you for your contributions!