First of all: Thank you for your interest in contributing to MML
! This document provides guidelines and
instructions for contributing to this project. In case you have any questions, do not hesitate to get in touch with
the members of the core development team:
- Fork the repository
- Clone your fork
- Create a virtual environment
- Install ``mml` in editable mode including the development dependencies:
pip install -e ".[dev,docs]"
- Open an issue and discuss the strategy on how to tackle it
- Create a new branch for your feature (
feature/
) or bugfix (fix/
), add the number of the issue (e.g.feature/123
)git checkout -b feature/123
- Make your changes, following our coding standards
- Add tests for any new functionality
- Run the test suite:
pytest
- Update documentation as needed (see
docs
) - Commit your changes:
git add . git commit -m "Description of changes"
We follow these coding standards:
- PEP 8 - Python style guide
- type hints for function arguments and return values
- document functions and classes using
Sphinx
docstrings - maximum line length of 120 characters (set in
pyproject.toml
)
We use the following tools for code quality:
ruff
for code formattingisort
for import sortingpylint
for overall quality
Run the full suite of checks with:
ruff check
ruff format
isort .
pylint src/mml --max-line-length 120
Add positive and negative test cases. Mock dependencies appropriately. The mml.testing
package provides a set of
pytest.fixtures
you can leverage even when writing tests for plugins.
- update the CHANGELOG.md following Keep a Changelog format
- make sure all tests pass and code quality checks succeed
- check documentation, including docstrings of added / changed classes and functions
- submit a pull request with a clear description of the changes, for this your pull request should:
- have a clear, descriptive title
- reference any related issues
- include a summary of changes
- note any backward compatibility breaking changes
By contributing, you agree that your contributions will be licensed under the project's license (MIT). All added or edited code shall be the own original work of the particular contributor. If you use some third-party implementation, all such blocks/functions/modules shall be properly referred and if possible also agreed by code’s author. For example - "This code is inspired from http://...". In case you are adding new dependencies, make sure that they are compatible with the actual license (i.e. dependencies should be at least as permissive as the MIT license).
To ensure correctness and high quality of the submitted code, each contribution will be checked by the CI pipeline and reviewed by a member of the core development team regarding among others the following aspects:
- The code is correct and implements the described feature / fixes the described issue
- The code follows our coding style
- The code is documented appropriately
- The code is covered by sensible unit tests that pass upon submission
- The contribution does not lead to side effects in other parts of the toolkit (e.g. failing tests) Once the reviewer is content with the contribution, the changes will be integrated into the code base.
In the following table we list the people that have contributed to the MML toolkit.
Main author (>99%):
Other contributors: