Skip to content

Latest commit

 

History

History
68 lines (45 loc) · 1.48 KB

File metadata and controls

68 lines (45 loc) · 1.48 KB

Contributing

If you would like to contribute, below you can find some helpful suggestions and instructions.

Preparing the development environment

To install packages required for running tests and linting, run the following command:

pip install pip-tools
pip-compile --all-extras -o requirements-dev.txt pyproject.toml
pip install -r requirements-dev.txt

Running tests

If you wish to run the majority of the tests whilst skipping the slow integration tests on large third-party rulesets, use the following command:

pytest

To run the slower integration tests at the end of your development cycle, use the following command instead:

pytest -m "slow" -k "not train"

Linting

To automatically fix some linting issues and check for remaining issues, run the following commands:

black .
ruff check . --fix
pyright

Markdownlint

If you made changes to .md file and want to lint them locally, you have to install markdownlint using npm.

npm install -g markdownlint-cli2

Now you can lint markdown files using to automatically detect all issues and fix some:

markdownlint-cli2 --fix "**/*.md"

Docs

To automatically generate the documentation from the code, run the following commands:

./docs/make.bat clean
./docs/make.bat html

To locally view the docs, run the following command:

python -m http.server -b localhost -d docs/_build/html 8000

and inspect the docs at localhost:8000