Skip to content

Commit 87650a9

Browse files
Refactoring/183 update poetry to 2.1.2 (#184)
* Add security.md file * Resolve h11 vulnerability * Resolve transformers vulnerability * Update to exasol-toolbox 1.1.0 * Fix formatting on files * Update poetry run <command> to poetry run -- <command> for poetry 2.1+ compatibility * Ignore current typing issue to be resolved in another issue * Update to poetry 2.1.2 * Remove 3.13 from chain; issues with pyarrow --------- Co-authored-by: Tun Loakthar <[email protected]>
1 parent d14c81d commit 87650a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1600
-807
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: Setup Python & Poetry Environment
20-
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
20+
uses: exasol/python-toolbox/.github/actions/python-environment@1.1.0
2121
with:
22-
poetry-version: 2.0.1
22+
poetry-version: 2.1.2
2323

2424
- name: Build Artifacts
2525
run: poetry build

.github/workflows/check-release-tag.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
uses: actions/checkout@v4
1515

1616
- name: Setup Python & Poetry Environment
17-
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
17+
uses: exasol/python-toolbox/.github/actions/python-environment@1.1.0
1818
with:
19-
poetry-version: 2.0.1
19+
poetry-version: 2.1.2
2020

2121
- name: Check Tag Version
2222
# make sure the pushed/created tag matched the project version

.github/workflows/checks.yml

Lines changed: 97 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: Checks
22

33
on:
44
workflow_call:
5-
secrets:
6-
ALTERNATIVE_GITHUB_TOKEN:
7-
required: false
85

96
jobs:
107

@@ -19,15 +16,15 @@ jobs:
1916
fetch-depth: 0
2017

2118
- name: Setup Python & Poetry Environment
22-
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
19+
uses: exasol/python-toolbox/.github/actions/python-environment@1.1.0
2320
with:
24-
poetry-version: 2.0.1
21+
poetry-version: 2.1.2
2522

2623
- name: Check Version(s)
27-
run: poetry run version-check version.py
24+
run: poetry run -- version-check version.py
2825

2926
Documentation:
30-
name: Build Documentation
27+
name: Docs
3128
needs: [ Version-Check ]
3229
runs-on: ubuntu-24.04
3330

@@ -36,98 +33,139 @@ jobs:
3633
uses: actions/checkout@v4
3734

3835
- name: Setup Python & Poetry Environment
39-
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
36+
uses: exasol/python-toolbox/.github/actions/python-environment@1.1.0
4037
with:
41-
poetry-version: 2.0.1
38+
poetry-version: 2.1.2
4239

4340
- name: Build Documentation
4441
run: |
45-
poetry run python -m nox -s docs:build
42+
poetry run -- nox -s docs:build
43+
44+
build-matrix:
45+
name: Generate Build Matrix
46+
uses: ./.github/workflows/matrix-python.yml
47+
48+
Changelog:
49+
name: Changelog Update Check
50+
runs-on: ubuntu-24.04
51+
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' }}
52+
53+
steps:
54+
- name: SCM Checkout
55+
uses: actions/checkout@v4
56+
57+
- name: Setup Python & Poetry Environment
58+
uses: exasol/python-toolbox/.github/actions/[email protected]
59+
with:
60+
poetry-version: 2.1.2
61+
62+
- name: Run changelog update check
63+
run: poetry run -- nox -s changelog:updated
4664

4765
Lint:
4866
name: Linting (Python-${{ matrix.python-version }})
49-
needs: [ Version-Check ]
67+
needs: [ Version-Check, build-matrix ]
5068
runs-on: ubuntu-24.04
5169
strategy:
5270
fail-fast: false
53-
matrix:
54-
python-version: ["3.10", "3.11"]
71+
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
5572

5673
steps:
5774
- name: SCM Checkout
5875
uses: actions/checkout@v4
5976

6077
- name: Setup Python & Poetry Environment
61-
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
78+
uses: exasol/python-toolbox/.github/actions/python-environment@1.1.0
6279
with:
63-
poetry-version: 2.0.1
6480
python-version: ${{ matrix.python-version }}
81+
poetry-version: 2.1.2
6582

6683
- name: Run lint
67-
run: poetry run nox -s lint:code
84+
run: poetry run -- nox -s lint:code
6885

6986
- name: Upload Artifacts
70-
uses: actions/upload-artifact@v4.4.0
87+
uses: actions/upload-artifact@v4.6.2
7188
with:
7289
name: lint-python${{ matrix.python-version }}
73-
path: .lint.txt
90+
path: |
91+
.lint.txt
92+
.lint.json
7493
include-hidden-files: true
7594

7695
Type-Check:
7796
name: Type Checking (Python-${{ matrix.python-version }})
78-
needs: [ Version-Check ]
97+
needs: [ Version-Check, build-matrix ]
7998
runs-on: ubuntu-24.04
8099
strategy:
81100
fail-fast: false
82-
matrix:
83-
python-version: ["3.10", "3.11"]
101+
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
84102

85103
steps:
86104
- name: SCM Checkout
87105
uses: actions/checkout@v4
88106

89107
- name: Setup Python & Poetry Environment
90-
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
108+
uses: exasol/python-toolbox/.github/actions/python-environment@1.1.0
91109
with:
92-
poetry-version: 2.0.1
93110
python-version: ${{ matrix.python-version }}
111+
poetry-version: 2.1.2
94112

95113
- name: Run type-check
96-
run: poetry run nox -s lint:typing
114+
run: poetry run -- nox -s lint:typing
97115

98116
Security:
99117
name: Security Checks (Python-${{ matrix.python-version }})
100-
needs: [ Version-Check ]
118+
needs: [ Version-Check, build-matrix ]
101119
runs-on: ubuntu-24.04
120+
strategy:
121+
fail-fast: false
122+
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
102123

103124
steps:
104-
- name: SCM Checkout
105-
uses: actions/checkout@v4
106-
- name: Setup Python & Poetry Environment
107-
uses: exasol/python-toolbox/.github/actions/[email protected]
108-
with:
109-
poetry-version: 2.0.1
110-
python-version: ${{ matrix.python-version }}
111-
- name: Run security linter
112-
run: poetry run nox -s lint:security
113-
- name: Upload Artifacts
114-
uses: actions/[email protected]
115-
with:
116-
name: security-python${{ matrix.python-version }}
117-
path: .security.json
118-
include-hidden-files: true
125+
- name: SCM Checkout
126+
uses: actions/checkout@v4
127+
128+
- name: Setup Python & Poetry Environment
129+
uses: exasol/python-toolbox/.github/actions/[email protected]
130+
with:
131+
python-version: ${{ matrix.python-version }}
132+
poetry-version: 2.1.2
133+
134+
- name: Run security linter
135+
run: poetry run -- nox -s lint:security
136+
137+
- name: Upload Artifacts
138+
uses: actions/[email protected]
139+
with:
140+
name: security-python${{ matrix.python-version }}
141+
path: .security.json
142+
include-hidden-files: true
143+
144+
Format:
145+
name: Format Check
146+
runs-on: ubuntu-24.04
147+
148+
steps:
149+
- name: SCM Checkout
150+
uses: actions/checkout@v4
151+
152+
- name: Setup Python & Poetry Environment
153+
uses: exasol/python-toolbox/.github/actions/[email protected]
154+
with:
155+
poetry-version: 2.1.2
156+
157+
- name: Run format check
158+
run: poetry run -- nox -s project:format
119159

120160
Tests:
121-
name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}})
122-
needs: [ Documentation, Lint, Type-Check, Security ]
161+
name: Unit-Tests (Python-${{ matrix.python-version }})
162+
needs: [ Documentation, Lint, Type-Check, Security, Format, build-matrix ]
123163
runs-on: ubuntu-24.04
124164
env:
125-
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
165+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126166
strategy:
127167
fail-fast: false
128-
matrix:
129-
python-version: ["3.10", "3.11"]
130-
exasol-version: ["8.31.0"]
168+
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
131169

132170
steps:
133171
- name: SCM Checkout
@@ -151,25 +189,23 @@ jobs:
151189
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
152190
153191
- name: Setup Python & Poetry Environment
154-
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
192+
uses: exasol/python-toolbox/.github/actions/python-environment@1.1.0
155193
with:
156-
poetry-version: 2.0.1
157194
python-version: ${{ matrix.python-version }}
195+
poetry-version: 2.1.2
158196

159-
- name: Calculate Test Coverage
160-
run: poetry run nox -s test:coverage
161-
env:
162-
TEST_DB_VERSION: ${{matrix.exasol-version}}
163-
PYTEST_ADDOPTS: >
164-
-W 'ignore::DeprecationWarning:luigi:'
165-
-W 'ignore::DeprecationWarning:pkg_resources:'
166-
-W 'ignore:pkg_resources is deprecated as an API:DeprecationWarning'
167-
-W 'ignore:Deprecated call to \`pkg_resources.declare_namespace:DeprecationWarning'
168-
-W 'ignore::DeprecationWarning:exasol_integration_test_docker_environment:'
197+
- name: Run Tests and Collect Coverage
198+
run: |
199+
poetry run -- nox -s test:unit -- --coverage \
200+
-W 'ignore::DeprecationWarning:luigi:' \
201+
-W 'ignore::DeprecationWarning:pkg_resources:' \
202+
-W 'ignore:pkg_resources is deprecated as an API:DeprecationWarning' \
203+
-W 'ignore:Deprecated call to \`pkg_resources.declare_namespace:DeprecationWarning' \
204+
-W 'ignore::DeprecationWarning:exasol_integration_test_docker_environment:'
169205
170206
- name: Upload Artifacts
171-
uses: actions/upload-artifact@v4.4.0
207+
uses: actions/upload-artifact@v4.6.2
172208
with:
173-
name: coverage-python${{ matrix.python-version }}
209+
name: coverage-python${{ matrix.python-version }}-fast
174210
path: .coverage
175-
include-hidden-files: true
211+
include-hidden-files: true

.github/workflows/gh-pages.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Publish Documentation
22

3-
on:
3+
on:
44
workflow_call:
55
workflow_dispatch:
66

@@ -16,16 +16,16 @@ jobs:
1616
fetch-depth: 0
1717

1818
- name: Setup Python & Poetry Environment
19-
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
19+
uses: exasol/python-toolbox/.github/actions/python-environment@1.1.0
2020
with:
21-
poetry-version: 2.0.1
21+
poetry-version: 2.1.2
2222

2323
- name: Build Documentation
2424
run: |
25-
poetry run nox -s docs:multiversion
25+
poetry run -- nox -s docs:multiversion
2626
2727
- name: Deploy
28-
uses: JamesIves/github-pages-deploy-action@v4.6.0
28+
uses: JamesIves/github-pages-deploy-action@v4.7.3
2929
with:
3030
branch: gh-pages
3131
folder: .html-documentation
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build Matrix (Python)
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
matrix:
7+
description: "Generates the python version build matrix"
8+
value: ${{ jobs.python_versions.outputs.matrix }}
9+
10+
jobs:
11+
python_versions:
12+
13+
runs-on: ubuntu-24.04
14+
15+
steps:
16+
- name: SCM Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Python & Poetry Environment
20+
uses: exasol/python-toolbox/.github/actions/[email protected]
21+
with:
22+
poetry-version: 2.1.2
23+
24+
- name: Generate matrix
25+
run: poetry run -- nox -s matrix:python
26+
27+
- id: set-matrix
28+
run: |
29+
echo "matrix=$(poetry run -- nox -s matrix:python)" >> $GITHUB_OUTPUT
30+
31+
outputs:
32+
matrix: ${{ steps.set-matrix.outputs.matrix }}

.github/workflows/merge-gate.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: Merge-Gate
22

33
on:
44
workflow_call:
5-
secrets:
6-
ALTERNATIVE_GITHUB_TOKEN:
7-
required: false
85

96
jobs:
107

@@ -36,9 +33,9 @@ jobs:
3633
fetch-depth: 0
3734

3835
- name: Setup Python & Poetry Environment
39-
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
36+
uses: exasol/python-toolbox/.github/actions/python-environment@1.1.0
4037
with:
41-
poetry-version: 2.0.1
38+
poetry-version: 2.1.2
4239

4340
- name: Allow unprivileged user namespaces
4441
run: |
@@ -49,7 +46,7 @@ jobs:
4946
SAAS_HOST: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_HOST }}
5047
SAAS_ACCOUNT_ID: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_ACCOUNT_ID }}
5148
SAAS_PAT: ${{ secrets.INTEGRATION_TEAM_SAAS_STAGING_PAT }}
52-
run: poetry run pytest -rA --setup-show --backend=saas test/integration/test_cloud_storage.py
49+
run: poetry run -- pytest -rA --setup-show --backend=saas test/integration/test_cloud_storage.py
5350

5451
large-runner-tests:
5552
name: Text AI Tests
@@ -80,9 +77,9 @@ jobs:
8077
sudo rm -rf /opt/ghc
8178
8279
- name: Setup Python & Poetry Environment
83-
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
80+
uses: exasol/python-toolbox/.github/actions/python-environment@1.1.0
8481
with:
85-
poetry-version: 2.0.1
82+
poetry-version: 2.1.2
8683

8784
- name: Allow unprivileged user namespaces
8885
run: |
@@ -92,17 +89,17 @@ jobs:
9289
env:
9390
TXAIE_PRE_RELEASE_URL: ${{ vars.ZIP_URL }}
9491
TXAIE_PRE_RELEASE_PASSWORD: ${{ secrets.ZIP_PASSWORD }}
95-
run: poetry run pytest -rA --setup-show test/integration/test_text_ai_extension_wrapper.py
92+
run: poetry run -- pytest -rA --setup-show test/integration/test_text_ai_extension_wrapper.py
9693

9794
# This job ensures inputs have been executed successfully.
9895
approve-merge:
99-
name: Allow Merge
100-
runs-on: ubuntu-latest
96+
name: Allow Merge
97+
runs-on: ubuntu-24.04
10198
# If you need additional jobs to be part of the merge gate, add them below
10299
needs: [ fast-checks, saas-tests, large-runner-tests ]
103100

104101
# Each job requires a step, so we added this dummy step.
105102
steps:
106-
- name: Approve
103+
- name: Approve
107104
run: |
108105
echo "Merge Approved"

0 commit comments

Comments
 (0)