This CONTRIBUTING
guideline was thankfully taken over from the BayBE code base.
All contributions to MindlessGen are welcome!
... no matter if bug fixes, new features, or just typo corrections.
To shorten the overall development and review process, this page contains are a few sections that can make your life easier.
To implement your contributions in a local development environment, we recommend the following workflow:
-
Clone a fork of the repository to your local machine.
-
Create and activate a virtual python environment using one of the supported python versions.
-
Change into the root folder of the cloned repository and install an editable version including all development dependencies:
pip install -e '.[dev]'
-
Run our tests to verify everything works as expected:
pytest -vv --optional
-
Install our pre-commit hooks:
pre-commit install
-
Create a new branch for your contribution:
git checkout -b <your_branch_name>
-
Implement your changes.
-
Optional but recommended to prevent complaints from our CI pipeline: Test your code.
There are several test environments you can run via
tox
, each corresponding to a developer tool in a certain Python version. You can retrieve all available environments viatox list
.If you want to challenge your machine, you can run all checks in all Python versions in parallel via:
tox -p
This can be considered the ultimate one-stop check to make sure your code is ready for merge.
-
Before setting up a pull request for your contribution, include all of the changes in the
CHANGELOG.md
file. -
Push the updated branch back to your fork:
git push -u origin <your_branch_name>
-
Open a pull request via Github's web page.
In order to maintain a high code quality, we use a variety of code developer tools. When following the above described workflow, pre-commit will automatically trigger some of these checks during your development process. In any case, these checks are also conducted in our CI pipeline, which must pass before your pull request is considered ready for review. If you have questions or problems, simply ask for advice.
Tool | Purpose |
---|---|
ruff | code linting and formatting |
mypy | static type checking |
pytest | testing |
tox | orchestrating all the above |
coverage | coverage check and reports |