Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/python-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
poetry-version:
description: 'Poetry version to use'
required: true
default: "1.2.2"
default: "2.1.2"

runs:

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: ./.github/actions/python-environment

- name: Check Version(s)
run: poetry run version-check `poetry run python -c "from noxconfig import PROJECT_CONFIG; print(PROJECT_CONFIG.version_file)"`
run: poetry run version-check `poetry run -- python -c "from noxconfig import PROJECT_CONFIG; print(PROJECT_CONFIG.version_file)"`

Documentation:
name: Docs
Expand All @@ -35,7 +35,7 @@ jobs:

- name: Build Documentation
run: |
poetry run python -m nox -s docs:build
poetry run -- nox -s docs:build

Changelog:
name: Changelog Update Check
Expand All @@ -55,7 +55,7 @@ jobs:

- name: Run changelog update check
if: ${{ github.ref != 'refs/heads/main' }}
run: poetry run nox -s changelog:updated
run: poetry run -- nox -s changelog:updated

build-matrix:
name: Generate Build Matrix
Expand All @@ -79,7 +79,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run lint
run: poetry run nox -s lint:code
run: poetry run -- nox -s lint:code

- name: Upload Artifacts
uses: actions/[email protected]
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run type-check
run: poetry run nox -s lint:typing
run: poetry run -- nox -s lint:typing

Security:
name: Security Checks (Python-${{ matrix.python-version }})
Expand All @@ -128,7 +128,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run security linter
run: poetry run nox -s lint:security
run: poetry run -- nox -s lint:security

- name: Upload Artifacts
uses: actions/[email protected]
Expand All @@ -151,7 +151,7 @@ jobs:
python-version: "3.9"

- name: Run format check
run: poetry run nox -s project:format
run: poetry run -- nox -s project:format

Tests:
name: Unit-Tests (Python-${{ matrix.python-version }})
Expand All @@ -173,7 +173,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run Tests and Collect Coverage
run: poetry run nox -s test:unit -- -- --coverage
run: poetry run -- nox -s test:unit -- --coverage

- name: Upload Artifacts
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Build Documentation
run: |
poetry run nox -s docs:multiversion
poetry run -- nox -s docs:multiversion

- name: Deploy
uses: JamesIves/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/matrix-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
uses: ./.github/actions/python-environment

- name: Generate matrix
run: poetry run nox -s matrix:all
run: poetry run -- nox -s matrix:all

- id: set-matrix
run: |
echo "matrix=$(poetry run nox -s matrix:all)" >> $GITHUB_OUTPUT
echo "matrix=$(poetry run -- nox -s matrix:all)" >> $GITHUB_OUTPUT

outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
4 changes: 2 additions & 2 deletions .github/workflows/matrix-exasol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
uses: ./.github/actions/python-environment

- name: Generate matrix
run: poetry run nox -s matrix:exasol
run: poetry run -- nox -s matrix:exasol

- id: set-matrix
run: |
echo "matrix=$(poetry run nox -s matrix:exasol)" >> $GITHUB_OUTPUT
echo "matrix=$(poetry run -- nox -s matrix:exasol)" >> $GITHUB_OUTPUT

outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
4 changes: 2 additions & 2 deletions .github/workflows/matrix-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
uses: ./.github/actions/python-environment

- name: Generate matrix
run: poetry run nox -s matrix:python
run: poetry run -- nox -s matrix:python

- id: set-matrix
run: |
echo "matrix=$(poetry run nox -s matrix:python)" >> $GITHUB_OUTPUT
echo "matrix=$(poetry run -- nox -s matrix:python)" >> $GITHUB_OUTPUT

outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
14 changes: 7 additions & 7 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ jobs:
- name: Copy Artifacts into Root Folder
working-directory: ./artifacts
run: |
poetry run coverage combine --keep coverage-python3.9*/.coverage
poetry run -- coverage combine --keep coverage-python3.9*/.coverage
# Errors during copying are ignored because they are checked in the next step
cp .coverage ../ || true
cp lint-python3.9/.lint.txt ../ || true
cp lint-python3.9/.lint.json ../ || true
cp security-python3.9/.security.json ../ || true

- name: Validate Artifacts
run: poetry run nox -s artifacts:validate
run: poetry run -- nox -s artifacts:validate

- name: Generate Report
run: poetry run nox -s project:report -- -- --format json | tee metrics.json
run: poetry run -- nox -s project:report -- --format json | tee metrics.json

- name: Upload Artifacts
uses: actions/[email protected]
Expand All @@ -49,9 +49,9 @@ jobs:
- name: Generate GitHub Summary
run: |
echo -e "# Summary\n" >> $GITHUB_STEP_SUMMARY
poetry run nox -s project:report -- -- --format markdown >> $GITHUB_STEP_SUMMARY
poetry run nox -s dependency:licenses >> $GITHUB_STEP_SUMMARY
poetry run -- nox -s project:report -- --format markdown >> $GITHUB_STEP_SUMMARY
poetry run -- nox -s dependency:licenses >> $GITHUB_STEP_SUMMARY
echo -e "\n\n# Coverage\n" >> $GITHUB_STEP_SUMMARY
poetry run coverage report -- --format markdown >> $GITHUB_STEP_SUMMARY
poetry run tbx lint pretty-print >> $GITHUB_STEP_SUMMARY
poetry run tbx security pretty-print .security.json >> $GITHUB_STEP_SUMMARY
poetry run -- tbx lint pretty-print >> $GITHUB_STEP_SUMMARY
poetry run -- tbx security pretty-print .security.json >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion .github/workflows/slow-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run Tests and Collect Coverage
run: poetry run nox -s test:integration -- -- --coverage --db-version ${{ matrix.exasol-version }}
run: poetry run -- nox -s test:integration -- --coverage --db-version ${{ matrix.exasol-version }}

- name: Upload Artifacts
uses: actions/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
types: [ python ]
pass_filenames: false
language: system
entry: poetry run nox -s project:fix
entry: poetry run -- nox -s project:fix
stages: [ pre-commit ]

- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -28,7 +28,7 @@ repos:
types: [ python ]
pass_filenames: false
language: system
entry: poetry run nox -s lint:typing
entry: poetry run -- nox -s lint:typing
stages: [ pre-push ]

- repo: local
Expand All @@ -38,5 +38,5 @@ repos:
types: [ python ]
pass_filenames: false
language: system
entry: poetry run nox -s lint:code
entry: poetry run -- nox -s lint:code
stages: [ pre-push ]
14 changes: 13 additions & 1 deletion doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Unreleased

## Summary

In exasol-toolbox version `1.0.0` and higher the default behavior for
`.github/actions/python-environment/action.yml` has changed. In previous versions,
the default value for `poetry-version` was `1.2.2`, and it is now `2.1.2`.

* Depending on its poetry version, a repository relying on the default behavior of said
action may run into breaking changes. This can easily be resolved with explicitly setting the
`poetry-version` when calling the GitHub action. It is, however, recommended whenever
possible to update the poetry version of affected repository to `2.x`.

## ✨ Features

* [#73](https://github.com/exasol/python-toolbox/issues/73): Added nox target for auditing work spaces in regard to known vulnerabilities
Expand All @@ -8,4 +19,5 @@
* [#372](https://github.com/exasol/python-toolbox/issues/372): Added conversion from pip-audit JSON to expected GitHub Issue format

## ⚒️ Refactorings
* [#388](https://github.com/exasol/python-toolbox/issues/388): Switch GitHub workflows to use pinned OS version
* [#388](https://github.com/exasol/python-toolbox/issues/388): Switched GitHub workflows to use pinned OS version
* [#376](https://github.com/exasol/python-toolbox/issues/376): Updated to poetry `2.1.2`
2 changes: 1 addition & 1 deletion doc/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ To view all the defined nox tasks & their definitions use:

.. code-block:: shell

poetry run nox -l
poetry run -- nox -l

Workflows
~~~~~~~~~
Expand Down
6 changes: 3 additions & 3 deletions doc/github_actions/python_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Parameters
* - poetry-version
- Poetry version to use
- True
- 1.2.2
- 2.1.2

Example Usage
-------------
Expand All @@ -40,9 +40,9 @@ Example Usage
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.9.0
uses: exasol/python-toolbox/.github/actions/python-environment@0.21.0
with:
python-version: 3.12
poetry-version: 1.2.2
poetry-version: 2.1.2

...
2 changes: 1 addition & 1 deletion doc/user_guide/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ forward and you just can use the example *noxfile.py* bellow.

.. code-block:: shell

poetry run pre-commit install --hook-type pre-commit --hook-type pre-push
poetry run -- pre-commit install --hook-type pre-commit --hook-type pre-push

.. _toolbox tasks:

Expand Down
4 changes: 2 additions & 2 deletions exasol/toolbox/pre_commit_hooks/package_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
_VERSION_MODULE_TEMPLATE = cleandoc('''
# ATTENTION:
# This file is generated by exasol/toolbox/pre_commit_hooks/package_version.py when using:
# * either "poetry run nox -s project:fix"
# * or "poetry run version-check <path/version.py> --fix"
# * either "poetry run -- nox -s project:fix"
# * or "poetry run -- version-check <path/version.py> --fix"
# Do not edit this file manually!
# If you need to change the version, do so in the project.toml, e.g. by using `poetry version X.Y.Z`.
MAJOR = {major}
Expand Down

This file was deleted.

16 changes: 8 additions & 8 deletions exasol/toolbox/templates/github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
echo "Please enable the version check by replacing this output with shell command bellow:"
echo ""
echo "poetry run version-check <<VERSION_PY>>"
echo "poetry run -- version-check <<VERSION_PY>>"
echo ""
echo "Note: <<VERSION_PY>> needs to point to the version file of the project (version.py)."
exit 1
Expand All @@ -41,7 +41,7 @@ jobs:

- name: Build Documentation
run: |
poetry run python -m nox -s docs:build
poetry run -- nox -s docs:build

build-matrix:
name: Generate Build Matrix
Expand All @@ -61,7 +61,7 @@ jobs:
python-version: "3.9"

- name: Run changelog update check
run: poetry run nox -s changelog:updated
run: poetry run -- nox -s changelog:updated

Lint:
name: Linting (Python-${{ matrix.python-version }})
Expand All @@ -81,7 +81,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run lint
run: poetry run nox -s lint:code
run: poetry run -- nox -s lint:code

- name: Upload Artifacts
uses: actions/[email protected]
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run type-check
run: poetry run nox -s lint:typing
run: poetry run -- nox -s lint:typing

Security:
name: Security Checks (Python-${{ matrix.python-version }})
Expand All @@ -130,7 +130,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run security linter
run: poetry run nox -s lint:security
run: poetry run -- nox -s lint:security

- name: Upload Artifacts
uses: actions/[email protected]
Expand All @@ -153,7 +153,7 @@ jobs:
python-version: "3.9"

- name: Run format check
run: poetry run nox -s project:format
run: poetry run -- nox -s project:format

Tests:
name: Unit-Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
Expand All @@ -175,7 +175,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run Tests and Collect Coverage
run: poetry run nox -s test:unit -- -- --coverage
run: poetry run -- nox -s test:unit -- --coverage

- name: Upload Artifacts
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion exasol/toolbox/templates/github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Build Documentation
run: |
poetry run nox -s docs:multiversion
poetry run -- nox -s docs:multiversion

- name: Deploy
uses: JamesIves/[email protected]
Expand Down
Loading