Development#

The Repository#

Download the official development repository using Git

git clone https://github.com/nicoretti/prysk.git

Visit GitHub if you’d like to fork the project, watch for new changes, or report issues.

Dependencies#

In order to run all tests locally you need to have the following tools installed.

Python#

Shells#

  • dash

  • bash

  • zsh

If you have installed all the dependencies from above, run the following commands within the root folder of the project.

poetry install
poetry shell

Now you should be good to go!

Nox (Task Runner)#

Nox is the task runner used for automation within this project. The tasks definitions can be found in the file noxfile.py. The following commands should help you to get you started:

Execute all checks and build the documentation#

nox

Get a list of all available targets run#

nox --list

Run a specific target#

nox -s <target>

Run all integration tests#

nox -s integration

Run the integration tests for bash#

nox -s "integration(shell='bash')"

Creating a release#

  • Add a new empty Unreleased section to change log (prysk_news.rst)

  • Rename the old Unreleased section to Version <MAJOR>.<MINOR>.<PATCH> (<Month>. <Day>, <YEAR>)

  • Fine tune the change log / release notes
    • Add code snippets

    • Add examples

  • Update the version
    • Update the project version poetry version <major>.<minor>.<patch>

    • Update the version number(s) in the code prysk.cli.VERSION

  • Validate the Project
    • Run checks
      • formatters

      • tests

      • linter(s)

      • etc.

    • Fix findings
      • fix findings

      • re-run checks

  • Commit and publish changes as release preparation

  • Trigger the Release

    In order to trigger a release a new tag must be pushed to Github. For further details see: .github/workflows/ci-cd.yml.

    1. Create a local tag with the appropriate version number

      git tag x.y.z
      
    2. Push the tag to Github

      git push origin x.y.z
      

What to do if the release failed?#

The release failed during pre-release checks#

  1. Delete the local tag

    git tag -d x.y.z
    
  2. Delete the remote tag

    git push --delete origin x.y.z
    
  3. Fix the issue(s) which lead to the failing checks

  4. Start the release process from the beginning

One of the release steps failed (Partial Release)#

  1. Check the Github action/workflow to see which steps failed

  2. Finish or redo the failed release steps manually

Note

Example

Scenario: Publishing of the release on Github was successfully but during the PyPi release, the upload step got interrupted.

Solution: Manually push the package to PyPi