Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Sep 27, 2024
2 parents 74afc5a + bf6ba9b commit 1c42072
Show file tree
Hide file tree
Showing 37 changed files with 659 additions and 130 deletions.
18 changes: 16 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
# New Features


* tbd
* tbd

# Changes

* tbd
* tbd

# Bug Fixes

* tbd
* tbd

# Documentation

* tbd
* tbd

# Unit Tests

* tbd
* tbd

----------
# Related PRs:
# Related Issues and Pull-Requests

* tbd
* tbd
38 changes: 23 additions & 15 deletions .github/workflows/ApplicationTesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,26 +124,34 @@ jobs:
requirements = "${{ inputs.requirements }}"
if requirements.startswith("-r"):
requirementsFile = Path(requirements[2:].lstrip())
dependencies = loadRequirementsFile(requirementsFile)
try:
dependencies = loadRequirementsFile(requirementsFile)
except FileNotFoundError as ex:
print(f"::error title=FileNotFoundError::{ex}")
exit(1)
else:
dependencies = [req.strip() for req in requirements.split(" ")]
packages = {
"coverage": "python-coverage:p",
"igraph": "igraph:p",
"jinja2": "python-markupsafe:p",
"lxml": "python-lxml:p",
"numpy": "python-numpy:p",
"markupsafe": "python-markupsafe:p",
"pip": "python-pip:p",
"ruamel.yaml": "python-ruamel-yaml:p python-ruamel.yaml.clib:p",
"sphinx": "python-markupsafe:p",
"tomli": "python-tomli:p",
"wheel": "python-wheel:p",
"coverage": "python-coverage:p",
"docstr_coverage": "python-pyyaml:p",
"igraph": "igraph:p",
"jinja2": "python-markupsafe:p",
"lxml": "python-lxml:p",
"numpy": "python-numpy:p",
"markupsafe": "python-markupsafe:p",
"pip": "python-pip:p",
"pyyaml": "python-pyyaml:p",
"ruamel.yaml": "python-ruamel-yaml:p python-ruamel.yaml.clib:p",
"sphinx": "python-markupsafe:p",
"tomli": "python-tomli:p",
"wheel": "python-wheel:p",
"pyEDAA.ProjectModel": "python-ruamel-yaml:p python-ruamel.yaml.clib:p python-lxml:p",
"pyEDAA.Reports": "python-ruamel-yaml:p python-ruamel.yaml.clib:p python-lxml:p",
}
subPackages = {
"pytooling": {
"yaml": "python-ruamel-yaml:p python-ruamel.yaml.clib:p",
"yaml": "python-ruamel-yaml:p python-ruamel.yaml.clib:p",
}
}
Expand Down Expand Up @@ -215,7 +223,7 @@ jobs:
ls -l install
python -m pip install --disable-pip-version-check -U install/*.whl
- name: Run application tests (Ubuntu/macOS)
- name: Run application tests (Ubuntu/macOS)
if: matrix.system != 'windows'
run: |
export ENVIRONMENT_NAME="${{ matrix.envname }}"
Expand All @@ -230,7 +238,7 @@ jobs:
python -m pytest -raP $PYTEST_ARGS --color=yes ${{ inputs.tests_directory || '.' }}/${{ inputs.apptest_directory }}
fi
- name: Run application tests (Windows)
- name: Run application tests (Windows)
if: matrix.system == 'windows'
run: |
$env:ENVIRONMENT_NAME = "${{ matrix.envname }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ArtifactCleanUp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ on:
jobs:
ArtifactCleanUp:
name: 🗑️ Artifact Cleanup
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: 🗑️ Delete package Artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/BuildTheDocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ on:
jobs:
BuildTheDocs:
name: 📓 Run BuildTheDocs
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: ⏬ Checkout repository
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/CheckDocumentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ on:
description: 'Source code directory to check.'
required: true
type: string
# fail_below:
# description: 'Minimum required documentation coverage level'
# required: false
# default: 75
# type: string
fail_under:
description: 'Minimum required documentation coverage level'
required: false
default: 80
type: string

jobs:
DocCoverage:
name: 👀 Check documentation coverage
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: ⏬ Checkout repository
uses: actions/checkout@v4
Expand All @@ -59,9 +59,9 @@ jobs:
- name: Run 'interrogate' Documentation Coverage Check
continue-on-error: true
run: |
interrogate -c pyproject.toml
interrogate -c pyproject.toml --fail-under=${{ inputs.fail_under }} && echo "::error title=interrogate::Insufficient documentation quality (goal: ${{ inputs.fail_under }})"
- name: Run 'docstr_coverage' Documentation Coverage Check
continue-on-error: true
run: |
docstr_coverage -v ${{ inputs.directory }}
docstr-coverage -v 2 --fail-under=${{ inputs.fail_under }} ${{ inputs.directory }} && echo "::error title=docstr-coverage::Insufficient documentation quality (goal: ${{ inputs.fail_under }})"
8 changes: 6 additions & 2 deletions .github/workflows/CoverageCollection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:

Coverage:
name: 📈 Collect Coverage Data using Python ${{ inputs.python_version }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: ⏬ Checkout repository
Expand Down Expand Up @@ -102,7 +102,9 @@ jobs:
htmlDirectory = pyProjectSettings["tool"]["coverage"]["html"]["directory"]
xmlFile = pyProjectSettings["tool"]["coverage"]["xml"]["output"]
else:
print(f"File '{pyProjectFile}' not found and no ' .coveragerc' file specified.")
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:
Expand All @@ -115,6 +117,8 @@ jobs:
xmlFile = coverageRCSettings["xml"]["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"))
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/IntermediateCleanUp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ on:
jobs:
IntermediateCleanUp:
name: 🗑️ Intermediate Artifact Cleanup
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: 🗑️ Delete SQLite coverage artifacts from matrix jobs
uses: geekyeggo/delete-artifact@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/LaTeXDocumentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ on:
jobs:
PDFDocumentation:
name: 📓 Converting LaTeX Documentation to PDF
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: 📥 Download artifacts '${{ inputs.latex_artifact }}' from 'SphinxDocumentation' job
uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

Package:
name: 📦 Package in Source and Wheel Format
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: ⏬ Checkout repository
Expand Down
67 changes: 50 additions & 17 deletions .github/workflows/Parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ on:
system_list:
description: 'Space separated list of systems to run tests on.'
required: false
default: 'ubuntu windows macos mingw64 ucrt64'
default: 'ubuntu windows macos-arm mingw64 ucrt64'
type: string
include_list:
description: 'Space separated list of system:python items to be included into the list of test.'
Expand All @@ -59,6 +59,26 @@ on:
required: false
default: ''
type: string
ubuntu_image:
description: 'The used GitHub Action image for Ubuntu based jobs.'
required: false
default: 'ubuntu-24.04'
type: string
windows_image:
description: 'The used GitHub Action image for Windows based jobs.'
required: false
default: 'windows-latest'
type: string
macos_intel_image:
description: 'The used GitHub Action image for macOS (Intel x86-64) based jobs.'
required: false
default: 'macos-latest-large'
type: string
macos_arm_image:
description: 'The used GitHub Action image for macOS (ARM arm64) based jobs.'
required: false
default: 'macos-latest'
type: string

outputs:
python_version:
Expand All @@ -76,7 +96,7 @@ on:

jobs:
Parameters:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
python_version: ${{ steps.params.outputs.python_version }}
python_jobs: ${{ steps.params.outputs.python_jobs }}
Expand All @@ -91,8 +111,8 @@ jobs:
from json import dumps as json_dumps
from os import getenv
from pathlib import Path
from pprint import pprint
from textwrap import dedent
from typing import Iterable
name = "${{ inputs.name }}".strip()
python_version = "${{ inputs.python_version }}".strip()
Expand Down Expand Up @@ -138,7 +158,7 @@ jobs:
if currentAlphaVersion in versions:
print(f"::notice title=Experimental::Python {currentAlphaVersion} ({currentAlphaRelease}) is a pre-release.")
for disable in disabled:
print(f"::warning title=Disabled Python Job::System '{disable}' temporary disabled.")
print(f"::warning title=Disabled Python Job::System '{disable}' temporarily disabled.")
# see https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
data = {
Expand All @@ -158,9 +178,10 @@ jobs:
},
# Runner systems (runner images) supported by GitHub Actions
"sys": {
"ubuntu": { "icon": "🐧", "runs-on": "ubuntu-latest", "shell": "bash", "name": "Linux (x86-64)", "minPy": (3, 7)},
"windows": { "icon": "🪟", "runs-on": "windows-latest", "shell": "pwsh", "name": "Windows (x86-64)", "minPy": (3, 7)},
"macos": { "icon": "🍎", "runs-on": "macos-latest", "shell": "bash", "name": "MacOS (x86-64)", "minPy": (3, 10)},
"ubuntu": { "icon": "🐧", "runs-on": "${{ inputs.ubuntu_image }}", "shell": "bash", "name": "Linux (x86-64)" },
"windows": { "icon": "🪟", "runs-on": "${{ inputs.windows_image }}", "shell": "pwsh", "name": "Windows (x86-64)" },
"macos": { "icon": "🍎", "runs-on": "${{ inputs.macos_intel_image }}", "shell": "bash", "name": "macOS (x86-64)" },
"macos-arm": { "icon": "🍏", "runs-on": "${{ inputs.macos_arm_image }}", "shell": "bash", "name": "macOS (arm64)" },
},
# Runtimes provided by MSYS2
"runtime": {
Expand All @@ -183,32 +204,44 @@ jobs:
for disable in disabled:
print(f"- {disable}")
def toVersion(value):
major, minor = value.split(".")
return int(major[-1]), int(minor)
def match(combination: str, pattern: str) -> bool:
system, version = combination.split(":")
sys, ver = pattern.split(":")
if sys == "*":
return (ver == "*") or (version == ver)
elif system == sys:
return (ver == "*") or (version == ver)
else:
return False
def notIn(combination: str, patterns: Iterable[str]) -> bool:
for pattern in patterns:
if match(combination, pattern):
return False
return True
combinations = [
(system, version)
for system in systems
if system in data["sys"]
for version in versions
if version in data["python"]
and toVersion(version) >= data["sys"][system]["minPy"]
and f"{system}:{version}" not in excludes
and f"{system}:{version}" not in disabled
and notIn(f"{system}:{version}", excludes)
and notIn(f"{system}:{version}", disabled)
] + [
(system, currentMSYS2Version)
for system in systems
if system in data["runtime"]
and f"{system}:{currentMSYS2Version}" not in excludes
and f"{system}:{currentMSYS2Version}" not in disabled
and notIn(f"{system}:{currentMSYS2Version}", excludes)
and notIn(f"{system}:{currentMSYS2Version}", disabled)
] + [
(system, version)
for system, version in includes
if system in data["sys"]
and version in data["python"]
and toVersion(version) >= data["sys"][system]["minPy"]
and f"{system}:{version}" not in disabled
and notIn(f"{system}:{version}", disabled)
]
print(f"Combinations ({len(combinations)}):")
for system, version in combinations:
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/PublishCoverageResults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ on:
jobs:
PublishCoverageResults:
name: 📊 Publish Code Coverage Results
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: always()

steps:
Expand All @@ -71,7 +71,7 @@ jobs:

- name: 🔧 Install coverage and tomli
run: |
python -m pip install --disable-pip-version-check -U coverage[toml] tomli
python -m pip install -U --disable-pip-version-check --break-system-packages coverage[toml] tomli
- name: 🔁 Extract configurations from pyproject.toml
id: getVariables
Expand Down Expand Up @@ -102,7 +102,9 @@ jobs:
xmlFile = Path(pyProjectSettings["tool"]["coverage"]["xml"]["output"])
jsonFile = Path(pyProjectSettings["tool"]["coverage"]["json"]["output"])
else:
print(f"File '{pyProjectFile}' not found and no '.coveragerc' file specified.")
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:
Expand All @@ -116,6 +118,8 @@ jobs:
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"))
Expand All @@ -131,8 +135,10 @@ jobs:
- name: Rename .coverage files and collect them all to coverage/
run: |
ls -lAh artifacts/
ls -lAh artifacts/*/.coverage
mkdir -p coverage
find . -type f -path "*artifacts*SQLite*.coverage" -exec sh -c 'cp -v $0 "coverage/$(basename $0).$(basename $(dirname $0))"' {} ';'
find artifacts/ -type f -path "*SQLite*.coverage" -exec sh -c 'cp -v $0 "coverage/$(basename $0).$(basename $(dirname $0))"' {} ';'
tree -a coverage
- name: Combine SQLite files (using Coverage.py)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/PublishOnPyPI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

PublishOnPyPI:
name: 🚀 Publish to PyPI
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: 📥 Download artifacts '${{ inputs.artifact }}' from 'Package' job
Expand Down
Loading

0 comments on commit 1c42072

Please sign in to comment.