We are happy to accept contributions to mplhep
via Pull Requests to the GitHub
repo. To get started fork the repo.
Please open an issue.
python -m pip install --upgrade --editable ".[all]"
Also conveniently accessible as bash install.sh
.
If you would like to make a pull request please:
- Make a fork of the project
- Clone your fork locally
- Install
pre-commit
and the project'spre-commit
hooks - Test your changes with
pytest
- Commit your changes to a feature branch of your fork, push to your branch
- Make a PR
You can run the unit tests (which should be fast!) via the following command.
pytest --mpl --ignore=tests/test_notebooks.py
Note: This ignores the notebook tests (which are run via papermill and run somewhat slow. Make sure to run the complete suite before submitting a PR
pytest --mpl
We follow Conventional Commit for commit messages and PR titles. Since we merge PR's using squash commits, it's fine if the final commit messages (proposed in the PR body) follow this convention.
If you modified expected outcomes of the tests. New baseline visuals can be generated using this command:
pytest --mpl-generate-path=tests/baseline
Only include the actually modified baseline images in your PR! Running git add -a
and the like will sometimes result in including images which are visually
identically but not the same bit-wise.