From 1e083520429ba80ea91c8ef39fc68fd828cf4328 Mon Sep 17 00:00:00 2001 From: jprestop Date: Mon, 6 Jul 2026 17:55:10 -0600 Subject: [PATCH 1/7] Per METplus#3247, adding automated link checking in conjunction with new repo dtcenter/metplus-action-linkcheck --- .github/workflows/linkcheck_pull_request.yml | 15 ++++++++++++ .github/workflows/linkcheck_scheduled.yml | 15 ++++++++++++ docs/conf.py | 24 +++++++++++++++++++- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/linkcheck_pull_request.yml create mode 100644 .github/workflows/linkcheck_scheduled.yml diff --git a/.github/workflows/linkcheck_pull_request.yml b/.github/workflows/linkcheck_pull_request.yml new file mode 100644 index 00000000..87639a3e --- /dev/null +++ b/.github/workflows/linkcheck_pull_request.yml @@ -0,0 +1,15 @@ +name: linkcheck-pr +on: + pull_request: + paths: + - 'docs/**' + +jobs: + linkcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtcenter/metplus-action-linkcheck@v1 + with: + fail-on-broken-links: 'true' + upload-artifact: 'true' \ No newline at end of file diff --git a/.github/workflows/linkcheck_scheduled.yml b/.github/workflows/linkcheck_scheduled.yml new file mode 100644 index 00000000..7d686935 --- /dev/null +++ b/.github/workflows/linkcheck_scheduled.yml @@ -0,0 +1,15 @@ +name: linkcheck-scheduled +on: + schedule: + - cron: '0 6 * * 1' + workflow_dispatch: {} + +jobs: + linkcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtcenter/metplus-action-linkcheck@v1 + with: + fail-on-broken-links: 'true' + \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 3da31ba3..4447ff62 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -97,7 +97,29 @@ numfig_format = { 'figure': 'Figure %s', } - + +# -- linkcheck builder configuration ---------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder + +linkcheck_timeout = 10 +linkcheck_retries = 2 +linkcheck_workers = 8 + +linkcheck_ignore = [ + # add regex patterns for URLs that should be skipped, e.g.: + # r'https://dtcenter\.org/.*', # if this site blocks automated requests + # r'https://matplotlib\.org/.*', # occasionally rate-limits automated clients + # r'https://scitools\.org\.uk/cartopy/.*', # occasionally slow + # r'https://doi\.org/.*', # DOI redirectors often 403 non-browser requests +] + +linkcheck_allowed_redirects = { + # map of regex -> regex for redirects that are fine to follow +} + +linkcheck_anchors = True +linkcheck_anchors_ignore = ['^!'] + # -- Export variables -------------------------------------------------------- rst_epilog = """ From 036d049f8bbe5a5b09835c79daae82a25da0a12f Mon Sep 17 00:00:00 2001 From: jprestop Date: Mon, 6 Jul 2026 18:23:01 -0600 Subject: [PATCH 2/7] Resolving error --- .github/workflows/linkcheck_scheduled.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/linkcheck_scheduled.yml b/.github/workflows/linkcheck_scheduled.yml index 7d686935..9eb840b9 100644 --- a/.github/workflows/linkcheck_scheduled.yml +++ b/.github/workflows/linkcheck_scheduled.yml @@ -11,5 +11,4 @@ jobs: - uses: actions/checkout@v4 - uses: dtcenter/metplus-action-linkcheck@v1 with: - fail-on-broken-links: 'true' - \ No newline at end of file + fail-on-broken-links: 'true' \ No newline at end of file From 85a56899244a9653eb56469552a78ad5d64da75d Mon Sep 17 00:00:00 2001 From: jprestop Date: Tue, 7 Jul 2026 13:17:45 -0600 Subject: [PATCH 3/7] Per METplus#3247, add workflow dispatch to the linkcheck PR workflow too --- .github/workflows/linkcheck_pull_request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck_pull_request.yml b/.github/workflows/linkcheck_pull_request.yml index 87639a3e..481aab60 100644 --- a/.github/workflows/linkcheck_pull_request.yml +++ b/.github/workflows/linkcheck_pull_request.yml @@ -3,7 +3,8 @@ on: pull_request: paths: - 'docs/**' - + workflow_dispatch: {} + jobs: linkcheck: runs-on: ubuntu-latest From e3b868c2a10ec1c3189e3249846944ae04864b18 Mon Sep 17 00:00:00 2001 From: jprestop Date: Tue, 7 Jul 2026 15:09:29 -0600 Subject: [PATCH 4/7] Per METplus#3247, combine workflows into one file --- .../{linkcheck_pull_request.yml => linkcheck.yml} | 6 ++++-- .github/workflows/linkcheck_scheduled.yml | 14 -------------- 2 files changed, 4 insertions(+), 16 deletions(-) rename .github/workflows/{linkcheck_pull_request.yml => linkcheck.yml} (85%) delete mode 100644 .github/workflows/linkcheck_scheduled.yml diff --git a/.github/workflows/linkcheck_pull_request.yml b/.github/workflows/linkcheck.yml similarity index 85% rename from .github/workflows/linkcheck_pull_request.yml rename to .github/workflows/linkcheck.yml index 481aab60..40838861 100644 --- a/.github/workflows/linkcheck_pull_request.yml +++ b/.github/workflows/linkcheck.yml @@ -1,10 +1,12 @@ -name: linkcheck-pr +name: linkcheck on: + schedule: + - cron: '0 6 * * 1' pull_request: paths: - 'docs/**' workflow_dispatch: {} - + jobs: linkcheck: runs-on: ubuntu-latest diff --git a/.github/workflows/linkcheck_scheduled.yml b/.github/workflows/linkcheck_scheduled.yml deleted file mode 100644 index 9eb840b9..00000000 --- a/.github/workflows/linkcheck_scheduled.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: linkcheck-scheduled -on: - schedule: - - cron: '0 6 * * 1' - workflow_dispatch: {} - -jobs: - linkcheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtcenter/metplus-action-linkcheck@v1 - with: - fail-on-broken-links: 'true' \ No newline at end of file From 2a37f7ab99ed83838a521503ecd1e590cc651819 Mon Sep 17 00:00:00 2001 From: jprestop Date: Tue, 7 Jul 2026 18:55:19 -0600 Subject: [PATCH 5/7] Per METplus#3247, added upload-artifact --- .github/workflows/linkcheck.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 40838861..a976fc11 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -15,4 +15,5 @@ jobs: - uses: dtcenter/metplus-action-linkcheck@v1 with: fail-on-broken-links: 'true' - upload-artifact: 'true' \ No newline at end of file + upload-artifact: 'true' + install-package: 'true' \ No newline at end of file From 72c2b5bc700d67b46256af2200d1135e66e2dd59 Mon Sep 17 00:00:00 2001 From: jprestop Date: Tue, 14 Jul 2026 14:29:17 -0600 Subject: [PATCH 6/7] Per METplus#3247, modified name and checkout version. --- .github/workflows/linkcheck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index a976fc11..305c6dce 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -1,4 +1,4 @@ -name: linkcheck +name: Linkcheck on: schedule: - cron: '0 6 * * 1' @@ -11,7 +11,7 @@ jobs: linkcheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: dtcenter/metplus-action-linkcheck@v1 with: fail-on-broken-links: 'true' From a70ab0d09513745d1ee91e0f57fa09235acc3a27 Mon Sep 17 00:00:00 2001 From: jprestop Date: Tue, 14 Jul 2026 16:02:56 -0600 Subject: [PATCH 7/7] Trigger linkcheck run --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index 4447ff62..fde51216 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -132,3 +132,4 @@ release_datestr = release_date, release_yearstr = release_year) +