Contributing¶
Thank you for your interest in contributing to MACE Inference!
Ways to Contribute¶
- 🐛 Report bugs
- 💡 Suggest features
- 📝 Improve documentation
- 🔧 Submit pull requests
Development Setup¶
-
Fork and clone the repository
-
Create a virtual environment
-
Install in development mode
-
Run tests to verify setup
Code Style¶
We use the following tools:
- Ruff for linting
- Black for formatting (optional)
- mypy for type checking
Run linting:
Run type checking:
Testing¶
Run the test suite:
# All tests
pytest tests/ -v
# Specific test file
pytest tests/test_core.py -v
# With coverage
pytest tests/ --cov=mace_inference --cov-report=html
Pull Request Process¶
-
Create a feature branch
-
Make your changes
- Write clear, documented code
- Add tests for new features
- Update documentation if needed
-
Run tests and linting
-
Commit with clear messages
-
Push and create PR
Then create a Pull Request on GitHub.
Commit Message Guidelines¶
Use clear, descriptive commit messages:
Add feature: bulk modulus calculationFix: handle empty atoms object in single_pointDocs: update installation guide for WindowsTest: add tests for D3 correctionRefactor: simplify device detection logic
Adding New Features¶
When adding a new calculation type:
- Add the task function in
src/mace_inference/tasks/ - Add the method to
MACEInferenceincore.py - Add tests in
tests/ - Add documentation in
docs/ - Add an example in
examples/
Documentation¶
Documentation is built with MkDocs. To preview locally:
Then open http://localhost:8000
Reporting Issues¶
When reporting bugs, please include:
- Python version and OS
- MACE Inference version
- Minimal code to reproduce
- Full error traceback
- What you expected vs. what happened
Code of Conduct¶
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
License¶
By contributing, you agree that your contributions will be licensed under the MIT License.
Questions?¶
Open an issue on GitHub or start a discussion!