A collection of useful resources to reference when developing new features:
This package utilizes flit as the build engine, and tox for test automation.
To install these development dependencies:
pipx install tox
To run the tests:
tox
and with test coverage:
tox -e py38-cov
The easiest way to write tests, is to edit tests/fixtures.md
To run the code formatting and style checks:
tox -e py312-pre-commit
or directly
pip install pre-commit
pre-commit run --all
To run the pre-commit hook test:
tox -e py38-hook
See configuration in pyproject.toml
for [tool.pytest-watcher]
pipx install pytest-watcher
ptw .
Run the latest local code anywhere with pipx.
pipx install . --include-deps --force --editable
Either use flit directly:
pipx install flit
# envchain --set FLIT FLIT_PASSWORD
export FLIT_USERNAME=__token__
export eval $(envchain FLIT env | grep FLIT_PASSWORD=)
flit publish
or trigger the GitHub Action job, by creating a release with a tag equal to the version, e.g. v0.0.1
and updating the version in mdformat_mkdocs/__init__.py
.
Note, this requires generating an API key on PyPi and adding it to the repository Settings/Secrets
, under the name PYPI_KEY
.