Skip to content

Latest commit

 

History

History
78 lines (50 loc) · 1.34 KB

CONTRIBUTING.md

File metadata and controls

78 lines (50 loc) · 1.34 KB

Development

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 py38-pre-commit

or directly

pip install pre-commit
pre-commit run --all

To run the pre-commit hook test:

tox -e py38-hook

ptw testing

See configuration in pyproject.toml for [tool.pytest-watcher]

pipx install pytest-watcher

ptw .

Local pipx testing

Run the latest local code anywhere with pipx.

pipx install . --include-deps --force --editable

Publish to PyPi

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_gfm_alerts/__init__.py.

Note, this requires generating an API key on PyPi and adding it to the repository Settings/Secrets, under the name PYPI_KEY.