Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
12 changes: 6 additions & 6 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/upload-artifact@v4.6.0
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/upload-artifact@v4.6.0
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/upload-artifact@v4.6.0
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/github-pages-deploy-action@v4.7.2
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 }}
8 changes: 4 additions & 4 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
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/upload-artifact@v4.6.0
Expand All @@ -49,8 +49,8 @@ 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
Expand Down
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/upload-artifact@v4.6.0
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 ]
3 changes: 2 additions & 1 deletion doc/changes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,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): Switch GitHub workflows to use pinned OS version
* [#376](https://github.com/exasol/python-toolbox/issues/376): Update 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 exasol/toolbox/pre_commit_hooks/package_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
_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"
# * 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`.
Expand Down

This file was deleted.

12 changes: 6 additions & 6 deletions exasol/toolbox/templates/github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/upload-artifact@v4.6.0
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/upload-artifact@v4.6.0
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/upload-artifact@v4.6.0
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/github-pages-deploy-action@v4.7.2
Expand Down
4 changes: 2 additions & 2 deletions exasol/toolbox/templates/github/workflows/matrix-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
uses: exasol/python-toolbox/.github/actions/python-environment@0.21.0

- 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 exasol/toolbox/templates/github/workflows/matrix-exasol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
uses: exasol/python-toolbox/.github/actions/python-environment@0.21.0

- 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 exasol/toolbox/templates/github/workflows/matrix-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
uses: exasol/python-toolbox/.github/actions/python-environment@0.21.0

- 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 }}
8 changes: 4 additions & 4 deletions exasol/toolbox/templates/github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
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/upload-artifact@v4.6.0
Expand All @@ -49,8 +49,8 @@ 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 security pretty-print >> $GITHUB_STEP_SUMMARY
Expand Down
2 changes: 1 addition & 1 deletion exasol/toolbox/templates/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/upload-artifact@v4.6.0
Expand Down
Loading