Quick Guide#

If you used PH3 before and do not want to read all the lengthy tutorial again, here is an abridged version.

Preliminaries#

$ poetry config virtualenvs.in-project true
$ poetry self add poetry-bumpversion
$ poetry self add poetry-plugin-up
  • Git:

$ git config --add remote.origin.fetch '^refs/heads/gh-pages'

Create a new package#

  • Go to the parent directory of your future project.

  • In a terminal:

$ ph3
$ cd my-project-slug
$ poetry install
$ pip install -e .
  • PyCharm:

    • Check run test & documentation.

    • Check local coverage and built documentation html files.

    • Push project to GitHub.

  • Github:

    • Check the gh actions.

    • Setup gh-pages as your public documentation.

    • Install codecov and pypi tokens as project secrets.

  • Push a small commit, check everything (documentation, badges, coverage) is OK.

  • Start working on your project:

    • Frequently run your configurations (tests & documentation).

    • Remind to update docs (especially reference) and tests, in particular when you change the structure.

Make a release#

  • Bump your dependencies (poetry up).

  • Import important classes in main __init__.py.

  • Check your docs (references and tutorials).

  • Bulletproof tests (coverage!) and documentation building (look up Sphinx warnings).

  • Bump version of your package (poetry version patch/minor/major).

  • Update HISTORY.md, beware of strict Markdown compliance.

  • Commit/Push, merge into main/master if you were on a secondary branch.

  • Create release on GitHub. Use vx.y.z convention for the tag.

  • Wait for the badge to be updated, check the release on PyPi.