Contributing¶
This page provides a guide for developers wishing to contribute to Sphinx-CodeLinks
.
Bugs, Features and PRs¶
For bug reports and well-described technical feature request, please use our issue tracker: https://github.com/useblocks/sphinx-codelinks/issues
If you have already created a PR, you can send it in. Our CI workflow will check (test and code styles) and a maintainer will perform a review, before we can merge it. Your PR should conform with the following rules:
A meaningful description or link, which describes the change
The changed code (for sure :) )
Test cases for the change (important!)
Updated documentation, if behavior gets changed or new options/directives are introduced.
Update of docs/changelog.rst.
Install Dependencies¶
CodeLinks
uses rye to manage the repository.
For the development, use the following command to install python dependencies into the virtual environment.
rye sync
Formatting, Linting and Typing¶
To run the formatting and linting, pre-commit is used:
pre-commit install # to auto-run on every commit
pre-commit run --all-files # to run manually
The CI also checks typing, use the following command locally to see if your code is well-typed
rye run mypy:all
Build docs¶
To build the documentation stored in docs
, run:
rye run docs
Test Cases¶
To run test cases locally:
rye test -a
Note some tests use syrupy to perform snapshot testing. These snapshots can be updated by running:
pytest tests/ --snapshot-update