Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 1012 Bytes

DEVELOP.md

File metadata and controls

56 lines (41 loc) · 1012 Bytes

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

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