We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
- Fork the repo and create your branch from
main. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints.
- Issue that pull request!
# Clone your fork
git clone https://github.com/yourusername/machine-learning-model.git
cd "Machine Learning Model"
# Create virtual environment (if not exists)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
make install-dev
# Install pre-commit hooks
pre-commit install
# Run tests
make test
# Check code quality
make checkWe use several tools to maintain code quality:
- Black for code formatting
- isort for import sorting
- flake8 for linting
- mypy for type checking
- pytest for testing
- ruff for fast linting
Run all checks with:
make check- Document all model architectures and hyperparameters
- Include data preprocessing steps
- Add model performance metrics in docstrings
- Use type hints for tensor shapes where applicable
- All scripts should have proper argument parsing
- Include help text and examples
- Test scripts with edge cases
- Document script dependencies
We follow the Conventional Commits specification:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Types:
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the coderefactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testschore: Changes to the build process or auxiliary tools
Examples:
feat(model): add transformer architecture
fix(scripts): resolve project creation path issue
docs(readme): update installation instructions
- Write tests for new features
- Ensure all tests pass
- Aim for high test coverage
- Include both unit and integration tests
- Test ML models with sample data
- Mock external dependencies
- Update docstrings for new functions/classes
- Update README.md if needed
- Add examples for new features
- Document model architectures
- Include performance benchmarks
Since this project uses virtual environments:
- Always activate the virtual environment before working
- Use
pip install -e .for development installs - Update requirements files when adding dependencies
- Test in clean environments before submitting
By contributing, you agree that your contributions will be licensed under the same license as the project.