Sphinx Documentation

This commit is contained in:
Patrick Lehmann
2024-11-03 14:07:34 +01:00
committed by GitHub
20 changed files with 349 additions and 120 deletions

View File

@@ -25,6 +25,11 @@ name: ArtifactCleanUp
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
package: package:
description: 'Artifacts to be removed on not tagged runs.' description: 'Artifacts to be removed on not tagged runs.'
required: true required: true
@@ -38,7 +43,7 @@ on:
jobs: jobs:
ArtifactCleanUp: ArtifactCleanUp:
name: 🗑️ Artifact Cleanup name: 🗑️ Artifact Cleanup
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: 🗑️ Delete package Artifacts - name: 🗑️ Delete package Artifacts

View File

@@ -37,6 +37,9 @@ jobs:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- name: '❗ Deprecation message'
run: echo "::warning title=Deprecated::'BuildTheDocs.yml' is not maintained anymore. Please switch to 'SphinxDocumentation.yml', 'LaTeXDocumentation.yml' and 'ExtractConfiguration.yml'."
- name: ⏬ Checkout repository - name: ⏬ Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@@ -24,6 +24,11 @@ name: Check Documentation
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
python_version: python_version:
description: 'Python version.' description: 'Python version.'
required: false required: false
@@ -42,7 +47,7 @@ on:
jobs: jobs:
DocCoverage: DocCoverage:
name: 👀 Check documentation coverage name: 👀 Check documentation coverage
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: ⏬ Checkout repository - name: ⏬ Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@@ -25,6 +25,11 @@ name: Coverage Collection
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
python_version: python_version:
description: 'Python version.' description: 'Python version.'
required: false required: false
@@ -63,9 +68,12 @@ jobs:
Coverage: Coverage:
name: 📈 Collect Coverage Data using Python ${{ inputs.python_version }} name: 📈 Collect Coverage Data using Python ${{ inputs.python_version }}
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: '❗ Deprecation message'
run: echo "::warning title=Deprecated::'CoverageCollection.yml' is not maintained anymore. Please switch to 'UnitTesting.yml', 'PublishCoverageResults.yml' and 'PublishTestResults.yml'."
- name: ⏬ Checkout repository - name: ⏬ Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@@ -0,0 +1,144 @@
# ==================================================================================================================== #
# Authors: #
# Patrick Lehmann #
# #
# ==================================================================================================================== #
# Copyright 2020-2024 The pyTooling Authors #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# You may obtain a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
# #
# SPDX-License-Identifier: Apache-2.0 #
# ==================================================================================================================== #
name: Extract Configuration
on:
workflow_call:
inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
python_version:
description: 'Python version.'
required: false
default: '3.12'
type: string
coverage_config:
description: 'Path to the .coveragerc file. Use pyproject.toml by default.'
required: false
default: 'pyproject.toml'
type: string
outputs:
coverage_report_html_directory:
description: ""
value: ${{ jobs.Extract.outputs.coverage_report_html_directory }}
coverage_report_xml_directory:
description: ""
value: ${{ jobs.Extract.outputs.coverage_report_xml_directory }}
coverage_report_xml:
description: ""
value: ${{ jobs.Extract.outputs.coverage_report_xml }}
coverage_report_json_directory:
description: ""
value: ${{ jobs.Extract.outputs.coverage_report_json_directory }}
coverage_report_json:
description: ""
value: ${{ jobs.Extract.outputs.coverage_report_json }}
jobs:
Extract:
name: 📓 Extract configurations from pyproject.toml
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
outputs:
coverage_report_html_directory: ${{ steps.getVariables.outputs.coverage_report_html_directory }}
coverage_report_xml_directory: ${{ steps.getVariables.outputs.coverage_report_xml_directory }}
coverage_report_xml: ${{ steps.getVariables.outputs.coverage_report_xml }}
coverage_report_json_directory: ${{ steps.getVariables.outputs.coverage_report_json_directory }}
coverage_report_json: ${{ steps.getVariables.outputs.coverage_report_json }}
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
- name: 🐍 Setup Python ${{ inputs.python_version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
- name: 🔧 Install wheel,tomli and pip dependencies (native)
run: |
python -m pip install --disable-pip-version-check -U wheel tomli
- name: 🔁 Extract configurations from pyproject.toml
id: getVariables
shell: python
run: |
from os import getenv
from pathlib import Path
from sys import version
from textwrap import dedent
print(f"Python: {version}")
from tomli import load as tomli_load
htmlDirectory = Path("htmlcov")
xmlFile = Path("./coverage.xml")
jsonFile = Path("./coverage.json")
coverageRC = "${{ inputs.coverage_config }}".strip()
# Read output paths from 'pyproject.toml' file
if coverageRC == "pyproject.toml":
pyProjectFile = Path("pyproject.toml")
if pyProjectFile.exists():
with pyProjectFile.open("rb") as file:
pyProjectSettings = tomli_load(file)
htmlDirectory = Path(pyProjectSettings["tool"]["coverage"]["html"]["directory"])
xmlFile = Path(pyProjectSettings["tool"]["coverage"]["xml"]["output"])
jsonFile = Path(pyProjectSettings["tool"]["coverage"]["json"]["output"])
else:
print(f"File '{pyProjectFile}' not found.")
print(f"::error title=FileNotFoundError::File '{pyProjectFile}' not found.")
exit(1)
# Read output paths from '.coveragerc' file
elif len(coverageRC) > 0:
coverageRCFile = Path(coverageRC)
if coverageRCFile.exists():
with coverageRCFile.open("rb") as file:
coverageRCSettings = tomli_load(file)
htmlDirectory = Path(coverageRCSettings["html"]["directory"])
xmlFile = Path(coverageRCSettings["xml"]["output"])
jsonFile = Path(coverageRCSettings["json"]["output"])
else:
print(f"File '{coverageRCFile}' not found.")
print(f"::error title=FileNotFoundError::File '{coverageRCFile}' not found.")
exit(1)
# Write jobs to special file
github_output = Path(getenv("GITHUB_OUTPUT"))
print(f"GITHUB_OUTPUT: {github_output}")
with github_output.open("a+", encoding="utf-8") as f:
f.write(dedent(f"""\
coverage_report_html_directory={htmlDirectory.as_posix()}
coverage_report_xml_directory={xmlFile.parent.as_posix()}
coverage_report_xml={xmlFile.as_posix()}
coverage_report_json_directory={jsonFile.parent.as_posix()}
coverage_report_json={jsonFile.as_posix()}
"""))
print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}\n json={jsonFile}")

View File

@@ -24,6 +24,11 @@ name: Intermediate Cleanup
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
sqlite_coverage_artifacts_prefix: sqlite_coverage_artifacts_prefix:
description: 'Prefix for SQLite coverage artifacts' description: 'Prefix for SQLite coverage artifacts'
required: false required: false
@@ -36,7 +41,7 @@ on:
jobs: jobs:
IntermediateCleanUp: IntermediateCleanUp:
name: 🗑️ Intermediate Artifact Cleanup name: 🗑️ Intermediate Artifact Cleanup
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: 🗑️ Delete SQLite coverage artifacts from matrix jobs - name: 🗑️ Delete SQLite coverage artifacts from matrix jobs
uses: geekyeggo/delete-artifact@v5 uses: geekyeggo/delete-artifact@v5

View File

@@ -24,6 +24,11 @@ name: LaTeX Documentation
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
document: document:
description: 'LaTeX root document without *.tex extension.' description: 'LaTeX root document without *.tex extension.'
required: true required: true
@@ -42,7 +47,7 @@ on:
jobs: jobs:
PDFDocumentation: PDFDocumentation:
name: 📓 Converting LaTeX Documentation to PDF name: 📓 Converting LaTeX Documentation to PDF
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: 📥 Download artifacts '${{ inputs.latex_artifact }}' from 'SphinxDocumentation' job - name: 📥 Download artifacts '${{ inputs.latex_artifact }}' from 'SphinxDocumentation' job
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4

View File

@@ -25,6 +25,11 @@ name: Package
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
python_version: python_version:
description: 'Python version.' description: 'Python version.'
required: false required: false
@@ -44,7 +49,7 @@ jobs:
Package: Package:
name: 📦 Package in Source and Wheel Format name: 📦 Package in Source and Wheel Format
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: ⏬ Checkout repository - name: ⏬ Checkout repository

View File

@@ -25,6 +25,11 @@ name: Parameters
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
name: name:
description: 'Name of the tool.' description: 'Name of the tool.'
required: true required: true
@@ -96,7 +101,8 @@ on:
jobs: jobs:
Parameters: Parameters:
runs-on: ubuntu-24.04 name: ✎ Generate pipeline parameters
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
outputs: outputs:
python_version: ${{ steps.params.outputs.python_version }} python_version: ${{ steps.params.outputs.python_version }}
python_jobs: ${{ steps.params.outputs.python_jobs }} python_jobs: ${{ steps.params.outputs.python_jobs }}

View File

@@ -24,6 +24,11 @@ name: Publish Code Coverage Results
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
coverage_config: coverage_config:
description: 'Path to the .coveragerc file. Use pyproject.toml by default.' description: 'Path to the .coveragerc file. Use pyproject.toml by default.'
required: false required: false
@@ -57,7 +62,7 @@ on:
jobs: jobs:
PublishCoverageResults: PublishCoverageResults:
name: 📊 Publish Code Coverage Results name: 📊 Publish Code Coverage Results
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
if: always() if: always()
steps: steps:

View File

@@ -25,6 +25,11 @@ name: Publish on PyPI
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
python_version: python_version:
description: 'Python version.' description: 'Python version.'
required: false required: false
@@ -48,7 +53,7 @@ jobs:
PublishOnPyPI: PublishOnPyPI:
name: 🚀 Publish to PyPI name: 🚀 Publish to PyPI
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: 📥 Download artifacts '${{ inputs.artifact }}' from 'Package' job - name: 📥 Download artifacts '${{ inputs.artifact }}' from 'Package' job

View File

@@ -25,6 +25,11 @@ name: Publish Unit Test Results
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
merged_junit_artifact: merged_junit_artifact:
description: 'Name of the merged JUnit Test Summary artifact.' description: 'Name of the merged JUnit Test Summary artifact.'
required: false required: false
@@ -44,7 +49,7 @@ on:
jobs: jobs:
PublishTestResults: PublishTestResults:
name: 📊 Publish Test Results name: 📊 Publish Test Results
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
if: always() if: always()
steps: steps:

View File

@@ -25,6 +25,11 @@ name: Publish to GitHub Pages
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
doc: doc:
description: 'Name of the documentation artifact.' description: 'Name of the documentation artifact.'
required: true required: true
@@ -44,7 +49,7 @@ jobs:
PublishToGitHubPages: PublishToGitHubPages:
name: 📚 Publish to GH-Pages name: 📚 Publish to GH-Pages
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: ⏬ Checkout repository - name: ⏬ Checkout repository

View File

@@ -24,12 +24,17 @@ name: Release
on: on:
workflow_call: workflow_call:
inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
jobs: jobs:
Release: Release:
name: 📝 Create 'Release Page' on GitHub name: 📝 Create 'Release Page' on GitHub
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: 🔁 Extract Git tag from GITHUB_REF - name: 🔁 Extract Git tag from GITHUB_REF

View File

@@ -24,6 +24,11 @@ name: Documentation
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
python_version: python_version:
description: 'Python version.' description: 'Python version.'
required: false required: false
@@ -34,16 +39,15 @@ on:
required: false required: false
default: '-r doc/requirements.txt' default: '-r doc/requirements.txt'
type: string type: string
coverage_config:
description: 'Path to the .coveragerc file. Use pyproject.toml by default.'
required: false
default: 'pyproject.toml'
type: string
doc_directory: doc_directory:
description: 'Path to the directory containing documentation (Sphinx working directory).' description: 'Path to the directory containing documentation (Sphinx working directory).'
required: false required: false
default: 'doc' default: 'doc'
type: string type: string
coverage_report_json_directory:
description: ''
required: true
type: string
coverage_json_artifact: coverage_json_artifact:
description: 'Name of the coverage JSON artifact.' description: 'Name of the coverage JSON artifact.'
required: false required: false
@@ -71,9 +75,9 @@ on:
type: string type: string
jobs: jobs:
Sphinx: Sphinx-HTML:
name: 📓 Documentation generation using Sphinx and Python ${{ inputs.python_version }} name: 📓 HTML Documentation using Sphinx and Python ${{ inputs.python_version }}
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: ⏬ Checkout repository - name: ⏬ Checkout repository
@@ -89,71 +93,9 @@ jobs:
- name: 🔧 Install wheel,tomli and pip dependencies (native) - name: 🔧 Install wheel,tomli and pip dependencies (native)
run: | run: |
python -m pip install --disable-pip-version-check -U wheel tomli python -m pip install --disable-pip-version-check -U wheel
python -m pip install --disable-pip-version-check ${{ inputs.requirements }} python -m pip install --disable-pip-version-check ${{ inputs.requirements }}
- name: 🔁 Extract configurations from pyproject.toml
id: getVariables
shell: python
run: |
from os import getenv
from pathlib import Path
from sys import version
from textwrap import dedent
print(f"Python: {version}")
from tomli import load as tomli_load
htmlDirectory = Path("htmlcov")
xmlFile = Path("./coverage.xml")
jsonFile = Path("./coverage.json")
coverageRC = "${{ inputs.coverage_config }}".strip()
# Read output paths from 'pyproject.toml' file
if coverageRC == "pyproject.toml":
pyProjectFile = Path("pyproject.toml")
if pyProjectFile.exists():
with pyProjectFile.open("rb") as file:
pyProjectSettings = tomli_load(file)
htmlDirectory = Path(pyProjectSettings["tool"]["coverage"]["html"]["directory"])
xmlFile = Path(pyProjectSettings["tool"]["coverage"]["xml"]["output"])
jsonFile = Path(pyProjectSettings["tool"]["coverage"]["json"]["output"])
else:
print(f"File '{pyProjectFile}' not found.")
print(f"::error title=FileNotFoundError::File '{pyProjectFile}' not found.")
exit(1)
# Read output paths from '.coveragerc' file
elif len(coverageRC) > 0:
coverageRCFile = Path(coverageRC)
if coverageRCFile.exists():
with coverageRCFile.open("rb") as file:
coverageRCSettings = tomli_load(file)
htmlDirectory = Path(coverageRCSettings["html"]["directory"])
xmlFile = Path(coverageRCSettings["xml"]["output"])
jsonFile = Path(coverageRCSettings["json"]["output"])
else:
print(f"File '{coverageRCFile}' not found.")
print(f"::error title=FileNotFoundError::File '{coverageRCFile}' not found.")
exit(1)
# Write jobs to special file
github_output = Path(getenv("GITHUB_OUTPUT"))
print(f"GITHUB_OUTPUT: {github_output}")
with github_output.open("a+", encoding="utf-8") as f:
f.write(dedent(f"""\
coverage_report_html_directory={htmlDirectory.as_posix()}
coverage_report_xml_directory={xmlFile.parent.as_posix()}
coverage_report_xml={xmlFile.as_posix()}
coverage_report_json_directory={jsonFile.parent.as_posix()}
coverage_report_json={jsonFile.as_posix()}
"""))
print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}\n json={jsonFile}")
- name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job - name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job
if: inputs.unittest_xml_artifact != '' if: inputs.unittest_xml_artifact != ''
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
@@ -166,7 +108,7 @@ jobs:
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: ${{ inputs.coverage_json_artifact }} name: ${{ inputs.coverage_json_artifact }}
path: ${{ steps.getVariables.outputs.coverage_report_json_directory }} path: ${{ inputs.coverage_report_json_directory }}
- name: ☑ Generate HTML documentation - name: ☑ Generate HTML documentation
if: inputs.html_artifact != '' if: inputs.html_artifact != ''
@@ -176,16 +118,6 @@ jobs:
cd "${{ inputs.doc_directory || '.' }}" cd "${{ inputs.doc_directory || '.' }}"
sphinx-build -v -n -b html -d _build/doctrees -j $(nproc) -w _build/html.log . _build/html sphinx-build -v -n -b html -d _build/doctrees -j $(nproc) -w _build/html.log . _build/html
- name: ☑ Generate LaTeX documentation
if: inputs.latex_artifact != ''
# continue-on-error: true
run: |
export PYTHONPATH=$(pwd)
cd "${{ inputs.doc_directory || '.' }}"
sphinx-build -v -n -b latex -d _build/doctrees -j $(nproc) -w _build/latex.log . _build/latex
# --builder html --doctree-dir _build/doctrees --verbose --fresh-env --write-all --nitpicky --warning-file _build/html.log . _build/html
- name: 📤 Upload 'HTML Documentation' artifact - name: 📤 Upload 'HTML Documentation' artifact
if: inputs.html_artifact != '' if: inputs.html_artifact != ''
continue-on-error: true continue-on-error: true
@@ -196,6 +128,51 @@ jobs:
if-no-files-found: error if-no-files-found: error
retention-days: 1 retention-days: 1
Sphinx-LaTeX:
name: 📓 LaTeX Documentation using Sphinx and Python ${{ inputs.python_version }}
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
- name: 🔧 Install graphviz
run: sudo apt-get install -y --no-install-recommends graphviz
- name: 🐍 Setup Python ${{ inputs.python_version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
- name: 🔧 Install wheel,tomli and pip dependencies (native)
run: |
python -m pip install --disable-pip-version-check -U wheel
python -m pip install --disable-pip-version-check ${{ inputs.requirements }}
- name: 📥 Download artifacts '${{ inputs.unittest_xml_artifact }}' from 'Unittesting' job
if: inputs.unittest_xml_artifact != ''
uses: actions/download-artifact@v4
with:
name: ${{ inputs.unittest_xml_artifact }}
path: ${{ inputs.unittest_xml_directory }}
- name: 📥 Download artifacts '${{ inputs.coverage_json_artifact }}' from 'PublishCoverageResults' job
if: inputs.coverage_json_artifact != ''
uses: actions/download-artifact@v4
with:
name: ${{ inputs.coverage_json_artifact }}
path: ${{ inputs.coverage_report_json_directory }}
- name: ☑ Generate LaTeX documentation
if: inputs.latex_artifact != ''
# continue-on-error: true
run: |
export PYTHONPATH=$(pwd)
cd "${{ inputs.doc_directory || '.' }}"
sphinx-build -v -n -b latex -d _build/doctrees -j $(nproc) -w _build/latex.log . _build/latex
# --builder html --doctree-dir _build/doctrees --verbose --fresh-env --write-all --nitpicky --warning-file _build/html.log . _build/html
- name: 📤 Upload 'LaTeX Documentation' artifact - name: 📤 Upload 'LaTeX Documentation' artifact
if: inputs.latex_artifact != '' if: inputs.latex_artifact != ''
continue-on-error: true continue-on-error: true

View File

@@ -25,6 +25,11 @@ name: Static Type Check
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
python_version: python_version:
description: 'Python version.' description: 'Python version.'
required: false required: false
@@ -63,7 +68,7 @@ jobs:
StaticTypeCheck: StaticTypeCheck:
name: 👀 Check Static Typing using Python ${{ inputs.python_version }} name: 👀 Check Static Typing using Python ${{ inputs.python_version }}
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: ⏬ Checkout repository - name: ⏬ Checkout repository

View File

@@ -25,6 +25,11 @@ name: Verify examples
on: on:
workflow_call: workflow_call:
inputs: inputs:
ubuntu_image_version:
description: 'Ubuntu image version.'
required: false
default: '24.04'
type: string
python_version: python_version:
description: 'Python version.' description: 'Python version.'
required: false required: false
@@ -35,7 +40,7 @@ jobs:
VerifyDocs: VerifyDocs:
name: 👍 Verify example snippets using Python ${{ inputs.python_version }} name: 👍 Verify example snippets using Python ${{ inputs.python_version }}
runs-on: ubuntu-24.04 runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
steps: steps:
- name: ⏬ Checkout repository - name: ⏬ Checkout repository

View File

@@ -9,7 +9,7 @@ jobs:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev
with: with:
name: pyDummy name: pyDummy
python_version_list: "3.8 3.9 3.10 3.11 3.12 3.13 pypy-3.8 pypy-3.9 pypy-3.10" python_version_list: "3.9 3.10 3.11 3.12 3.13 pypy-3.9 pypy-3.10"
# disable_list: "windows:pypy-3.10" # disable_list: "windows:pypy-3.10"
PlatformTestingParams: PlatformTestingParams:
@@ -68,6 +68,31 @@ jobs:
html_report: 'htmlmypy' html_report: 'htmlmypy'
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
DocCoverage:
uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@r1
needs:
- UnitTestingParams
with:
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
directory: sphinx_reports
# fail_below: 70
ConfigParams:
uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@dev
needs:
- DocCoverage
Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@dev
needs:
- UnitTestingParams
- UnitTesting
# - Coverage
- PlatformTesting
with:
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
PublishCoverageResults: PublishCoverageResults:
uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@dev uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@dev
needs: needs:
@@ -91,17 +116,6 @@ jobs:
with: with:
additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit;reduce-depth:pytest.tests.platform"' additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit;reduce-depth:pytest.tests.platform"'
Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@dev
needs:
- UnitTestingParams
- UnitTesting
# - Coverage
- PlatformTesting
with:
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
# VerifyDocs: # VerifyDocs:
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev # uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev
# needs: # needs:
@@ -109,23 +123,38 @@ jobs:
# with: # with:
# python_version: ${{ needs.UnitTestingParams.outputs.python_version }} # python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
HTMLDocumentation: Documentation:
uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@dev uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@dev
needs: needs:
- UnitTestingParams - UnitTestingParams
- ConfigParams
- PublishTestResults
- PublishCoverageResults
# - VerifyDocs # - VerifyDocs
with: with:
python_version: ${{ needs.UnitTestingParams.outputs.python_version }} python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
coverage_report_json_directory: ${{ needs.ConfigParams.outputs.coverage_report_json_directory }}
# unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} # unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
# coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }} # coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }} html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
PDFDocumentation: IntermediateCleanUp:
uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@r1 uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@r1
needs: needs:
- UnitTestingParams - UnitTestingParams
- HTMLDocumentation - PublishCoverageResults
- PublishTestResults
- Documentation
with:
sqlite_coverage_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-
xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-
PDFDocumentation:
uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@dev
needs:
- UnitTestingParams
- Documentation
with: with:
document: actions document: actions
latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }} latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
@@ -135,7 +164,7 @@ jobs:
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev
needs: needs:
- UnitTestingParams - UnitTestingParams
- HTMLDocumentation - Documentation
# - PDFDocumentation # - PDFDocumentation
# - Coverage # - Coverage
- PublishCoverageResults - PublishCoverageResults
@@ -176,13 +205,15 @@ jobs:
- UnitTestingParams - UnitTestingParams
- PlatformTestingParams - PlatformTestingParams
- UnitTesting - UnitTesting
- PlatformTesting
# - Coverage # - Coverage
- StaticTypeCheck - StaticTypeCheck
# - BuildTheDocs - PlatformTesting
- PublishToGitHubPages - Documentation
- PublishCoverageResults # - PDFDocumentation
- PublishTestResults - PublishTestResults
- PublishCoverageResults
- PublishToGitHubPages
- IntermediateCleanUp
with: with:
package: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} package: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
remaining: | remaining: |

View File

@@ -1,6 +1,6 @@
[build-system] [build-system]
requires = [ requires = [
"setuptools ~= 75.2", "setuptools ~= 75.3",
"wheel ~= 0.44", "wheel ~= 0.44",
"pyTooling ~= 7.0" "pyTooling ~= 7.0"
] ]

View File

@@ -5,7 +5,7 @@ Coverage ~= 7.6
# Test Runner # Test Runner
pytest ~= 8.3 pytest ~= 8.3
pytest-cov ~= 5.0 pytest-cov ~= 6.0
# Static Type Checking # Static Type Checking
mypy ~= 1.13 mypy ~= 1.13