Skip to content

Commit

Permalink
docs: add an entry for Make commands
Browse files Browse the repository at this point in the history
  • Loading branch information
kir0ul committed Jun 23, 2022
1 parent 2ab0f69 commit 0dd5f74
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -32,3 +32,13 @@ The CI will run several checks on the new code pushed to the PettingZoo reposito
2. install the Git hooks by running `pre-commit install`.

Once those two steps are done, the Git hooks will be run automatically at every new commit. The Git hooks can also be run manually with `pre-commit run --all-files`, and if needed they can be skipped (not recommended) with `git commit --no-verify`. **Note:** you may have to run `pre-commit run --all-files` manually a couple of times to make it pass when you commit, as each formatting tool will first format the code and fail the first time but should pass the second time.

### Testing shortcuts
A few _Make_ commands are provided to quickly test parts of the test suite.

To use it you first need to have _Make_ installed on your local machine:
- Linux: `sudo apt install make` (depends on the distribution/package manager)
- MacOS: `brew install make`, the command should then be available as `gmake` instead of `make` (https://formulae.brew.sh/formula/make)
- Windows: `choco install make` (https://community.chocolatey.org/packages/make)

Then `make help` should give all the available commands and you can use `Tab` when writing the command if it's too long to write. For example to run all the tests, one would write `make test-all`.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -10,7 +10,7 @@ help: ## Show this help
test-all: ## Run ALL tests
pytest -v --cov=pettingzoo --cov-report term

test-all-html: ## Run tests with HTML report, see `index.html` file in `htmlcov` folder
test-all-html: ## Run tests with HTML report, see `index.html` file in the `htmlcov` folder
pytest -v --cov=pettingzoo --cov-report html --cov-report term

test-print: ## Run `print_test.py` tests
Expand Down

0 comments on commit 0dd5f74

Please sign in to comment.