Contributing to OpenMAS¶
We welcome contributions to OpenMAS! Whether you're fixing a bug, improving documentation, or proposing a new feature, your help is appreciated.
Please follow standard GitHub practices:
- Fork the repository.
- Create a new branch for your changes (
git checkout -b feature/my-new-feature
orbugfix/issue-number
). - Make your changes. Ensure you follow the project's coding style and conventions.
- Add tests for any new features or bug fixes.
- Ensure all tests pass by running
poetry run tox
. - Update documentation if necessary.
- Submit a Pull Request against the
main
branch.
Development Setup¶
Please refer to the main README for instructions on setting up your development environment using Poetry and pre-commit hooks.
For more detailed information about our development workflow, tools, and best practices, see the Development Workflow guide.
Code Style and Quality¶
We use black
for formatting, isort
for import sorting, flake8
for linting, and mypy
for type checking. These are enforced via pre-commit hooks.
Run quality checks using poetry run tox -e lint
.
Alternatively, you can use the convenience script to run all quality checks at once:
See the Development Workflow guide for more details.
Docstrings¶
Clear and consistent docstrings are important. Please adhere to the guidelines outlined in our Docstring Policy.
Testing¶
All contributions must include relevant tests. Please follow the testing strategy outlined in the Testing README.
Run tests using tox environments:
# Run unit tests
poetry run tox -e unit
# Run integration tests with mocks (no real dependencies needed)
poetry run tox -e integration-mock
# Run all tests with coverage report
poetry run tox -e coverage
For more testing commands and environments, see the Development Workflow guide.