Thank you for your interest in contributing to tyff! This document provides guidelines and instructions for contributing.
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/tyff.git cd tyff -
Install the development dependencies:
Using conda/mamba (recommended):
mamba env create -f devtools/conda-envs/dev.yaml mamba activate tyff-dev pip install -e . -
(Optional but recommended) Install pre-commit hooks:
pip install pre-commit pre-commit install
This will automatically run code formatting and checks before each commit.
-
Create a new branch for your feature or bugfix:
git checkout -b feature-name
-
Make your changes and ensure:
- Code follows the project's style guidelines
- All tests pass
- New features include tests
- Documentation is updated if needed
-
Run tests:
pytest
-
Check code style (easiest to use pre-commit hooks):
pre-commit run --all-files
-
Commit your changes:
git add . git commit -m "Brief description of changes"
-
Push to your fork:
git push origin feature-name
-
Submit a pull request through GitHub
This project uses:
- ruff for code formatting and linting
- Type hints are encouraged but not required
- Write tests for new features
- Ensure all tests pass before submitting PR
- Aim for high test coverage
- Use pytest fixtures for common test setup
- Update documentation for new features
- Use NumPy-style docstrings
- Build documentation locally to verify:
cd docs make html
- Keep PRs focused on a single feature or fix
- Include a clear description of the changes
- Reference any related issues
- Ensure CI passes before requesting review
- Be responsive to feedback
Feel free to open an issue for questions or discussion!