Skip to content

Releases: ni/python-actions

ni/python-actions v0.7.0

02 Oct 22:51
Immutable release. Only release title and notes can be modified.
9768589

Choose a tag to compare

What's Changed

  • analyze-project: Replace extras input with a more general install-args input (#40)

    • Now you can use install-args to pass whatever arguments you want to poetry install. Example:
    - uses: ni/python-actions/analyze-project@v0
      with:
        project-directory: ${{ github.workspace }}/packages/myproject
        install-args: "--extras 'colors serialization' --with dev,docs,utils"
    • The extras input has been removed. This breaks compatibility, but this project's major version is still 0, so we are only bumping the minor version.
  • setup-poetry: Use temporary directory for Poetry installs (#41)

    • Originally, the Poetry install directory was $HOME/.local/poetry. This worked fine on GitHub-hosted runners and ephemeral self-hosted runners, but on long-lived self-hosted runners it produces errors when the directory already exists.
    • In v0.6.0, the Poetry install directory was changed to $GITHUB_WORKSPACE/.cache/poetry so that self-hosted runners would automatically clean it up. However, this broke compatibility with clients that run tools that search the entire GitHub workspace for Python files.
    • In v0.6.1, the Poetry install directory was changed to the pipeline directory ($GITHUB_WORKSPACE/..) to hide it from tools that search the entire GitHub workspace. However, this caused a regression for long-lived self-hosted runners.
    • In v0.7.0, the Poetry install directory was changed to $RUNNER_TEMP/poetry, which is cleaned up before/after each job, but which is outside the GitHub workspace. This directory seems to be stable enough that caching is still effective. Hopefully this will be the last change of Poetry install location; if not, we will probably add an input to allow overriding it.

Full Changelog: v0.6.1...v0.7.0

ni/python-actions v0.6.1

29 Sep 18:48
Immutable release. Only release title and notes can be modified.
f42e2f2

Choose a tag to compare

Bug Fixes

  • ni/python-actions/analyze-project: Fix #31 - ni/python-actions/analyze-project does not think mypy is installed (#32)
  • ni/python-actions/setup-poetry: Fix #33 - Moving Poetry install directory to $GITHUB_WORKSPACE/.cache breaks nps lint with default excludes (#34)

What's Changed

  • Enable immutable releases
  • Documentation
    • Replace @v0.2 with @v0 and recommend pinning (#29)
    • Update analyze-project docs (#30)
  • ni/python-actions/analyze-project:
    • Use a custom shell to run the venv's python (#35)
    • Update jakebailey/pyright-action action to v2.3.3 (#37)
    • Add test scenarios for analyze-project (#36)

Full Changelog: v0.6.0...v0.6.1

ni/python-actions v0.6.0

24 Sep 20:42
1b90235

Choose a tag to compare

What's Changed

  • Add ni/python-actions/analyze-project composite action (#24)
    • This action analyzes the code quality of a Python project using various linters and type checkers including ni-python-styleguide, mypy (if the mypy package is installed), and pyright (if the 'pyright' package is installed).
  • Change Poetry install directory (#26)
    • This improves compatibility with self-hosted runners.
    • The Poetry cache key now includes a hash of the Poetry install directory.
  • Add a separate README.md for each action (#25)
  • Update actions/setup-python action to v6 (#27)

New Contributors

Full Changelog: v0.5.1...v0.6.0

ni/python-actions v0.5.1

11 Sep 20:54
8554e7e

Choose a tag to compare

What's Changed

  • update-project-version: Add workaround for chained PRs to PR description text (#21)

Full Changelog: v0.5.0...v0.5.1

ni/python-actions v0.5.0

22 Aug 20:35
f0276f7

Choose a tag to compare

What's Changed

  • setup-poetry:
    • Change default Poetry version to 2.1.4 (#18)
  • update-project-version:
    • Show project names and versions (#20)
      • The PR body now contains a table showing the project names, versions, and pyproject.toml paths
      • When updating a single project, the PR title now says shows the project name and version, e.g. "chore: Update project nitypes to v1.2.3"
    • Change how branch name is shown (#20)
      • The branch name is now shown in brackets at the beginning of the PR title, e.g. "[releases/1.2] chore: Update project nitypes to v1.2.3"
      • The branch name is no longer shown for main/master branches.
  • tests:
    • The actions are now tested on macOS (#15)

Full Changelog: v0.4.1...v0.5.0

ni/python-actions v0.4.1

30 Jun 15:11
5286c12

Choose a tag to compare

What's Changed

  • check-project-version: Set expected-version to release.tag_name for release events (#14)

New Contributors

Full Changelog: v0.4.0...v0.4.1

ni/python-actions v0.4.0

25 Jun 00:10
49cd7a9

Choose a tag to compare

What's Changed

  • setup-python, setup-poetry: Support PyPy and free-threading (#11)
    • To use PyPy, set the python-version input to pypy3.10, pypy3.11, etc.
    • To use CPython with free-threading, add a t suffix to the python-version input (e.g. 3.13t).
      • Note: free-threading is only available with Python 3.13 and later.
      • Note: installing Poetry with free-threading does not work yet, because the cryptography and cffi packages do not yet support free-threading.
    • The python-version output now reflects the the PyPy language+implementation versions (e.g. pypy3.11.11-v7.3.19) and has a t suffix for free-threaded builds (e.g. 3.13.4t)
    • The ni/setup-python action now uses the pythonVersion environment variable to pass the Python version to ni/setup-poetry.

Full Changelog: v0.3.1...v0.4.0

ni/python-actions v0.3.1

18 Jun 16:39
a3bfe1b

Choose a tag to compare

What's Changed

  • setup-poetry: Log debug info on failure (#12)

Full Changelog: v0.3.0...v0.3.1

ni/python-actions v0.3.0

09 Jun 17:02
97860b5

Choose a tag to compare

What's Changed

  • update-project-version: Add token input (#9)
    • The default GITHUB_TOKEN cannot trigger PR workflows, so the generated pull request will not run any status checks. You can work around this by using token to specify a token that is saved in a repo/org secret.
  • setup-poetry: Add use-cache input (#8)
    • If you run into caching problems, you can disable caching by specifying use-cache: false.

Full Changelog: v0.2.0...v0.3.0

ni/python-actions v0.2.0

04 Jun 22:15
2c946e7

Choose a tag to compare

What's Changed

  • Add the check-project-version action (#5)
    • The check-project-version action uses Poetry to get the version of a Python project and checks that it matches an expected version.
    • You can use this action in your project's publish workflow to verify that the project version matches the GitHub release tag.
    • By default, this action checks against github.ref_name, which is the GitHub release tag for GitHub release events.
  • Add the update-project-version action (#5)
    • The update-project-version action uses Poetry to update the version of a Python project and creates a pull request to modify its pyproject.toml file.
    • You can use this action in your project's publish workflow to update the version number for the next release or pre-release.
    • You can specify version-rule and use-dev-suffix to customize the versioning scheme.
      • version-rule specifies the rule for updating the version number. For example, major will update 1.0.0 -> 2.0.0, while patch will update 1.0.0 -> 1.0.1. See the docs for poetry version for the list of rules and their behavior.
      • use-dev-suffix specifies whether to use development versions like 1.0.0.dev0.

New Contributors

Full Changelog: v0.1.0...v0.2.0