Run and Build¶
This project uses invoke as its task runner.
Since invoke
will be running inside of a poetry
environment, we recommend adding the following alias to your .bashrc
/ .zshrc
to save you some keystrokes:
alias pri='poetry run invoke'
Linting & Formatting¶
To run linter:
pri lint # with alias
poetry run invoke lint # without alias
To run formatter:
pri format # with alias
poetry run invoke format # without alias
Run the formatter with the --fix
flag to autofix formatting:
pri format --fix # with alias
poetry run invoke format --fix # without alias
Typechecks¶
To run typechecks:
pri typecheck # with alias
poetry run invoke typecheck # without alias
Tests¶
To run all tests:
pri test # with alias
poetry run invoke test # without alias
To run specific tests, see these pytest docs and run pytest
explicitly:
poetry run pytest tests/unit/test_attribute.py
Docs¶
To build the docs:
pri docs # with alias
poetry run invoke docs # without alias
After docs are build, view them by:
open -a 'firefox' docs/_build/index.html # open in Firefox
open -a 'Google Chrome' docs/_build/index.html # open in Chrome