Skip to content

Latest commit

 

History

History
86 lines (63 loc) · 3.54 KB

CONTRIBUTING.md

File metadata and controls

86 lines (63 loc) · 3.54 KB

This CONTRIBUTING guideline was thankfully taken over from the BayBE code base.

Contributing to MindlessGen

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.

General Workflow

To implement your contributions in a local development environment, we recommend the following workflow:

  1. Clone a fork of the repository to your local machine.

  2. Create and activate a virtual python environment using one of the supported python versions.

  3. Change into the root folder of the cloned repository and install an editable version including all development dependencies:

    pip install -e '.[dev]'
  4. Run our tests to verify everything works as expected:

    pytest -vv --optional
  5. Install our pre-commit hooks:

    pre-commit install
  6. Create a new branch for your contribution:

    git checkout -b <your_branch_name>
  7. Implement your changes.

  8. 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 via tox 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.

  9. Before setting up a pull request for your contribution, include all of the changes in the CHANGELOG.md file.

  10. Push the updated branch back to your fork:

    git push -u origin <your_branch_name>
  11. Open a pull request via Github's web page.

Developer Tools

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