Skip to content

Commit 5d8a608

Browse files
committed
v4.0.0
2 parents 9ceefdb + c3b7b3c commit 5d8a608

29 files changed

+583
-344
lines changed

.github/dependabot.yml

-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ updates:
1010
- Dependencies
1111
assignees:
1212
- Paebbels
13-
- umarcor
1413
reviewers:
1514
- Paebbels
16-
- umarcor
1715
schedule:
1816
interval: "daily" # Checks on Monday trough Friday.

.github/workflows/ApplicationTesting.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@ jobs:
231231
cd "${{ inputs.root_directory || '.' }}"
232232
[ -n '${{ inputs.apptest_xml_artifact }}' ] && PYTEST_ARGS='--junitxml=report/unit/TestReportSummary.xml' || unset PYTEST_ARGS
233233
if [ -n '${{ inputs.coverage_config }}' ]; then
234-
echo "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}"
234+
printf "%s\n" "coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}"
235235
coverage run --data-file=.coverage --rcfile=pyproject.toml -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}
236236
else
237-
echo "python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}"
237+
printf "%s\n" "python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}"
238238
python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}
239239
fi
240240

.github/workflows/BuildTheDocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: '❗ Deprecation message'
41-
run: echo "::warning title=Deprecated::'BuildTheDocs.yml' is not maintained anymore. Please switch to 'SphinxDocumentation.yml', 'LaTeXDocumentation.yml' and 'ExtractConfiguration.yml'."
41+
run: printf "%s\n" "::warning title=Deprecated::'BuildTheDocs.yml' is not maintained anymore. Please switch to 'SphinxDocumentation.yml', 'LaTeXDocumentation.yml' and 'ExtractConfiguration.yml'."
4242

4343
- name: ⏬ Checkout repository
4444
uses: actions/checkout@v4

.github/workflows/CheckDocumentation.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ jobs:
5959

6060
- name: 🔧 Install wheel,tomli and pip dependencies (native)
6161
run: |
62-
python -m pip install --disable-pip-version-check -U docstr_coverage interrogate
62+
python -m pip install --disable-pip-version-check -U docstr_coverage interrogate[png]
6363
6464
- name: Run 'interrogate' Documentation Coverage Check
6565
continue-on-error: true
6666
run: |
67-
interrogate -c pyproject.toml --fail-under=${{ inputs.fail_under }} && echo "::error title=interrogate::Insufficient documentation quality (goal: ${{ inputs.fail_under }})"
67+
interrogate -c pyproject.toml --fail-under=${{ inputs.fail_under }} && printf "%s\n" "::error title=interrogate::Insufficient documentation quality (goal: ${{ inputs.fail_under }})"
6868
6969
- name: Run 'docstr_coverage' Documentation Coverage Check
7070
continue-on-error: true
7171
run: |
72-
docstr-coverage -v 2 --fail-under=${{ inputs.fail_under }} ${{ inputs.directory }} && echo "::error title=docstr-coverage::Insufficient documentation quality (goal: ${{ inputs.fail_under }})"
72+
docstr-coverage -v 2 --fail-under=${{ inputs.fail_under }} ${{ inputs.directory }} && printf "%s\n" "::error title=docstr-coverage::Insufficient documentation quality (goal: ${{ inputs.fail_under }})"

.github/workflows/CompletePipeline.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,17 @@ jobs:
135135
UnitTesting:
136136
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@main
137137
needs:
138+
- ConfigParams
138139
- UnitTestingParams
139140
with:
140141
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
141142
requirements: "-r tests/unit/requirements.txt"
142143
# pacboy: "msys/git python-lxml:p"
143-
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
144-
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
144+
unittest_report_xml_directory: ${{ needs.ConfigParams.outputs.unittest_report_xml_directory }}
145+
unittest_report_xml_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }}
146+
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
147+
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
148+
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
145149

146150
StaticTypeCheck:
147151
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@main
@@ -205,6 +209,7 @@ jobs:
205209
- UnitTestingParams
206210
- UnitTesting
207211
with:
212+
additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"'
208213
merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
209214

210215
# VerifyDocs:

.github/workflows/CoverageCollection.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272

7373
steps:
7474
- name: '❗ Deprecation message'
75-
run: echo "::warning title=Deprecated::'CoverageCollection.yml' is not maintained anymore. Please switch to 'UnitTesting.yml', 'PublishCoverageResults.yml' and 'PublishTestResults.yml'."
75+
run: printf "%s\n" "::warning title=Deprecated::'CoverageCollection.yml' is not maintained anymore. Please switch to 'UnitTesting.yml', 'PublishCoverageResults.yml' and 'PublishTestResults.yml'."
7676

7777
- name: ⏬ Checkout repository
7878
uses: actions/checkout@v4
@@ -150,7 +150,7 @@ jobs:
150150
ABSDIR=$(pwd)
151151
cd "${{ inputs.tests_directory || '.' }}"
152152
[ -n '${{ inputs.coverage_config }}' ] && PYCOV_ARGS="--cov-config=${ABSDIR}/${{ inputs.coverage_config }}" || unset PYCOV_ARGS
153-
echo "python -m pytest -rA --cov=${ABSDIR} ${PYCOV_ARGS} ${{ inputs.unittest_directory }} --color=yes"
153+
printf "%s\n" "python -m pytest -rA --cov=${ABSDIR} ${PYCOV_ARGS} ${{ inputs.unittest_directory }} --color=yes"
154154
python -m pytest -rA --cov=${ABSDIR} $PYCOV_ARGS ${{ inputs.unittest_directory }} --color=yes
155155
156156
- name: Convert to cobertura format

.github/workflows/ExtractConfiguration.yml

+43-16
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,33 @@ on:
5959
mypy_prepare_command:
6060
description: ""
6161
value: ${{ jobs.Extract.outputs.mypy_prepare_command }}
62+
unittest_report_xml_directory:
63+
description: ""
64+
value: ${{ jobs.Extract.outputs.unittest_report_xml_directory }}
65+
unittest_report_xml_filename:
66+
description: ""
67+
value: ${{ jobs.Extract.outputs.unittest_report_xml_filename }}
68+
unittest_report_xml:
69+
description: ""
70+
value: ${{ jobs.Extract.outputs.unittest_report_xml }}
6271
coverage_report_html_directory:
6372
description: ""
6473
value: ${{ jobs.Extract.outputs.coverage_report_html_directory }}
6574
coverage_report_xml_directory:
6675
description: ""
6776
value: ${{ jobs.Extract.outputs.coverage_report_xml_directory }}
77+
coverage_report_xml_filename:
78+
description: ""
79+
value: ${{ jobs.Extract.outputs.coverage_report_xml_filename }}
6880
coverage_report_xml:
6981
description: ""
7082
value: ${{ jobs.Extract.outputs.coverage_report_xml }}
7183
coverage_report_json_directory:
7284
description: ""
7385
value: ${{ jobs.Extract.outputs.coverage_report_json_directory }}
86+
coverage_report_json_filename:
87+
description: ""
88+
value: ${{ jobs.Extract.outputs.coverage_report_json_filename }}
7489
coverage_report_json:
7590
description: ""
7691
value: ${{ jobs.Extract.outputs.coverage_report_json }}
@@ -83,10 +98,15 @@ jobs:
8398
package_fullname: ${{ steps.getPackageName.outputs.package_fullname }}
8499
package_directory: ${{ steps.getPackageName.outputs.package_directory }}
85100
mypy_prepare_command: ${{ steps.getPackageName.outputs.mypy_prepare_command }}
101+
unittest_report_xml_directory: ${{ steps.getVariables.outputs.unittest_report_xml_directory }}
102+
unittest_report_xml_filename: ${{ steps.getVariables.outputs.unittest_report_xml_filename }}
103+
unittest_report_xml: ${{ steps.getVariables.outputs.unittest_report_xml }}
86104
coverage_report_html_directory: ${{ steps.getVariables.outputs.coverage_report_html_directory }}
87105
coverage_report_xml_directory: ${{ steps.getVariables.outputs.coverage_report_xml_directory }}
106+
coverage_report_xml_filename: ${{ steps.getVariables.outputs.coverage_report_xml_filename }}
88107
coverage_report_xml: ${{ steps.getVariables.outputs.coverage_report_xml }}
89108
coverage_report_json_directory: ${{ steps.getVariables.outputs.coverage_report_json_directory }}
109+
coverage_report_json_filename: ${{ steps.getVariables.outputs.coverage_report_json_filename }}
90110
coverage_report_json: ${{ steps.getVariables.outputs.coverage_report_json }}
91111

92112
steps:
@@ -144,10 +164,11 @@ jobs:
144164
145165
from tomli import load as tomli_load
146166
147-
htmlDirectory = Path("htmlcov")
148-
xmlFile = Path("./coverage.xml")
149-
jsonFile = Path("./coverage.json")
150-
coverageRC = "${{ inputs.coverage_config }}".strip()
167+
unittestXMLFile = Path("./unittest.xml")
168+
coverageHTMLDirectory = Path("htmlcov")
169+
coverageXMLFile = Path("./coverage.xml")
170+
coverageJSONFile = Path("./coverage.json")
171+
coverageRC = "${{ inputs.coverage_config }}".strip()
151172
152173
# Read output paths from 'pyproject.toml' file
153174
if coverageRC == "pyproject.toml":
@@ -156,9 +177,10 @@ jobs:
156177
with pyProjectFile.open("rb") as file:
157178
pyProjectSettings = tomli_load(file)
158179
159-
htmlDirectory = Path(pyProjectSettings["tool"]["coverage"]["html"]["directory"])
160-
xmlFile = Path(pyProjectSettings["tool"]["coverage"]["xml"]["output"])
161-
jsonFile = Path(pyProjectSettings["tool"]["coverage"]["json"]["output"])
180+
unittestXMLFile = Path(pyProjectSettings["tool"]["pytest"]["junit_xml"])
181+
coverageHTMLDirectory = Path(pyProjectSettings["tool"]["coverage"]["html"]["directory"])
182+
coverageXMLFile = Path(pyProjectSettings["tool"]["coverage"]["xml"]["output"])
183+
coverageJSONFile= Path(pyProjectSettings["tool"]["coverage"]["json"]["output"])
162184
else:
163185
print(f"File '{pyProjectFile}' not found.")
164186
print(f"::error title=FileNotFoundError::File '{pyProjectFile}' not found.")
@@ -171,9 +193,9 @@ jobs:
171193
with coverageRCFile.open("rb") as file:
172194
coverageRCSettings = tomli_load(file)
173195
174-
htmlDirectory = Path(coverageRCSettings["html"]["directory"])
175-
xmlFile = Path(coverageRCSettings["xml"]["output"])
176-
jsonFile = Path(coverageRCSettings["json"]["output"])
196+
coverageHTMLDirectory = Path(coverageRCSettings["html"]["directory"])
197+
coverageXMLFile = Path(coverageRCSettings["xml"]["output"])
198+
coverageJSONFile = Path(coverageRCSettings["json"]["output"])
177199
else:
178200
print(f"File '{coverageRCFile}' not found.")
179201
print(f"::error title=FileNotFoundError::File '{coverageRCFile}' not found.")
@@ -184,11 +206,16 @@ jobs:
184206
print(f"GITHUB_OUTPUT: {github_output}")
185207
with github_output.open("a+", encoding="utf-8") as f:
186208
f.write(dedent(f"""\
187-
coverage_report_html_directory={htmlDirectory.as_posix()}
188-
coverage_report_xml_directory={xmlFile.parent.as_posix()}
189-
coverage_report_xml={xmlFile.as_posix()}
190-
coverage_report_json_directory={jsonFile.parent.as_posix()}
191-
coverage_report_json={jsonFile.as_posix()}
209+
unittest_report_xml_directory={unittestXMLFile.parent.as_posix()}
210+
unittest_report_xml_filename={unittestXMLFile.name}
211+
unittest_report_xml={unittestXMLFile.as_posix()}
212+
coverage_report_html_directory={coverageHTMLDirectory.as_posix()}
213+
coverage_report_xml_directory={coverageXMLFile.parent.as_posix()}
214+
coverage_report_xml_filename={coverageXMLFile.name}
215+
coverage_report_xml={coverageXMLFile.as_posix()}
216+
coverage_report_json_directory={coverageJSONFile.parent.as_posix()}
217+
coverage_report_json_filename={coverageJSONFile.name}
218+
coverage_report_json={coverageJSONFile.as_posix()}
192219
"""))
193220
194-
print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}\n json={jsonFile}")
221+
print(f"DEBUG:\n unittest xml: {unittestXMLFile}\n coverage html: {coverageHTMLDirectory}\n coverage xml: {coverageXMLFile}\n coverage json: {coverageJSONFile}")

.github/workflows/LaTeXDocumentation.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,28 @@ jobs:
5555
name: ${{ inputs.latex_artifact }}
5656
path: latex
5757

58-
- name: Compile LaTeX document
59-
uses: xu-cheng/latex-action@master
58+
- name: Debug
59+
run: |
60+
tree -pash .
61+
62+
- name: Build LaTeX document using 'pytooling/miktex:sphinx'
63+
uses: addnab/docker-run-action@v3
6064
with:
61-
working_directory: latex
62-
root_file: ${{ inputs.document }}.tex
65+
image: pytooling/miktex:sphinx
66+
options: -v ${{ github.workspace }}/latex:/latex --workdir /latex
67+
run: |
68+
which pdflatex
69+
pwd
70+
ls -lAh
71+
72+
latexmk -xelatex ${{ inputs.document }}.tex
6373
6474
- name: 📤 Upload 'PDF Documentation' artifact
6575
uses: pyTooling/upload-artifact@v4
6676
if: inputs.pdf_artifact != ''
6777
with:
6878
name: ${{ inputs.pdf_artifact }}
79+
working-directory: latex
6980
path: ${{ inputs.document }}.pdf
7081
if-no-files-found: error
7182
retention-days: 1

0 commit comments

Comments
 (0)