Skip to content

Commit

Permalink
Merged Code Coverage and Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels authored Jan 13, 2024
2 parents 3ed3cc8 + 209f106 commit 907c0e2
Show file tree
Hide file tree
Showing 45 changed files with 1,371 additions and 363 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ApplicationTesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Unai Martinez-Corral #
# #
# ==================================================================================================================== #
# Copyright 2020-2023 The pyTooling Authors #
# 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. #
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
uses: actions/checkout@v4

- name: 📥 Download artifacts '${{ inputs.wheel }}' from 'Package' job
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.wheel }}
path: install
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
- name: 🐍 Setup Python ${{ matrix.python }}
if: matrix.system != 'msys2'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
- name: 📤 Upload 'TestReportSummary.xml' artifact
if: inputs.artifact != ''
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact }}-${{ matrix.system }}-${{ matrix.python }}
path: ${{ inputs.tests_directory || '.' }}/TestReportSummary.xml
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/ArtifactCleanUp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Unai Martinez-Corral #
# #
# ==================================================================================================================== #
# Copyright 2020-2023 The pyTooling Authors #
# 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. #
Expand Down Expand Up @@ -45,12 +45,14 @@ jobs:

- name: 🗑️ Delete package Artifacts
if: ${{ ! startsWith(github.ref, 'refs/tags') }}
uses: geekyeggo/delete-artifact@v2
uses: geekyeggo/delete-artifact@v4
with:
name: ${{ inputs.package }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: 🗑️ Delete remaining Artifacts
if: ${{ inputs.remaining != '' }}
uses: geekyeggo/delete-artifact@v2
uses: geekyeggo/delete-artifact@v4
with:
name: ${{ inputs.remaining }}
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/BuildTheDocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Unai Martinez-Corral #
# #
# ==================================================================================================================== #
# Copyright 2020-2023 The pyTooling Authors #
# 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. #
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:

- name: 📤 Upload 'documentation' artifacts
if: inputs.artifact != ''
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact }}
path: doc/_build/html
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/CheckDocumentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# ==================================================================================================================== #
# 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: Check Documentation

on:
workflow_call:
inputs:
python_version:
description: 'Python version.'
required: false
default: '3.12'
type: string
directory:
description: 'Source code directory to check.'
required: true
type: string
# fail_below:
# description: 'Minimum required documentation coverage level'
# required: false
# default: 75
# type: string

jobs:
DocCoverage:
name: 👀 Check documentation coverage
runs-on: ubuntu-latest
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4

- name: 🐍 Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: 🔧 Install wheel,tomli and pip dependencies (native)
run: |
python -m pip install --disable-pip-version-check -U docstr_coverage interrogate
- name: Run 'interrogate' Documentation Coverage Check
continue-on-error: true
run: |
interrogate -c pyproject.toml
- name: Run 'docstr_coverage' Documentation Coverage Check
continue-on-error: true
run: |
docstr_coverage -v ${{ inputs.directory }}
6 changes: 3 additions & 3 deletions .github/workflows/CoverageCollection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Unai Martinez-Corral #
# #
# ==================================================================================================================== #
# Copyright 2020-2023 The pyTooling Authors #
# 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. #
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
uses: actions/checkout@v4

- name: 🐍 Setup Python ${{ inputs.python_version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}

Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
- name: 📤 Upload 'Coverage Report' artifact
continue-on-error: true
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact }}
path: ${{ steps.getVariables.outputs.coverage_report_html_directory }}
Expand Down
52 changes: 35 additions & 17 deletions Actions/__init__.py → .github/workflows/IntermediateCleanUp.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# ==================================================================================================================== #
# _____ _ _ _ _ _ #
# _ __ _ |_ _|__ ___ | (_)_ __ __ _ / \ ___| |_(_) ___ _ __ ___ #
# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | / _ \ / __| __| |/ _ \| '_ \/ __| #
# | |_) | |_| || | (_) | (_) | | | | | | (_| |_ / ___ \ (__| |_| | (_) | | | \__ \ #
# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)_/ \_\___|\__|_|\___/|_| |_|___/ #
# |_| |___/ |___/ #
# ==================================================================================================================== #
# Authors: #
# Patrick Lehmann #
# #
# License: #
# ==================================================================================================================== #
# Copyright 2017-2023 Patrick Lehmann - Bötzingen, Germany #
# 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. #
Expand All @@ -27,11 +19,37 @@
# #
# SPDX-License-Identifier: Apache-2.0 #
# ==================================================================================================================== #
#
"""Placeholder"""
__author__ = "Patrick Lehmann"
__email__ = "Paebbels@gmail.com"
__copyright__ = "2017-2022, Patrick Lehmann"
__license__ = "Apache License, Version 2.0"
__version__ = "0.4.4"
__keywords__ = []
name: Intermediate Cleanup

on:
workflow_call:
inputs:
sqlite_coverage_artifacts_prefix:
description: 'Prefix for SQLite coverage artifacts'
required: false
type: string
xml_unittest_artifacts_prefix:
description: 'Prefix for XML unittest artifacts'
required: false
type: string

jobs:
IntermediateCleanUp:
name: 🗑️ Intermediate Artifact Cleanup
runs-on: ubuntu-latest
steps:
- name: 🗑️ Delete SQLite coverage artifacts from matrix jobs
uses: geekyeggo/delete-artifact@v4
if: inputs.sqlite_coverage_artifacts_prefix != ''
continue-on-error: true
with:
name: ${{ inputs.sqlite_coverage_artifacts_prefix }}*
token: ${{ secrets.GITHUB_TOKEN }}

- name: 🗑️ Delete XML coverage artifacts from matrix jobs
uses: geekyeggo/delete-artifact@v4
if: inputs.xml_unittest_artifacts_prefix != ''
continue-on-error: true
with:
name: ${{ inputs.xml_unittest_artifacts_prefix }}*
token: ${{ secrets.GITHUB_TOKEN }}
66 changes: 66 additions & 0 deletions .github/workflows/LaTeXDocumentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# ==================================================================================================================== #
# 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: LaTeX Documentation

on:
workflow_call:
inputs:
document:
description: 'LaTeX root document without *.tex extension.'
required: true
type: string
latex_artifact:
description: 'Name of the LaTeX documentation artifact.'
required: false
default: ''
type: string
pdf_artifact:
description: 'Name of the PDF documentation artifact.'
required: false
default: ''
type: string

jobs:
PDFDocumentation:
name: 📓 Converting LaTeX Documentation to PDF
runs-on: ubuntu-latest
steps:
- name: 📥 Download artifacts '${{ inputs.latex_artifact }}' from 'SphinxDocumentation' job
uses: actions/download-artifact@v4
with:
name: ${{ inputs.latex_artifact }}
path: latex

- name: Compile LaTeX document
uses: xu-cheng/latex-action@master
with:
working_directory: latex
root_file: ${{ inputs.document }}.tex

- name: 📤 Upload 'PDF Documentation' artifact
uses: actions/upload-artifact@v4
if: inputs.pdf_artifact != ''
with:
name: ${{ inputs.pdf_artifact }}
path: ${{ inputs.document }}.pdf
if-no-files-found: error
retention-days: 1
8 changes: 4 additions & 4 deletions .github/workflows/Package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Unai Martinez-Corral #
# #
# ==================================================================================================================== #
# Copyright 2020-2023 The pyTooling Authors #
# 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. #
Expand All @@ -28,7 +28,7 @@ on:
python_version:
description: 'Python version.'
required: false
default: '3.11'
default: '3.12'
type: string
requirements:
description: 'Python dependencies to be installed through pip; if empty, use pyproject.toml through build.'
Expand All @@ -51,7 +51,7 @@ jobs:
uses: actions/checkout@v4

- name: 🐍 Setup Python ${{ inputs.python_version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}

Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
run: python setup.py bdist_wheel

- name: 📤 Upload wheel artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact }}
path: dist/
Expand Down
Loading

0 comments on commit 907c0e2

Please sign in to comment.