Feature 3247 link check#3325
Open
jprestop wants to merge 12 commits into
Open
Conversation
…o dtcenter/metplus-action-linkcheck
Coverage Report for CI Build 28908061186Coverage remained the same at 92.064%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
…d ModuleNotFoundError during linkcheck
23 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added automated link checking for METplus component documentation using Sphinx's built-in
linkcheckbuilder, run via a new custom composite GitHub Action rather than duplicating workflow logic across each component repo.Where linkcheck runs:
Linkcheck runs via GitHub Actions in each component repo, using a new workflow file,
linkcheck.yml, which runs weekly (Monday 06:00 UTC via cron), fails the job on broken links so failures surface via GitHub's workflow notifications and runs on PRs touchingdocs/**, fails the job on broken links so new/edited links are checked before merge.New shared component:
sphinx-build -b linkcheck, uploads the report as a workflow artifact, and fails/passes based on afail-on-broken-linksinput (default true).metplus-action-*repos (release-checksum, trigger-use-cases, data-update, etc.) in that they are Docker-based custom actions which predate composite actions being available on GitHub. Composite was the right choice here as the linkcheck action only needs Python, pip, andsphinx-build, all things thatactions/setup-pythonand a shellrun:step handle natively. A Docker-based approach would add image build/pull overhead and Linux-only constraints for no functional benefit, since there's no dependency here that needs container isolation.Per-repo configuration still required:
docs/conf.pyneeds alinkcheckconfiguration block (linkcheck_timeout,linkcheck_retries,linkcheck_workers,linkcheck_ignore, etc.). The contents oflinkcheck_ignoreare repo-specific, since each component links to different external resources, so this can't be centralized in the shared action and should be populated based on the firstlinkcheckrun's actual output.docs/requirements.txtin any repository.linkcheckis part of core Sphinx, and the existing dependency list already covers everything needed to parse the doc tree.Pull Request Testing
Describe testing already performed for these changes:
Ran
sphinx-build -b linkchecklocally against the updateddocs/conf.py. The newlinkcheck.ymlworkflow (via thepull_requesttrigger) will run automatically once this PR is opened, sincepull_request-triggered workflows execute from the PR branch rather than requiring the workflow to already exist on the default branch. This will serve as the first end-to-end test of the composite action against real repo content. The composite action itself (dtcenter/metplus-action-linkcheck) has not yet been tested independently prior to this PR.workflow_dispatchmanual triggering is not testable pre-merge.Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
linkcheckworkflow run (triggered automatically viapull_request) and confirm it completed (either passing, or failing with a legitimate broken-link report rather than an action/configuration error). Note that the linkcheck workflow failed at the step "Run dtcenter/metplus-action-linkcheck@v1" with a legitimate broken-link report.[linkcheck-output](https://github.com/dtcenter/METplus/actions/runs/28908061175/artifacts/8155006783)artifact from that run and review output.txt to confirm the results look reasonable. I assumed we'd have a separate issue to go through each repository's broken links and clean them up and/or add them tolinkcheck-ignore).linkcheck.ymlfor the trigger conditions (schedule, pull_request with paths: ['docs/**'], workflow_dispatch).NOTE/QUESTION:
workflow_dispatch(the manual trigger) won't be available to test until after this PR merges to the default branch (Do we want this added to the main_vX.Y branches also, or do we want to wait until for the METplus-13.0.0 coordinated release?)Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
Do these changes include sufficient testing updates? [Yes]
Will this PR result in changes to the test suite? [No]
If yes, describe the new output and/or changes to the existing output:
Do these changes introduce new SonarQube findings? [No]
If yes, please describe:
Please complete this pull request review by [20260722].
Pull Request Checklist
See the METplus Workflow for details.
Select: Reviewer(s) and Development issue
Select: Milestone as the version that will include these changes
Select: Coordinated METplus-X.Y Support project for bugfix releases or METplus-Wrappers-X.Y.Z Development project for official releases