Skip to content

Commit c08a164

Browse files
committed
v6.0.0
2 parents d634248 + 2e4f6f3 commit c08a164

129 files changed

Lines changed: 9579 additions & 2619 deletions

File tree

Some content is hidden

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

.github/workflows/ApplicationTesting.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ jobs:
9494
name: ${{ inputs.wheel }}
9595
path: install
9696

97+
# TODO: extract step to an Action so package lists are shared with UnitTesting (and GHDL?)
9798
- name: Compute pacman/pacboy packages
9899
id: pacboy
99100
if: matrix.system == 'msys2'
@@ -199,7 +200,7 @@ jobs:
199200
${{ inputs.pacboy }}
200201
201202
- name: 🐍 Setup Python ${{ matrix.python }}
202-
uses: actions/setup-python@v5
203+
uses: actions/setup-python@v6
203204
if: matrix.system != 'msys2'
204205
with:
205206
python-version: ${{ matrix.python }}
@@ -225,7 +226,7 @@ jobs:
225226
python -m pip install --disable-pip-version-check -U install/*.whl
226227
227228
- name: ✅ Run application tests (Ubuntu/macOS)
228-
if: matrix.system != 'windows'
229+
if: ( matrix.system != 'windows' && matrix.system != 'windows-arm' )
229230
run: |
230231
export ENVIRONMENT_NAME="${{ matrix.envname }}"
231232
@@ -240,7 +241,7 @@ jobs:
240241
fi
241242
242243
- name: ✅ Run application tests (Windows)
243-
if: matrix.system == 'windows'
244+
if: ( matrix.system == 'windows' || matrix.system == 'windows-arm' )
244245
run: |
245246
$env:ENVIRONMENT_NAME = "${{ matrix.envname }}"
246247

.github/workflows/BuildTheDocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
runs-on: ubuntu-24.04
3838

3939
steps:
40-
- name: ' Deprecation message'
41-
run: printf "::warning title=%s::%s\n" "Deprecated" "'BuildTheDocs.yml' is not maintained anymore. Please switch to 'SphinxDocumentation.yml', 'LaTeXDocumentation.yml' and 'ExtractConfiguration.yml'."
40+
- name: ⚠️ Deprecation Warning
41+
run: printf "::warning title=%s::%s\n" "Deprecated" "'BuildTheDocs.yml' template is deprecated. Please switch to 'SphinxDocumentation.yml'. See https://pytooling.github.io/Actions/JobTemplate/Documentation/SphinxDocumentation.html"
4242

4343
- name: ⏬ Checkout repository
4444
uses: actions/checkout@v5
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# ==================================================================================================================== #
2+
# Authors: #
3+
# Patrick Lehmann #
4+
# #
5+
# ==================================================================================================================== #
6+
# Copyright 2025-2025 The pyTooling Authors #
7+
# #
8+
# Licensed under the Apache License, Version 2.0 (the "License"); #
9+
# you may not use this file except in compliance with the License. #
10+
# You may obtain a copy of the License at #
11+
# #
12+
# http://www.apache.org/licenses/LICENSE-2.0 #
13+
# #
14+
# Unless required by applicable law or agreed to in writing, software #
15+
# distributed under the License is distributed on an "AS IS" BASIS, #
16+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
17+
# See the License for the specific language governing permissions and #
18+
# limitations under the License. #
19+
# #
20+
# SPDX-License-Identifier: Apache-2.0 #
21+
# ==================================================================================================================== #
22+
name: Code Quality Checking
23+
24+
on:
25+
workflow_call:
26+
inputs:
27+
ubuntu_image_version:
28+
description: 'Ubuntu image version.'
29+
required: false
30+
default: '24.04'
31+
type: string
32+
python_version:
33+
description: 'Python version.'
34+
required: false
35+
default: '3.13'
36+
type: string
37+
package_directory:
38+
description: 'The package''s directory'
39+
required: true
40+
type: string
41+
requirements:
42+
description: 'Python dependencies to be installed through pip.'
43+
required: false
44+
default: '-r requirements.txt'
45+
type: string
46+
bandit:
47+
description: 'Run bandit checks.'
48+
required: false
49+
default: 'true'
50+
type: string
51+
radon:
52+
description: 'Run radon checks.'
53+
required: false
54+
default: 'true'
55+
type: string
56+
pylint:
57+
description: 'Run pylint checks.'
58+
required: false
59+
default: 'true'
60+
type: string
61+
artifact:
62+
description: 'Name of the package artifact.'
63+
required: true
64+
type: string
65+
66+
jobs:
67+
Bandit:
68+
name: 🚨 Security Scanning (Bandit)
69+
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
70+
if: inputs.bandit == 'true'
71+
72+
steps:
73+
- name: ⏬ Checkout repository
74+
uses: actions/checkout@v5
75+
with:
76+
lfs: true
77+
submodules: true
78+
79+
- name: 🐍 Setup Python ${{ inputs.python_version }}
80+
uses: actions/setup-python@v6
81+
with:
82+
python-version: ${{ inputs.python_version }}
83+
84+
- name: ⚙ Install dependencies for running bandit
85+
run: python -m pip install --disable-pip-version-check bandit
86+
87+
- name: 👮 Bandit
88+
id: bandit
89+
if: inputs.artifact != ''
90+
run: |
91+
set +e
92+
93+
ANSI_LIGHT_RED=$'\x1b[91m'
94+
ANSI_LIGHT_GREEN=$'\x1b[92m'
95+
ANSI_LIGHT_BLUE=$'\x1b[94m'
96+
ANSI_NOCOLOR=$'\x1b[0m'
97+
98+
bandit_directory=report/bandit
99+
bandit_fullpath=report/bandit/report.xml
100+
101+
tee "${GITHUB_OUTPUT}" <<EOF
102+
bandit_directory=${bandit_directory}
103+
bandit_fullpath=${bandit_fullpath}
104+
EOF
105+
106+
mkdir -p ${bandit_directory}
107+
printf "\nRun bandit ...\n"
108+
bandit -c pyproject.toml -r ${{ inputs.package_directory }} -f xml -o ${bandit_fullpath}
109+
if [[ $? -eq 0 ]]; then
110+
printf "Bandit result: ${ANSI_LIGHT_GREEN}[PASSED]${ANSI_NOCOLOR}\n"
111+
112+
printf "bandit_passed=true\n" >> "${GITHUB_OUTPUT}"
113+
else
114+
faults=$(grep -Poh '(?<=<testsuite\sname="bandit"\stests=")(\d+)(?=">)' ${bandit_fullpath})
115+
116+
printf "Bandit result: ${ANSI_LIGHT_RED}[FAILED]${ANSI_NOCOLOR}\n"
117+
printf " ${ANSI_LIGHT_RED}Bandit found %s issues.${ANSI_NOCOLOR}\n" "${faults}"
118+
printf "::error title=%s::%s\n" "🚨 Security Scanning (Bandit)" "Bandi found ${faults} issues."
119+
120+
printf "bandit_passed=false\n" >> "${GITHUB_OUTPUT}"
121+
122+
printf "::group::${ANSI_LIGHT_BLUE}JUnit XML report created by Bandit ...${ANSI_NOCOLOR}\n"
123+
cat ${bandit_fullpath}
124+
printf "\n::endgroup::\n"
125+
fi
126+
127+
- name: 📊 Publish Bandit Results
128+
uses: dorny/test-reporter@v2
129+
if: steps.bandit.outputs.bandit_passed == 'false'
130+
continue-on-error: true
131+
with:
132+
name: 'Bandit Results'
133+
path: ${{ steps.bandit.outputs.bandit_fullpath }}
134+
reporter: java-junit
135+
136+
Radon:
137+
name: ☢️ Metrics and Complexity
138+
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
139+
if: inputs.radon == 'true'
140+
141+
steps:
142+
- name: ⏬ Checkout repository
143+
uses: actions/checkout@v5
144+
with:
145+
lfs: true
146+
submodules: true
147+
148+
- name: 🐍 Setup Python ${{ inputs.python_version }}
149+
uses: actions/setup-python@v6
150+
with:
151+
python-version: ${{ inputs.python_version }}
152+
153+
- name: ⚙ Install dependencies for running radon
154+
run: python -m pip install --disable-pip-version-check radon
155+
156+
- name: Code Metrics
157+
# if: inputs.artifact != ''
158+
run: |
159+
radon raw ${{ inputs.package_directory }} -s
160+
161+
- name: Code Complexity
162+
# if: inputs.artifact != ''
163+
run: |
164+
radon cc ${{ inputs.package_directory }} --total-average
165+
166+
- name: Halstead Complexity Metrics
167+
# if: inputs.artifact != ''
168+
run: |
169+
radon hal ${{ inputs.package_directory }}
170+
171+
- name: Maintainability Index
172+
# if: inputs.artifact != ''
173+
run: |
174+
radon mi ${{ inputs.package_directory }} -s
175+
176+
PyLint:
177+
name: 🩺 Linting
178+
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
179+
if: inputs.pylint == 'true'
180+
181+
steps:
182+
- name: ⏬ Checkout repository
183+
uses: actions/checkout@v5
184+
with:
185+
lfs: true
186+
submodules: true
187+
188+
- name: 🐍 Setup Python ${{ inputs.python_version }}
189+
uses: actions/setup-python@v6
190+
with:
191+
python-version: ${{ inputs.python_version }}
192+
193+
- name: ⚙ Install dependencies for running PyLint
194+
run: |
195+
python -m pip install --disable-pip-version-check pylint
196+
python -m pip install --disable-pip-version-check ${{ inputs.requirements }}
197+
198+
- name: 🩺 PyLint
199+
# if: inputs.artifact != ''
200+
run: |
201+
pylint ${{ inputs.package_directory }}

.github/workflows/CheckDocumentation.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ on:
4141
fail_under:
4242
description: 'Minimum required documentation coverage level'
4343
required: false
44-
default: 80
44+
default: '80'
4545
type: string
4646

4747
jobs:
@@ -53,11 +53,11 @@ jobs:
5353
uses: actions/checkout@v5
5454

5555
- name: 🐍 Setup Python ${{ inputs.python_version }}
56-
uses: actions/setup-python@v5
56+
uses: actions/setup-python@v6
5757
with:
5858
python-version: ${{ inputs.python_version }}
5959

60-
- name: 🔧 Install wheel,tomli and pip dependencies (native)
60+
- name: 🔧 Install docstr_coverage and interrogate dependencies
6161
run: |
6262
python -m pip install --disable-pip-version-check -U docstr_coverage interrogate[png]
6363
@@ -80,4 +80,3 @@ jobs:
8080
if [[ $? -ne 0 ]]; then
8181
printf "%s\n" "::error title=docstr-coverage::Insufficient documentation quality (goal: ${{ inputs.fail_under }})"
8282
fi
83-

0 commit comments

Comments
 (0)