Documentation rework: cross-check every job template against its workflow - #245
Documentation rework: cross-check every job template against its workflow#245Paebbels wants to merge 9 commits into
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ +0.00% coverage variation |
| Diff coverage | ✅ ∅ diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (08dd2c2) 45 41 91.11% Head commit (15d504e) 45 (+0) 41 (+0) 91.11% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#245) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #245 +/- ##
=======================================
Coverage 82.22% 82.22%
=======================================
Files 1 1
Lines 45 45
Branches 9 9
=======================================
Hits 37 37
Misses 4 4
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Cross-checked every `workflow_call` input of every job template against its documentation page, in both the parameter summary table and the detail section. * `ubuntu_image_version` 24.04 -> 26.04 and `ubuntu_image`/`ubuntu_arm_image` ubuntu-24.04 -> ubuntu-26.04 (shared includes plus 15 summary tables). * `macos_intel_image` macos-13 -> macos-15-intel. * `system_list`, `unittest_system_list` and `apptest_system_list` were missing `ubuntu-arm` and `windows-arm`. * Report paths were documented as `reports/...` in 33 places, while every default and this repository's own `pyproject.toml` use `report/...`. * `UnitTesting.requirements` `-r tests/requirements.txt` -> `-r ./requirements.txt`, `UnitTesting.root_directory` `''` -> `'.'`, `StaticTypeCheck.requirements` -> `-r tests/typing/requirements.txt`, `PublishOnPyPI.requirements` `''` -> `'wheel twine'`, `PublishTestResults.unittest_artifacts_pattern` -> `*-*TestReportSummary-XML-*`, `PublishCoverageResults.coverage_html_artifact` -> `''`, `PublishReleaseNotes.latest` false -> true. * `SystemList.rst` did not list `ubuntu-arm` and `windows-arm` at all and named macOS Ventura 13; regenerated from the system table in `Parameters.yml`. * Fixed two `:ref:` targets pointing at `JOBTMPL/IntermediateCleanup`, whose label is `JOBTMPL/IntermediateCleanUp`. Grid tables were re-rendered with docutils' `column_width`, so the emoji cells in `SystemList.rst` keep their column alignment. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Every `workflow_call` input, output and secret of every job template is now documented, with a detail section and a summary-table row. Previously undocumented: * `CompletePipeline`: `apptest`, `bandit`, `pylint`, `documentation_steps`, `miktex_image`, `miktex_update`, `auto_tag`. * `LaTeXDocumentation`: `miktex_image`, `update`, `halt-on-error`, `can-fail`. * `Parameters`: `pipeline-delay`, `version_file`, `documentation_steps` and the output `package_version_file`. * `PrepareJob`: `pipeline-delay` and the outputs `default_branch`, `on_default_branch`, `has_submodules`, `git_submodule_count`, `git_submodule_names`, `git_submodule_paths`. * `PublishOnPyPI`: `cleanup`. * `PublishReleaseNotes`: `tarball-name`, `inventory-json`, `inventory-version`, `inventory-categories`, `can-fail` and the output `release-page`. * `PublishTestResults`: `testsuite-summary-name`, `merge-input-dialect`, `merge-output-dialect`. * `PublishToGitHubPages`: `pages`, `cleanup` and the output `github_pages_url`. * `UnitTesting`: `windows_before_script`, `windows_arm_before_script`. * `VerifyDocs` was a `.. todo::` stub; the page now describes the template and both its parameters. The `PrepareJob` output table had an empty description column for all 20 outputs; it's filled in now. `PrepareJob`'s `has_submodules` carries an `.. attention::` note: the workflow tests for a file named `.gitsubmodules`, while Git's file is `.gitmodules`, so the output is always 'false'. Documented as observed behavior rather than silently fixed - see the finding. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
The page was a `.. todo::` stub titled "ApplicationTesting (idea)", although the template is fully implemented and used by the SimplePackage verification pipeline and by `CompletePipeline` via `apptest: 'true'`. The template is close to `UnitTesting`, so the page follows that structure, and the introduction states what actually differs: application testing downloads the wheel artifact from `Package`, installs it with pip and runs `tests/app` against the *installed* package, while unit testing imports the sources from the working directory. That is why it catches a module missing from the wheel, a misspelled entry point or an unpackaged `py.typed` marker, and why it must run after packaging. All 20 input parameters are documented with a detail section and a summary-table row. `unittest_html_artifact` carries a note: it holds the *application* test report despite its name. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Every job template's *Behavior* topic was checked against the steps its workflow really executes. Corrections: * `CheckDocumentation`: runs `interrogate` first, then `docstr_coverage` - the page had them the other way round. * `Parameters`: the artifact names are generated *before* the job matrix, and the checkout and the output verification step were missing. * `PublishOnPyPI`: the wheel is published before the source distribution, not after, and the Python setup and cleanup steps were missing. * `PublishReleaseNotes`: the release page is created *before* the assets are attached and the notes are assembled; the page had the notes assembled first. * `PublishToGitHubPages`: described a checkout and a push to a `gh-pages` branch. The job does neither - it merges up to three artifacts, uploads a Pages artifact and deploys it, and skips deployment for pull-requests. * `SphinxDocumentation`: HTML and LaTeX are two independent jobs running in parallel, not sequential steps of one job. * `PublishCoverageResults`: the combine step was missing from a 14-step list. * `PublishTestResults`: the upload of the merged report was missing. * `LaTeXDocumentation`: the optional MiKTeX update step was missing. * `PrepareJob`: the startup delay and the context dump were missing. * `CompletePipeline`: the shared `_Behavior.rst` listed platform tests, which this template does not run, packaged after application testing although the wheel is its input, and published to PyPI before creating the release page although PyPI publishing depends on it. Version check, installation test, code quality, intermediate cleanup, tagging and final cleanup were missing entirely. * `ExtractConfiguration`, `InstallPackage`, `StaticTypeCheck`, `UnitTesting`, `Package`, `IntermediateCleanUp` and `TagReleaseCommit` gained the steps and the conditions that decide whether a step runs. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Both reusable workflows had no documentation page at all. `CheckCodeQuality.yml` runs three independent jobs - bandit, radon and pylint - each with its own enable parameter. The page documents all eight inputs and notes two things a reader cannot see from the parameter list: the *Radon* job only writes into the job log, so it can never fail the pipeline, and the *Bandit* step is guarded by `inputs.artifact != ''`, so an empty artifact name silently skips the security scan while the job still reports success. `CleanupArtifacts.yml` replaced the deprecated `ArtifactCleanUp.yml`, but only the latter had a page - which is why `CompletePipeline` linked to the deprecated template for the job it actually instantiates. That reference now points at `CleanupArtifacts`. The `artifact-json-ids` syntax had never been written down, although it is the only way to use the template. It gets its own section: entries are keys into the artifact-name dictionary, optionally with a prefix and/or postfix, and `#` comments an entry out. The postfix form is what deletes the per-matrix-job artifacts (`codecoverage_xml:-*`) as opposed to the merged one. The instantiation example carries the `!cancelled()` guard, because without a status check function a single skipped upstream job skips the cleanup and the artifacts survive their retention period. Both pages are wired into their category index and toctree. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Every job template's *Dependencies* topic was regenerated from the `uses:` statements of its workflow, and the global `Dependency.rst` from all of them. * The templates migrated to `pyTooling/upload-artifact` and `pyTooling/download-artifact`, but the pages still listed `actions/upload-artifact` and `actions/download-artifact` directly. They are now listed as what they are - the actions the pyTooling wrappers build on. * `PublishToGitHubPages` listed `actions/checkout` and `actions/download-artifact` and was missing `actions/upload-pages-artifact`, `actions/deploy-pages` and `geekyeggo/delete-artifact` - the three actions that do the actual work. The job performs no checkout at all. * `PublishTestResults` used `codecov/codecov-action`, not `codecov/test-results-action`. * `LaTeXDocumentation` runs *inside* the MiKTeX container via `jobs.<id>.container`; it does not use `addnab/docker-run-action`. * `Parameters` was missing `actions/checkout`, `TagReleaseCommit` its `actions/github-script`, `PublishOnPyPI` its `geekyeggo/delete-artifact`. * `ApplicationTesting` and `VerifyDocs` had no *Dependencies* topic at all; `CompletePipeline`'s dependency tree was missing `ApplicationTesting`, `InstallPackage`, `StaticTypeCheck`, `CheckCodeQuality` and `PublishToGitHubPages`. `doc/Dependency.rst` additionally listed three actions no template uses (`actions/create-release`, `buildthedocs/btd`, and the two artifact actions as direct dependencies) while missing `actions/github-script`, `actions/deploy-pages`, `actions/upload-pages-artifact`, both pyTooling artifact actions, the `gh` CLI and the MiKTeX image. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
* `Templates.rst`, the overview included by the landing page and by the job template index, did not list `CheckCodeQuality`, `CleanupArtifacts` or `VerifyDocs`, listed the deprecated `ArtifactCleanup` as the current cleanup template, and kept three planned code quality entries that `CheckCodeQuality` has since implemented. * 151 instantiation examples across 22 pages still referenced `@r6`; the current release branch is `@r7`. * `Instantiation.rst`'s "Documentation Only" example instantiated `BuildTheDocs.yml`, a template that no longer exists, and hand-rolled an artifact cleanup job. It now uses `SphinxDocumentation` and `CleanupArtifacts`. * The landing page described an `ExamplePipeline.yml` that is not in the repository, and told readers to set a `name` input on `Parameters` and a `commands` input on `StaticTypeCheck` - neither input exists. It now points at `CompletePipeline` and names the one input that is actually required. * `doc/License.rst` had no `CODELICENSE` label, although the landing page links to it. * Removed the duplicate parameter sections this rework introduced for the hyphenated parameters, which already had stub sections under labels my check had missed, and filled the remaining `tbd` placeholders on `PublishTestResults`, `PublishCoverageResults`, `PublishToGitHubPages` and `PublishReleaseNotes`. * `inventory-categories` was documented as a colon separated list; the workflow splits it on a comma. The documentation now has no dangling `:ref:` targets, no duplicate labels and no docutils errors. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
#246 fixes the three defects this branch documented as observed behavior, so the two `.. attention::` notes are replaced: * `PrepareJob`'s `has_submodules` no longer needs the note about `.gitsubmodules`; it now describes the output. * `CheckCodeQuality`'s `artifact` no longer needs the note about the silently skipped scan. It keeps a `.. note::` stating that the template does not reference the parameter, which stays true after #246 - the input is declared `required: true` and cannot be removed from a release branch. Also corrects a mistake in this branch: `git_submodule_names` and `git_submodule_paths` are joined with `paste -sd ':'`, so they are colon separated, not space separated. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
9b23c5c to
15d504e
Compare
New Features
Three job templates are documented for the first time.
ApplicationTestingwas a.. todo::stub titled "ApplicationTesting (idea)", although the template is implemented and used by the SimplePackage verification pipeline and byCompletePipelineviaapptest: 'true'.CheckCodeQualityhad no page at all.CleanupArtifactshad no page at all —doc/JobTemplate/Cleanup/ArtifactCleanup.rstdocuments the deprecatedArtifactCleanUp.yml, which is whyCompletePipelinelinked to the deprecated template for the job it actually instantiates.VerifyDocswas a.. todo::stub too and now describes what the template does and both of its parameters.CleanupArtifacts'artifact-json-idssyntax is written down — it had never been documented, although it is the only way to use the template. Entries are keys into the artifact-name dictionary, optionally with a prefix and/or a postfix, and#comments an entry out. The postfix form is what deletes the per-matrix-job artifacts (codecoverage_xml:-*) as opposed to the merged one.Changes
No workflow file was touched. This pull-request changes documentation only.
Every
workflow_callinput, output and secret of every job template now has a detail section and a summary-table row. Previously undocumented parameters:CompletePipelineapptest,bandit,pylint,documentation_steps,miktex_image,miktex_update,auto_tagLaTeXDocumentationmiktex_image,update,halt-on-error,can-failParameterspipeline-delay,version_file,documentation_steps, outputpackage_version_filePrepareJobpipeline-delay, outputsdefault_branch,on_default_branch,has_submodules,git_submodule_count,git_submodule_names,git_submodule_pathsPublishOnPyPIcleanupPublishReleaseNotestarball-name,can-fail, outputrelease-pagePublishTestResultstestsuite-summary-name,merge-input-dialect,merge-output-dialectPublishToGitHubPagespages,cleanup, outputgithub_pages_urlUnitTestingwindows_before_script,windows_arm_before_scriptVerifyDocspython_version,ubuntu_image_versionThe
PrepareJoboutput table had an empty Description column for all 20 outputs. Filled in.Thirteen
tbdplaceholders onPublishTestResults,PublishCoverageResults,PublishToGitHubPagesandPublishReleaseNoteswere replaced with actual descriptions.Bug Fixes
Wrong defaults. Cross-checked every documented default against the YAML, in the summary table and the detail section:
ubuntu_image_version(15 pages)'24.04''26.04'ubuntu_image/ubuntu_arm_image'ubuntu-24.04''ubuntu-26.04'macos_intel_image'macos-13''macos-15-intel'system_list,unittest_system_list,apptest_system_listubuntu-arm, nowindows-armUnitTesting.requirements'-r tests/requirements.txt''-r ./requirements.txt'UnitTesting.root_directory'''.'UnitTesting.coverage_report_htmlreport/coveragereport/coverage/htmlStaticTypeCheck.requirements'-r tests/requirements.txt''-r tests/typing/requirements.txt'PublishOnPyPI.requirements'''wheel twine'PublishTestResults.unittest_artifacts_pattern'*-UnitTestReportSummary-XML-*''*-*TestReportSummary-XML-*'PublishCoverageResults.coverage_html_artifact'report/coverage/html'''PublishReleaseNotes.latestfalsetrueReport paths were written as
reports/...in 33 places, while every default and this repository's ownpyproject.tomlusereport/....PublishReleaseNotes.inventory-categorieswas documented as a colon separated list; the workflow splits it on a comma (readarray -td,).SystemList.rst— the table backing thesystem_listparameter — did not listubuntu-armorwindows-armat all and named macOS Ventura 13. Regenerated from the system table inParameters.yml.Described algorithms that did not match the workflow. Each Behavior topic was checked step by step against the YAML:
CheckDocumentationrunsinterrogatefirst, thendocstr_coverage— documented the other way round.Parametersgenerates the artifact names before the job matrix — documented the other way round.PublishOnPyPIpublishes the wheel before the source distribution — documented the other way round.PublishReleaseNotescreates the release page before attaching assets and assembling notes — documented with the notes assembled first. That ordering matters: a failure while uploading assets leaves a draft page behind rather than a published, incomplete release.PublishToGitHubPageswas documented as "Checkout repository / Download artifacts / Push HTML files to branchgh-pages". The job does none of those three — it merges up to three artifacts, uploads a Pages artifact and deploys it viaactions/deploy-pages, and skips deployment forpull_requestevents.SphinxDocumentationis two independent jobs running in parallel, not sequential steps of one job.PublishCoverageResults(a 14-step list without the step the job exists for), the merged-report upload inPublishTestResults, the MiKTeX update inLaTeXDocumentation, the startup delay and context dump inPrepareJob.CompletePipeline's shared_Behavior.rstlisted platform tests, which this template does not run; packaged after application testing although the wheel is application testing's input; and published to PyPI before creating the release page although PyPI publishing depends on it. Version check, installation test, code quality, intermediate cleanup, tagging and final cleanup were missing entirely.Dependency lists that named the wrong actions. Regenerated from the
uses:statements:pyTooling/upload-artifactandpyTooling/download-artifact, but the pages still listed theactions/*originals as direct dependencies. They are now shown as what they are — the actions the pyTooling wrappers build on.PublishToGitHubPageslistedactions/checkoutandactions/download-artifactand was missingactions/upload-pages-artifact,actions/deploy-pagesandgeekyeggo/delete-artifact— the three that do the work. The job performs no checkout.PublishTestResultsusescodecov/codecov-action, notcodecov/test-results-action.LaTeXDocumentationruns inside the MiKTeX container viajobs.<id>.container; it does not useaddnab/docker-run-action.Parameterswas missingactions/checkout,TagReleaseCommititsactions/github-script,PublishOnPyPIitsgeekyeggo/delete-artifact.doc/Dependency.rstlistedactions/create-releaseandbuildthedocs/btd, which no template uses, and was missingactions/github-script,actions/deploy-pages,actions/upload-pages-artifact, both pyTooling artifact actions, theghCLI and the MiKTeX image.Stale overview and landing page.
Templates.rstdid not listCheckCodeQuality,CleanupArtifactsorVerifyDocs, presented the deprecatedArtifactCleanupas the current cleanup template, and still showed code linting (planned) althoughCheckCodeQualityimplements it.Instantiation.rst's Documentation Only example instantiatedBuildTheDocs.yml, a template that no longer exists.ExamplePipeline.ymlthat is not in this repository and told readers to set anameinput onParametersand acommandsinput onStaticTypeCheck— neither input exists.doc/License.rsthad noCODELICENSElabel although the landing page links to it.151 instantiation examples across 22 pages still referenced
@r6, while the current release branch is@r7.Documentation
Two defects found while cross-checking are fixed in #246, not here. This branch originally documented them as observed behaviour with
.. attention::notes; the last commit replaces those notes with the corrected behaviour, so the two pull-requests agree whichever order they land in:PrepareJob'shas_submodules— the workflow tested for a file named.gitsubmodules(PrepareJob.yml:369), while Git's file is.gitmodules, so the output was always'false'.CheckCodeQuality'sartifact— the Bandit step was guarded byinputs.artifact != '', so an empty artifact name silently skipped the security scan while the job still reported success. The parameter keeps a.. note::saying the template does not reference it, which remains true after Fix submodule detection, the CleanupArtifacts NameError and the skippable Bandit scan #246.A third defect, the
NameErrorinCleanupArtifacts' unknown-key branch, is also fixed in #246 and was never documented here.Corrected in this branch after the fact:
git_submodule_namesandgit_submodule_pathsare colon separated (paste -sd ':'), not space separated as first written.Unit Tests
There is no test suite for documentation, so the checks were scripted and run against the tree:
workflow_callinput, output and secret of every job template is matched against the labels and summary-table rows on its page. Remaining reports are formatting conventions only (— — — —for "no default",:jsoncode:for inline JSON, thestring (JSON)type annotation).uses:statements of each workflow are compared against the:gh:entries of its Dependencies topic, and the union againstdoc/Dependency.rst.column_width, so the emoji cells inSystemList.rstkeep their alignment.:ref:targets and 0 duplicate labels across the whole documentation. Both were non-zero before this pull-request.tbdor "Needs documentation" placeholders remain on any job template page.Related Issues and Pull-Requests
Note
ArtifactCleanUp.yml(deprecated) is documented on a page whose label isJOBTMPL/ArtifactCleanup— lower-caseu. The inconsistency between the workflow file name and the label is left as is, since the template is deprecated and renaming the label would break external links.