Skip to content

Commit f88e0f0

Browse files
Merge branch 'main' into feature/#409-Doc-link-&-checks
2 parents fd521f5 + d7c33bb commit f88e0f0

Some content is hidden

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

52 files changed

+1357
-710
lines changed

.github/actions/python-environment/action.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'SPPE'
2-
description: 'Setup python and poetry environment'
2+
description: 'Set up python and poetry environment'
33

44
inputs:
55

@@ -15,25 +15,46 @@ inputs:
1515

1616
working-directory:
1717
description: 'Working directory to use'
18-
required: true
18+
required: false
1919
default: "."
2020

21+
extras:
22+
description: 'Space-separated list of extras'
23+
required: false
24+
25+
use-cache:
26+
description: 'Use cache for poetry environment'
27+
required: false
28+
default: 'true'
29+
2130
runs:
2231

2332
using: "composite"
2433
steps:
2534

26-
- name: Setup Poetry (${{ inputs.poetry-version }})
35+
- name: Set up pipx if not present
36+
shell: bash
37+
run: |
38+
python3 -m pip install --upgrade pipx
39+
python3 -m pipx ensurepath
40+
echo "$HOME/.local/bin" >> $GITHUB_PATH
41+
42+
- name: Set up Poetry (${{ inputs.poetry-version }})
2743
shell: bash
2844
run: pipx install poetry==${{ inputs.poetry-version }}
2945

30-
- name: Setup Python (${{ inputs.python-version}})
46+
- name: Set up Python (${{ inputs.python-version}})
3147
uses: actions/setup-python@v5
3248
with:
3349
python-version: ${{ inputs.python-version }}
34-
cache: 'poetry'
50+
cache: ${{ inputs.use-cache == 'true' && 'poetry' || '' }}
3551

36-
- name: Poetry install
52+
- name: Poetry install with extras
3753
working-directory: ${{ inputs.working-directory }}
3854
shell: bash
39-
run: poetry install
55+
run: |
56+
if [[ -n "$EXTRAS" ]]; then
57+
poetry install --extras "$EXTRAS"
58+
else
59+
poetry install
60+
fi

.github/actions/security-issues/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ runs:
3939
- name: Install Python Toolbox / Security tool
4040
shell: bash
4141
run: |
42-
pip install exasol-toolbox==1.1.0
42+
pip install exasol-toolbox==1.3.0
4343
4444
- name: Create Security Issue Report
4545
shell: bash

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: ./.github/actions/python-environment
2121

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

2525
Documentation:
2626
name: Docs

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- name: Build Documentation
2323
run: |
2424
poetry run -- nox -s docs:multiversion
25+
rm -r .html-documentation/*/.doctrees
2526
2627
- name: Upload artifact
2728
uses: actions/upload-pages-artifact@v3

.github/workflows/report.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,7 @@ jobs:
2727
path: ./artifacts
2828

2929
- name: Copy Artifacts into Root Folder
30-
working-directory: ./artifacts
31-
run: |
32-
poetry run -- coverage combine --keep coverage-python3.9*/.coverage
33-
# Errors during copying are ignored because they are checked in the next step
34-
cp .coverage ../ || true
35-
cp lint-python3.9/.lint.txt ../ || true
36-
cp lint-python3.9/.lint.json ../ || true
37-
cp security-python3.9/.security.json ../ || true
30+
run: poetry run -- nox -s artifacts:copy -- artifacts
3831

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

doc/changes/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22

33
* [unreleased](unreleased.md)
4+
* [1.3.0](changes_1.3.0.md)
5+
* [1.2.0](changes_1.2.0.md)
46
* [1.1.0](changes_1.1.0.md)
57
* [1.0.1](changes_1.0.1.md)
68
* [1.0.0](changes_1.0.0.md)
@@ -33,6 +35,8 @@
3335
hidden:
3436
---
3537
unreleased
38+
changes_1.3.0
39+
changes_1.2.0
3640
changes_1.1.0
3741
changes_1.0.1
3842
changes_1.0.0

doc/changes/changes_1.2.0.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# 1.2.0 - 2025-05-20
2+
3+
## Summary
4+
5+
With #420, any GitHub repos using the PTB for **documentation** will also need to
6+
reconfigure the GitHub Pages settings for each repo:
7+
1. Go to the affected repo's GitHub page
8+
2. Select 'Settings'
9+
3. Scroll down & select 'Pages'
10+
4. Within the 'Build and deployment' section, change 'Source' to 'GitHub Actions'.
11+
12+
This should also create a 'github-pages' environment, if it does not yet exist.
13+
For most repos using the PTB, the updating of the github pages only happens when a
14+
PR is merged to main, so please check post-merge that it worked as expected.
15+
16+
With #422, we have hardened the security in our GitHub workflows by explicitly
17+
setting permissions to the default GitHub token. In a few repos who greatly differ
18+
from the default PTB setup, this might lead to small issues which require the allowed
19+
permissions to be increased for specific jobs.
20+
21+
## ⚒️ Refactorings
22+
23+
* [#412](https://github.com/exasol/python-toolbox/issues/392): Refactored pre commit hook package version.py into nox task
24+
25+
## Security
26+
27+
* [#420](https://github.com/exasol/python-toolbox/issues/420): Replaced 3rd party action with GitHub actions for gh-pages
28+
* [#422](https://github.com/exasol/python-toolbox/issues/422): Set permissions within the GitHub workflows to restrict usage of the default GitHub token
29+
30+
## ✨ Features
31+
32+
* [#161](https://github.com/exasol/python-toolbox/issues/161): Added support for installing extras & not using a cache to the python-environment action
33+
* [#408](https://github.com/exasol/python-toolbox/issues/408): Added support for GitHub runners who do not per default have pipx to use the python-environment action
34+
* [#433](https://github.com/exasol/python-toolbox/issues/433): Removed directory .html-documentation/.doctrees after creating documentation
35+
* [#436](https://github.com/exasol/python-toolbox/issues/436): Updated template for new projects to poetry 2.x
36+
37+
## Bugfixes
38+
39+
* [#428](https://github.com/exasol/python-toolbox/issues/428): Fixed detecting report coverage failures
40+
* [#434](https://github.com/exasol/python-toolbox/issues/434): Adapted template so new projects do not fail from lint errors

doc/changes/changes_1.3.0.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# 1.3.0 - 2025-06-02
2+
3+
## Summary
4+
5+
This version of the PTB updates nox task `version:check`, see #441.
6+
This requires file `noxconfig.py` of each project to specify the path to `version.py` in `Config.version_file`.
7+
8+
With this version of the PTB you can customize the arguments for `pyupgrade` in file `noxconfig.py`, see ticket #449 for details:
9+
```python
10+
pyupgrade_args = ("--py310-plus",)
11+
```
12+
13+
## 📚 Documentation
14+
* Updated getting_started.rst for allowing tag-based releases
15+
16+
## ✨ Features
17+
18+
* [#441](https://github.com/exasol/python-toolbox/issues/441): Switched nox task for `version:check` to use the config value of `version_file` to specify the location of the `version.py`
19+
20+
## 🐞 Bug Fixes
21+
* Updated `python-environment` action to use space-separated values for extras
22+
23+
24+
## ⚒️ Refactorings
25+
26+
* [#449](https://github.com/exasol/python-toolbox/issues/449): Refactored `dependency:licenses`:
27+
* to use pydantic models & `poetry show` for dependencies
28+
* to updated reading the `pyproject.toml` to be compatible with poetry 2.x+
29+
30+
## 🔩 Internal
31+
32+
* Relocked dependencies

doc/changes/unreleased.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,7 @@
22

33
## Summary
44

5-
With #420, any GitHub repos using the PTB for **documentation** will also need to
6-
reconfigure the GitHub Pages settings for each repo:
7-
1. Go to the affected repo's GitHub page
8-
2. Select 'Settings'
9-
3. Scroll down & select 'Pages'
10-
4. Within the 'Build and deployment' section, change 'Source' to 'GitHub Actions'.
11-
12-
This should also create a 'github-pages' environment, if it does not yet exist.
13-
For most repos using the PTB, the updating of the github pages only happens when a
14-
PR is merged to main, so please check post-merge that it worked as expected.
15-
16-
With #422, we have hardened the security in our GitHub workflows by explicitly
17-
setting permissions to the default GitHub token. In a few repos who greatly differ
18-
from the default PTB setup, this might lead to small issues which require the allowed
19-
permissions to be increased for specific jobs.
20-
21-
## ⚒️ Refactorings
22-
23-
* [#412](https://github.com/exasol/python-toolbox/issues/392): Refactored pre commit hook package version.py into nox task
24-
25-
## Security
26-
27-
* [#420](https://github.com/exasol/python-toolbox/issues/420): Replaced 3rd party action with GitHub actions for gh-pages
28-
* [#422](https://github.com/exasol/python-toolbox/issues/422): Set permissions within the GitHub workflows to restrict usage of the default GitHub token
29-
305
## ✨ Features
316

32-
* [#409](https://github.com/exasol/python-toolbox/issues/409): Doc link & checks
7+
* #426: Allowed configuring the python version used for coverage
8+
* [#409](https://github.com/exasol/python-toolbox/issues/409): Doc link & checks

doc/github_actions/python_environment.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ Parameters
1919
- Poetry version to use
2020
- True
2121
- 2.1.2
22+
* - working-directory
23+
- Working directory to use
24+
- False
25+
- .
26+
* - extras
27+
- Comma-separated list of extras
28+
- False
29+
- (not used by default)
30+
* - use-cache
31+
- Use cache for poetry environment
32+
- False
33+
- true
2234

2335
Example Usage
2436
-------------
@@ -40,9 +52,12 @@ Example Usage
4052
uses: actions/checkout@v4
4153
4254
- name: Setup Python & Poetry Environment
43-
uses: exasol/python-toolbox/.github/actions/python-environment@0.21.0
55+
uses: exasol/python-toolbox/.github/actions/python-environment@1.1.0
4456
with:
4557
python-version: 3.12
4658
poetry-version: 2.1.2
59+
working-directory: pytest-backend
60+
use-cache: false
61+
extras: 'numpy,pandas'
4762
4863
...

0 commit comments

Comments
 (0)