Thank you for your interest in contributing to FoodScanAI! We aim to make food scanning and analysis more accessible through artificial intelligence. This document provides guidelines for contributing to the project.
By participating in this project, you agree to abide by our Code of Conduct. Please read it before contributing. We expect all contributors to:
- Be respectful and inclusive
- Accept constructive criticism gracefully
- Focus on what is best for the community
- Show empathy towards other community members
Before creating bug reports, please check the issue list to avoid duplicates. When creating a bug report, include as many details as possible:
- A clear and descriptive title
- Exact steps to reproduce the issue
- Expected behavior vs actual behavior
- Screenshots if applicable
- Your environment details (OS, Python version, dependencies)
- Any relevant logs or error messages
Enhancement suggestions are welcome! When proposing an enhancement:
- Use a clear and descriptive title
- Provide a detailed description of the proposed functionality
- Explain why this enhancement would be useful
- Include code examples if possible
- Consider both the impact and implementation complexity
- Fork the repository and create your branch from
main
- If you've added code that should be tested, add tests
- Ensure all tests pass
- Update the documentation accordingly
- Follow the coding style and conventions
- Issue the pull request!
- Clone the repository:
git clone https://github.com/nikhileshmeher0204/FoodScanAI.git
cd FoodScanAI
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Follow PEP 8 guidelines
- Use meaningful variable and function names
- Add docstrings to all functions and classes
- Keep functions focused and single-purpose
- Comment complex logic
- Use type hints where appropriate
- Use clear and meaningful commit messages
- Start with a verb in imperative mood
- Keep the first line under 50 characters
- Add detailed description if needed
Example:
Add image preprocessing pipeline
- Implement resize functionality
- Add color normalization
- Include basic filtering options
- Write unit tests for new functionality
- Ensure existing tests pass
- Test edge cases
- Include integration tests where necessary
- Aim for good test coverage
- Update README.md if you change functionality
- Document new features
- Update API documentation
- Include docstrings for new functions/classes
- Add comments for complex logic
- Update requirements.txt if adding dependencies
- A maintainer will review your PR
- Changes may be requested
- Once approved, your PR will be merged
- Your contribution will be acknowledged
Feel free to open an issue for any questions not covered here. We're happy to help!
By contributing to FoodScanAI, you agree that your contributions will be licensed under the same license as the project.