Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/ci-linkchecks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Linkcheck

on:
workflow_dispatch:
schedule:
- cron: "00 06 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
linkChecker:
runs-on: ubuntu-latest
permissions:
issues: write # required for peter-evans/create-issue-from-file

steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411
with:
token: ${{secrets.GITHUB_TOKEN}}
fail: false
args: |
--verbose
--max-concurrency 1
'./docs/**/*.rst'
'./lib/**/*.py'

- name: Create Issue From File
if: ${{ fromJSON(steps.lychee.outputs.exit_code) != 0 }}
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: |
Bot
Type: Documentation
Type: Bug

- name: Fail Workflow On Link Errors
if: ${{ fromJSON(steps.lychee.outputs.exit_code) != 0 }}
run:
exit ${{ fromJSON(steps.lychee.outputs.exit_code) }}
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.14"]
session: ["doctest", "linkcheck"]
session: ["doctest"]
iris-source : ["conda-forge"]
include:
- os: "ubuntu-latest"
Expand Down
10 changes: 10 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Change-log entries reference GitHub user accounts, which are common enough
# to trigger GitHub rate limiting.
https://github.com/[^/]*$

# GitHub seems especially keen to rate-limit "blob" URLs.
# (maybe because these are especially associated with abuse?)
https://github.com/[^/]*/[^/]*/blob/.*

# Returns 403 when accessed from GitHub Actions
https://stackoverflow.com
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ⚙️ CI | [![ci-manifest](https://github.com/SciTools/iris-grib/actions/workflows/ci-manifest.yml/badge.svg)](https://github.com/SciTools/iris-grib/actions/workflows/ci-manifest.yml) [![ci-tests](https://github.com/SciTools/iris-grib/actions/workflows/ci-tests.yml/badge.svg)](https://github.com/SciTools/iris-grib/actions/workflows/ci-tests.yml) [![pre-commit](https://results.pre-commit.ci/badge/github/SciTools/iris-grib/main.svg)](https://results.pre-commit.ci/latest/github/SciTools/iris-grib/main) |
| 💬 Community | [![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-2.1-4baaaa.svg)](https://www.contributor-covenant.org/version/2/1/code_of_conduct/) [![GH Discussions](https://img.shields.io/badge/github-discussions%20%F0%9F%92%AC-yellow?logo=github&logoColor=lightgrey)](https://github.com/SciTools/iris-grib/discussions) |
| 📖 Documentation | [![rtd](https://readthedocs.org/projects/iris-grib/badge/?version=latest)](https://iris-grib.readthedocs.io/en/latest/?badge=latest) |
| 📖 Documentation | [![rtd](https://readthedocs.org/projects/iris-grib/badge/?version=latest)](https://iris-grib.readthedocs.io/en/latest/?badge=latest) [![Check Links](https://github.com/SciTools/iris-grib/actions/workflows/ci-linkchecks.yml/badge.svg)](https://github.com/SciTools/iris-grib/actions/workflows/ci-linkchecks.yml) |
| 📈 Health | [![codecov](https://codecov.io/gh/SciTools/iris-grib/graph/badge.svg?token=5VtBaElXFW)](https://codecov.io/gh/SciTools/iris-grib) |
| ✨ Meta | [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![NEP29](https://raster.shields.io/badge/follows-NEP29-orange.png)](https://numpy.org/neps/nep-0029-deprecation_policy.html) [![license - bds-3-clause](https://img.shields.io/github/license/SciTools/iris-grib)](https://github.com/SciTools/iris-grib/blob/main/LICENSE) [![conda platform](https://img.shields.io/conda/pn/conda-forge/iris-grib.svg)](https://anaconda.org/conda-forge/iris-grib) |
| 📦 Package | [![conda-forge](https://img.shields.io/conda/vn/conda-forge/iris-grib?color=orange&label=conda-forge&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/iris-grib) [![pypi](https://img.shields.io/pypi/v/iris-grib?color=orange&label=pypi&logo=python&logoColor=white)](https://pypi.org/project/iris-grib/) [![pypi - python version](https://img.shields.io/pypi/pyversions/iris-grib.svg?color=orange&logo=python&label=python&logoColor=white)](https://pypi.org/project/iris-grib/) |
Expand Down
8 changes: 0 additions & 8 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ help:
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
@echo " dummy to check syntax errors of document sources"
Expand Down Expand Up @@ -196,13 +195,6 @@ changes:
@echo
@echo "The overview file is in $(BUILDDIR)/changes."

.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

.PHONY: doctest
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
Expand Down
9 changes: 0 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,6 @@
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False

# url link checker. Some links registering as faulty, despite being functional.
# See https://www.sphinx-doc.org/en/1.2/config.html[...]
# [...]#options-for-the-linkcheck-builder

linkcheck_ignore = [
"https://github.com/Scitools/iris-grib/compare"
"/c4243ae..5c314e3#diff-cf46b46880cae59e82a91c7ab6bb81ba"
]

# -- Autodoc ------------------------------------------------------------------

autodoc_member_order = "groupwise"
Expand Down
10 changes: 0 additions & 10 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ if "%1" == "help" (
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
echo. dummy to check syntax errors of document sources
Expand Down Expand Up @@ -227,15 +226,6 @@ if "%1" == "changes" (
goto end
)

if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)

if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
Expand Down
12 changes: 12 additions & 0 deletions docs/reference/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
Release Notes
=============

What's new in iris-grib v0.23.0
-------------------------------

:Release: 0.23.0
:Date: TBC

Internal
^^^^^^^^
* `@trexfeathers <https://github.com/trexfeathers>`_ switched the link check CI
to be the standard SciTools overnight job using Lychee.
`(PR#795) <https://github.com/SciTools/iris-grib/pull/795>`_


What's new in iris-grib v0.22.0
-------------------------------
Expand Down
26 changes: 0 additions & 26 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,31 +319,5 @@ def doctest(session: nox.sessions.Session):
)


@nox.session(python=PY_VER, venv_backend="conda")
def linkcheck(session: nox.sessions.Session):
"""
Perform iris-grib doc link check.

Parameters
----------
session: object
A `nox.sessions.Session` object.

"""
prepare_venv(session)
session.cd("docs")
session.run(
"make",
"clean",
"html",
external=True,
)
session.run(
"make",
"linkcheck",
external=True,
)


if __name__ == "__main__":
nox.main()
Loading