If you would like to contribute, below you can find some helpful suggestions and instructions.
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.txtIf you wish to run the majority of the tests whilst skipping the slow integration tests on large third-party rulesets, use the following command:
pytestTo run the slower integration tests at the end of your development cycle, use the following command instead:
pytest -m "slow" -k "not train"To automatically fix some linting issues and check for remaining issues, run the following commands:
black .
ruff check . --fix
pyrightIf you made changes to .md file and want to lint them locally, you have to install markdownlint using npm.
npm install -g markdownlint-cli2Now you can lint markdown files using to automatically detect all issues and fix some:
markdownlint-cli2 --fix "**/*.md"To automatically generate the documentation from the code, run the following commands:
./docs/make.bat clean
./docs/make.bat htmlTo locally view the docs, run the following command:
python -m http.server -b localhost -d docs/_build/html 8000and inspect the docs at localhost:8000