Thank you for considering contributing to sphinx-codeautolink! If you've found a bug or would like to propose a feature, please submit an issue.
If you'd like to get more involved, here's how. There are many valuable contributions in addition to contributing code! If you're so inclined, triaging issues, improving documentation, helping other users and reviewing existing code and PRs is equally appreciated!
The rest of this guide focuses on development and code contributions.
Start by cloning the most recent version, either from the main repository or a fork you created, and installing the source as an editable package. Using a virtual environment of your choice for the installation is recommended.
$ git clone /~https://github.com/felix-hilden/sphinx-codeautolink.git
$ cd sphinx-codeautolink
$ pip install -e .
$ pip install -r requirements/dev
The last command installs all the necessary tools for development as well as all optional dependencies.
If you forked, consider adding the upstream repository as a remote to easily update your main branch with the latest upstream changes. For tips and tricks on contributing, see how to submit a contribution, specifically opening a pull request.
The installation can be verified, and any changes tested by running tox.
$ tox
A number of tools are used to automate development tasks. They are available through tox labels.
$ coverage run && coverage report # execute test suite
$ tox -m docs # build documentation to docs/build/html/index.html
$ tox -m lint # check code style
$ tox -m format # autoformat code
$ tox -m build # packaging dry run
Before releasing, make sure the version number is incremented and the release notes reference the new release.
Note
With sphinx-codeautolink specifically, if Sphinx's environment data structure was modified, increment the environment version number before releasing a new version.
Running tests once more is also good practice. Tox is used to build the appropriate distributions and publish them on PyPI.
$ tox -m publish
If you'd like to test the upload and the resulting package, upload manually to TestPyPI instead.
$ python -m build
$ twine upload --repository testpypi dist/*
$ pip install --index-url https://test.pypi.org/simple/ sphinx-codeautolink