Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 1.19 KB

DEVELOP.md

File metadata and controls

67 lines (49 loc) · 1.19 KB

Development

Install Poetry and project's dependencies

poetry install

Add new feature and launch tests

poetry run pytest -sv tests
# or
make tests

Install git hooks for the automatic linting and code formatting with pre-commit

pre-commit install
pre-commit run --all-files  # to initialize for the first time
pre-commit run flake8  # run a hook individually

Enable extra logging

export HAPLESS_DEBUG=1

Check coverage

poetry run pytest --cov=hapless --cov-report=html tests/
# or
make coverage-report

Run against multiple Python versions with nox

nox --list
# Check all of the defined Python versions are available
nox -s check_versions

# Run tests against all versions
nox -s test

Releasing

Bump a version with features you want to include and build a package

poetry version patch  # patch version update
poetry version minor
poetry version major  # choose one based on semver rules
poetry build

Upload package to GitHub and PyPI

git tag -a v0.1.2 -m "Version 0.1.2"
git push --tags
poetry publish