Use Tox to run tests and linting, e.g.
pip install tox
tox list # list all Tox environments
tox run -e ruff # run code style checks
tox run -e py # run tests with your default Python
tox run -e package # verify packaging
tox # run all Tox environments
Make sure all tests pass before you push your changes to GitHub. GH Actions will run the tests across all supported Python versions.
You can use additional arguments for the tools called by Tox by
separating them from the Tox arguments by a double-dash --
, e.g.
tox run -e ruff -- autograd/core.py --show-source
tox run -e ruff -- autograd/core.py --fix
tox run -e package -- upload
tox run -e py -- --help