HADDOCK3 welcomes contributions to improve its functionality, documentation, and code quality. This guide provides the essential information for contributing effectively.
- Install HADDOCK3 following INSTALL.md
- Python 3.10+ development environment
- Familiarity with Git and GitHub workflows
- Fork the repository and create a feature branch
- Implement changes following coding standards
- Test thoroughly using pytest framework
- Update documentation as needed
- Submit Pull Request for review
src/haddock/
├── clis/ # Command-line interfaces
├── libs/ # General utility functions
├── gear/ # Plugin-like functionality modules
├── core/ # Physical constants and definitions
└── modules/ # HADDOCK3 simulation modules
- Python Version: Minimum 3.10 compatibility
- Function Design: Small, testable functions preferred over complex classes
- Naming: Use descriptive variable names
- Comments: Explain why not how
- Reuse: Existing code being functional doesn't mean it's the best implementation. If you ctrl-c ctrl-v code from elsewhere in the codebase evaluate it on its own merits and improve it if you can.
- Documentation: Update docstrings and markdown files
- Formatting: Code is formatted with ruff
(
ruff format); CI checks formatting of changed files on every pull request
- Unit Tests: Located in
tests/directory - Integration Tests: Located in
integration_tests/directory - End-to-End: Located in
end-to-end_tests/directory - Coverage: Aim for 100% test coverage for new code
- Framework: pytest
HADDOCK3 maintains minimal dependencies:
- Prefer Python standard library
- NumPy allowed for numerical operations
- Avoid adding new dependencies without discussion
- Consider runtime dependencies for optional functionality
- Update docstrings for any function, class, or module you add or change.
- Update the relevant pages under
docs/pages/for user-facing changes. - New modules need a title to be added manually in
docs/titles.yaml. - Confirm
docs/still builds without introducing new warnings before submitting.
See docs/README.md for how to build the docs locally and how docstrings should be formatted.
- Testing: All tests must pass
- Documentation: Updated for new features
- CHANGELOG: Add entry for significant changes
- Version: Update
pyproject.tomlif applicable - Code Review: Address all feedback
See AI-POLICY.md for guidance on how AI coding assistants may and may not be used when contributing.
For questions or discussions:
- Issues: Report bugs or suggest features via GitHub Issues
- Discussions: Use GitHub Discussions for general questions
- Development: Contact maintainers for major changes