Contribute#
All contributions are welcome in sphinx-tags
! All contributors and
maintainers are expected to follow the PSF Code of Conduct.
If you want to point out existing problems or suggest enhancements to code or documentation, please open an issue on GitHub.
If you want to submit a Pull Request with a patch or new feature, make sure you follow the guide below.
Pull request guidelines#
Set up your development environment
After cloning this repo and activating a virtual environment manager such as venv or conda, use
python -m pip install -e ".[dev,sphinx]"
To build the documentation locally, use
sphinx-build docs docs/_build/html
Hack away!
Style checks
sphinx-tags
uses pre-commit, and code is formatted according to black. To make sure your code conforms to this style, you can:Setup pre-commit for your local clone:
pre-commit install
Run pre-commit:
pre-commit run --all
Re-add any changed files to your staging area and run pre-commit again to make sure any fixes are applied to your code.
Test Coverage
For any new or changed behavior, please add unit test coverage. See notes in conftest.py for details on testing setup.
To run tests, use:
pytest
Commit your changes and send your pull request as usual.
Releases#
sphinx-tags
uses flit to manage releases.
To cut a new release:
Make sure the version string in
src/sphinx_tags/__init__.py
is updated with the release number you want.Run
git tag <version>
, andgit push origin --tags
to update the tags on GitHub.This will trigger a GitHub Action that will build and publish the new release to PyPI. Verify that it completed successfully.
A new GitHub release will be created automatically. Update the release description as needed.