diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 590fbbf65..3067968b0 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -10,7 +10,7 @@ jobs: cd-job: name: Continuous Delivery - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: write steps: @@ -19,6 +19,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Build Artifacts run: poetry build diff --git a/.github/workflows/check-release-tag.yml b/.github/workflows/check-release-tag.yml index eded3e3fd..e047d22b0 100644 --- a/.github/workflows/check-release-tag.yml +++ b/.github/workflows/check-release-tag.yml @@ -7,7 +7,7 @@ jobs: check-tag-version-job: name: Check Tag Version - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read steps: @@ -16,6 +16,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Check Tag Version # make sure the pushed/created tag matched the project version diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 88b6a6035..486cd6ab4 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -6,7 +6,7 @@ on: jobs: Version-Check: name: Version - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read steps: @@ -17,6 +17,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Check Version(s) run: poetry run -- nox -s version:check @@ -24,7 +27,7 @@ jobs: Documentation: name: Docs needs: [ Version-Check ] - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read steps: @@ -33,6 +36,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Build Documentation run: | @@ -50,7 +56,7 @@ jobs: Changelog: name: Changelog Update Check - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' }} @@ -60,6 +66,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Run changelog update check run: poetry run -- nox -s changelog:updated @@ -67,7 +76,7 @@ jobs: Lint: name: Linting (Python-${{ matrix.python-version }}) needs: [ Version-Check, build-matrix ] - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read strategy: @@ -81,6 +90,7 @@ jobs: uses: ./.github/actions/python-environment with: python-version: ${{ matrix.python-version }} + poetry-version: "2.3.0" - name: Run lint run: poetry run -- nox -s lint:code @@ -97,7 +107,7 @@ jobs: Type-Check: name: Type Checking (Python-${{ matrix.python-version }}) needs: [ Version-Check, build-matrix ] - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read strategy: @@ -112,6 +122,7 @@ jobs: uses: ./.github/actions/python-environment with: python-version: ${{ matrix.python-version }} + poetry-version: "2.3.0" - name: Run type-check run: poetry run -- nox -s lint:typing @@ -119,7 +130,7 @@ jobs: Security: name: Security Checks (Python-${{ matrix.python-version }}) needs: [ Version-Check, build-matrix ] - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read strategy: @@ -134,6 +145,7 @@ jobs: uses: ./.github/actions/python-environment with: python-version: ${{ matrix.python-version }} + poetry-version: "2.3.0" - name: Run security linter run: poetry run -- nox -s lint:security @@ -147,7 +159,7 @@ jobs: Format: name: Format Check - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read steps: @@ -156,14 +168,18 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Run format check run: poetry run -- nox -s format:check + Build-Packages: name: Build Package Check needs: [ Documentation, Lint, Type-Check, Security, Format ] - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read steps: @@ -172,6 +188,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Run Distribution Check run: poetry run -- nox -s package:check @@ -187,6 +206,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Run import linter run: poetry run -- nox -s lint:import @@ -194,7 +216,7 @@ jobs: Tests: name: Unit-Tests (Python-${{ matrix.python-version }}) needs: [ Build-Packages, Lint-Imports, build-matrix ] - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read strategy: @@ -212,6 +234,7 @@ jobs: uses: ./.github/actions/python-environment with: python-version: ${{ matrix.python-version }} + poetry-version: "2.3.0" - name: Run Tests and Collect Coverage run: poetry run -- nox -s test:unit -- --coverage diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index fea0dbdae..d47ce1f18 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -7,7 +7,7 @@ on: jobs: build-documentation: - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read steps: @@ -18,6 +18,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Build Documentation run: | @@ -38,7 +41,7 @@ jobs: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" steps: - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/matrix-all.yml b/.github/workflows/matrix-all.yml index bed900156..ed1a4a769 100644 --- a/.github/workflows/matrix-all.yml +++ b/.github/workflows/matrix-all.yml @@ -9,7 +9,7 @@ on: jobs: all_versions: - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read steps: @@ -18,6 +18,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Generate matrix run: poetry run -- nox -s matrix:all diff --git a/.github/workflows/matrix-exasol.yml b/.github/workflows/matrix-exasol.yml index adba1fa08..617564d57 100644 --- a/.github/workflows/matrix-exasol.yml +++ b/.github/workflows/matrix-exasol.yml @@ -9,7 +9,7 @@ on: jobs: exasol_versions: - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read steps: @@ -18,6 +18,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Generate matrix run: poetry run -- nox -s matrix:exasol diff --git a/.github/workflows/matrix-python.yml b/.github/workflows/matrix-python.yml index cc89884f4..86c3c0de0 100644 --- a/.github/workflows/matrix-python.yml +++ b/.github/workflows/matrix-python.yml @@ -9,7 +9,7 @@ on: jobs: python_versions: - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read steps: @@ -18,6 +18,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Generate matrix run: poetry run -- nox -s matrix:python diff --git a/.github/workflows/merge-gate.yml b/.github/workflows/merge-gate.yml index 9caa3ceee..c8caddfd5 100644 --- a/.github/workflows/merge-gate.yml +++ b/.github/workflows/merge-gate.yml @@ -13,7 +13,7 @@ jobs: run-slow-tests: name: Run Slow Tests - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read @@ -36,7 +36,7 @@ jobs: # This job ensures inputs have been executed successfully. approve-merge: name: Allow Merge - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read # If you need additional jobs to be part of the merge gate, add them below diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index e7968e316..7a4a4857a 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -6,7 +6,7 @@ on: jobs: report: - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read env: @@ -20,6 +20,9 @@ jobs: - name: Setup Python & Poetry Environment uses: ./.github/actions/python-environment + with: + python-version: "3.10" + poetry-version: "2.3.0" - name: Download Artifacts uses: actions/download-artifact@v7 diff --git a/.github/workflows/slow-checks.yml b/.github/workflows/slow-checks.yml index 52e53889d..ae3aa4e9d 100644 --- a/.github/workflows/slow-checks.yml +++ b/.github/workflows/slow-checks.yml @@ -13,7 +13,7 @@ jobs: tests: name: Integration-Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}}) needs: [ build-matrix ] - runs-on: ubuntu-24.04 + runs-on: "ubuntu-24.04" permissions: contents: read env: @@ -30,6 +30,7 @@ jobs: uses: ./.github/actions/python-environment with: python-version: ${{ matrix.python-version }} + poetry-version: "2.3.0" - name: Run Tests and Collect Coverage run: poetry run -- nox -s test:integration -- --coverage --db-version ${{ matrix.exasol-version }} @@ -37,7 +38,7 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v6 with: - name: coverage-python${{ matrix.python-version }}-slow + name: coverage-python${{ matrix.python-version }}-exasol${{ matrix.exasol-version }}-slow path: .coverage include-hidden-files: true @@ -68,6 +69,7 @@ jobs: uses: ./.github/actions/python-environment with: python-version: "${{ matrix.python-version }}" + poetry-version: "2.3.0" - name: Poetry version run: poetry --version diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index d91b24026..121438cd4 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -31,6 +31,9 @@ an issue in the `python-toolbox`. The default behavior for `.github/actions/python-environment/action.yml` has changed. In previous versions, the default value for `poetry-version` was `2.1.2`, and it is now `2.3.0`. +* For migrating to `2.3.0`, see +[from Poetry 2.1.x to 2.3.0](https://exasol.github.io/python-toolbox/main/user_guide/dependencies.html#from-poetry-2-1-x-to-2-3-0). + * 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 @@ -39,23 +42,6 @@ you can, if needed, alter the `poetry-version` via the `noxconfig.py::PROJECT_CO by changing `dependency_manager_version`. If you do this, please create an issue to update to `2.3.0` at your earliest convenience. -* Projects migrating to this version should: - - * Update their `pyproject.toml` to have: - ```toml - requires-poetry = ">=2.3.0" - ``` - * Run `poetry check` and resolve any issues - * (optional) Run `poetry lock` to update the lock - * (optional) Update their `pyproject.toml` to fit: - * [PEP-621](https://peps.python.org/pep-0621/) - * [PEP-735](https://peps.python.org/pep-0735/) - -Note that [uvx migrate-to-uv](https://github.com/mkniewallner/migrate-to-uv) seems to -do a good job with automating many of the PEP-related changes; though developers should -take care and will need to make manual changes to ensure it still works with -`poetry`, as the PTB does not yet support `uv`. - ## Documentation * #648: Moved sonar setup instructions in the User guide @@ -87,3 +73,4 @@ take care and will need to make manual changes to ensure it still works with * `upload-artifact` from v5 to [v6](https://github.com/actions/upload-artifact/releases/tag/v6.0.0) - using Node.js 24 * #667: Added deprecation warnings to `tbx workflow x` endpoints as some are unneeded (will be removed) and others need updates (will be moved to a nox session) +* #669: Updated PTB GitHub workflows diff --git a/doc/user_guide/dependencies.rst b/doc/user_guide/dependencies.rst index 7cadf486a..ab4a46659 100644 --- a/doc/user_guide/dependencies.rst +++ b/doc/user_guide/dependencies.rst @@ -32,7 +32,7 @@ Migration Information .. _migration_to_2.3.x: -From Poetry ``2.1.x`` to ``2.3.0`` +From Poetry 2.1.x to 2.3.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It is **highly** encouraged that a developer update their ``pyproject.toml`` and system-wide Poetry installation to most use effectively use Poetry ``2.3.0``: diff --git a/exasol/toolbox/templates/github/workflows/checks.yml b/exasol/toolbox/templates/github/workflows/checks.yml index 8230e04df..cba276500 100644 --- a/exasol/toolbox/templates/github/workflows/checks.yml +++ b/exasol/toolbox/templates/github/workflows/checks.yml @@ -168,13 +168,14 @@ jobs: - name: Setup Python & Poetry Environment uses: exasol/python-toolbox/.github/actions/python-environment@v4 - - - name: Run format check - run: poetry run -- nox -s format:check with: python-version: "(( minimum_python_version ))" poetry-version: "(( dependency_manager_version ))" + - name: Run format check + run: poetry run -- nox -s format:check + + Build-Packages: name: Build Package Check needs: [ Documentation, Lint, Type-Check, Security, Format ]