|
2 | 2 |
|
3 | 3 | We are happy to accept contributions to `mplhep` via Pull Requests to the GitHub repo. To get started fork the repo.
|
4 | 4 |
|
5 |
| -## Pull Requests |
6 |
| - |
7 |
| -### Pull Requests Procedure |
8 |
| - |
9 |
| -If you would like to make a pull request please: |
10 |
| - |
11 |
| -1. Make a fork of the project |
12 |
| -2. Install `pre-commit` and the project's `pre-commit` hooks |
13 |
| -3. Commit your changes to a feature branch of your fork push to your branch |
14 |
| -4. Test your changes with `pytest` |
15 |
| -5. Make a PR |
16 |
| - |
17 | 5 | ## Bug Reports
|
18 | 6 |
|
19 |
| -TBD. |
| 7 | +Please open an issue. |
20 | 8 |
|
21 | 9 | ## Installing the development environment
|
22 | 10 |
|
23 | 11 | ```
|
24 | 12 | python -m pip install --upgrade --editable ".[all]"
|
25 | 13 | ```
|
26 | 14 |
|
27 |
| -<!-- To make the PR process much smoother we also strongly recommend that you setup the Git pre-commit hook for [Black](https://github.com/psf/black) by running |
| 15 | +Also conveniently accessible as `bash install.sh`. |
28 | 16 |
|
29 |
| -``` |
30 |
| -pre-commit install |
31 |
| -``` |
| 17 | +## Pull Requests |
32 | 18 |
|
33 |
| -This will run `black` over your code each time you attempt to make a commit and warn you if there is an error, canceling the commit. --> |
| 19 | +### Pull Requests Procedure |
34 | 20 |
|
35 |
| -## Running the tests |
| 21 | +If you would like to make a pull request please: |
| 22 | + |
| 23 | +1. Make a fork of the project |
| 24 | +2. Clone your fork locally |
| 25 | +3. Install `pre-commit` and the project's `pre-commit` hooks |
| 26 | +4. Test your changes with `pytest` |
| 27 | +5. Commit your changes to a feature branch of your fork, push to your branch |
| 28 | +6. Make a PR |
| 29 | + |
| 30 | +### Running the tests |
36 | 31 |
|
37 | 32 | You can run the unit tests (which should be fast!) via the following command.
|
38 | 33 |
|
39 | 34 | ```bash
|
40 | 35 | pytest --mpl --ignore=tests/test_notebooks.py
|
41 | 36 | ```
|
42 | 37 |
|
43 |
| -Note: This ignores the notebook tests (which are run via [papermill](https://github.com/nteract/papermill) which run somewhat slow. |
| 38 | +Note: This ignores the notebook tests (which are run via [papermill](https://github.com/nteract/papermill) and run somewhat slow. |
44 | 39 | Make sure to run the complete suite before submitting a PR
|
45 | 40 |
|
46 | 41 | ```bash
|
47 | 42 | pytest --mpl
|
48 | 43 | ```
|
49 | 44 |
|
50 |
| -## Making a pull request |
| 45 | +### Making a pull request |
51 | 46 |
|
52 |
| -We try to follow [Conventional Commit](https://www.conventionalcommits.org/) 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. |
| 47 | +We follow [Conventional Commit](https://www.conventionalcommits.org/) 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. |
53 | 48 |
|
54 |
| -## Generating Reference Visuals |
| 49 | +### Generating Reference Visuals |
55 | 50 |
|
56 |
| -If you modified expected outcomes of the test. New baseline visuals can be generated using this command: |
| 51 | +If you modified expected outcomes of the tests. New baseline visuals can be generated using this command: |
57 | 52 |
|
58 | 53 | ```bash
|
59 | 54 | pytest --mpl-generate-path=tests/baseline
|
60 | 55 | ```
|
| 56 | + |
| 57 | +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 identially but not the same bit-wise. |
0 commit comments