Skip to content

Commit

Permalink
docs: improve contrib
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejnovak committed Oct 4, 2023
1 parent 85d32a3 commit 2c40a5f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
45 changes: 21 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,56 @@

We are happy to accept contributions to `mplhep` via Pull Requests to the GitHub repo. To get started fork the repo.

## Pull Requests

### Pull Requests Procedure

If you would like to make a pull request please:

1. Make a fork of the project
2. Install `pre-commit` and the project's `pre-commit` hooks
3. Commit your changes to a feature branch of your fork push to your branch
4. Test your changes with `pytest`
5. Make a PR

## Bug Reports

TBD.
Please open an issue.

## Installing the development environment

```
python -m pip install --upgrade --editable ".[all]"
```

<!-- 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
Also conveniently accessible as `bash install.sh`.

```
pre-commit install
```
## Pull Requests

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. -->
### Pull Requests Procedure

## Running the tests
If you would like to make a pull request please:

1. Make a fork of the project
2. Clone your fork locally
3. Install `pre-commit` and the project's `pre-commit` hooks
4. Test your changes with `pytest`
5. Commit your changes to a feature branch of your fork, push to your branch
6. Make a PR

### Running the tests

You can run the unit tests (which should be fast!) via the following command.

```bash
pytest --mpl --ignore=tests/test_notebooks.py
```

Note: This ignores the notebook tests (which are run via [papermill](https://github.com/nteract/papermill) which run somewhat slow.
Note: This ignores the notebook tests (which are run via [papermill](https://github.com/nteract/papermill) and run somewhat slow.
Make sure to run the complete suite before submitting a PR

```bash
pytest --mpl
```

## Making a pull request
### Making a pull request

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.
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.

## Generating Reference Visuals
### Generating Reference Visuals

If you modified expected outcomes of the test. New baseline visuals can be generated using this command:
If you modified expected outcomes of the tests. New baseline visuals can be generated using this command:

```bash
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 identially but not the same bit-wise.
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python -m pip install --upgrade --editable ".[all]"

0 comments on commit 2c40a5f

Please sign in to comment.