Skip to content

Commit cd5615b

Browse files
authored
feature: check dead links in doc CI (#2460)
* feature: one liner to check dead links * fix: check rate limit after build * fix: rate error * fix: ignore intel.com links * fix: remove ignored checks * fix: fix broken links * fix: fix dead link in ipynb files * fix: fix broken links * fix: format and add comment
1 parent 5578892 commit cd5615b

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

doc/build-doc.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ if [[ "$*" == *"--gh-pages"* ]]; then
5353
else
5454
make html
5555
fi
56+
57+
#Run the link-checker after build avoid rate limit errors
58+
sphinx-build -b linkcheck -j auto $SPHINXOPTS sources _build/linkcheck

doc/sources/conf.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
# documentation root, use os.path.abspath to make it absolute, like shown here.
3131
#
3232
import os
33+
import re
3334
import sys
3435

3536
# sys.path.insert(0, os.path.abspath("../"))
@@ -263,3 +264,13 @@ def setup(app):
263264
# not found 404 page
264265

265266
notfound_urls_prefix = "/scikit-learn-intelex/"
267+
268+
# Any link matching these regexes will be skipped by linkcheck
269+
linkcheck_ignore = [
270+
re.compile(r"https://github\.com/.+"), # Avoid rate error
271+
re.compile(r"https://.*intel\.com/.+"), # Avoid permission error
272+
]
273+
274+
# Speed up link-check and fail faster
275+
linkcheck_timeout = 10
276+
linkcheck_workers = 8

doc/sources/daal4py.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ Parameters and semantics are described in |onedal-dg-sorting|_.
10421042
.. _onedal-dg-k-means-clustering: https://uxlfoundation.github.io/oneDAL/daal/algorithms/kmeans/k-means-clustering.html
10431043

10441044
.. |onedal-dg-lbfgs| replace:: |onedal| LBFGS
1045-
.. _onedal-dg-lbfgs: https://uxlfoundation.github.io/oneDAL/daal/algorithms/optimization-solvers/solvers/limited-memory-broyden-fletcher-goldfarb-shanno-algorithm.html
1045+
.. _onedal-dg-lbfgs: https://uxlfoundation.github.io/oneDAL/daal/algorithms/optimization-solvers/solvers/lbfgs.html
10461046

10471047
.. |onedal-dg-naive-bayes| replace:: |onedal| Naive Bayes
10481048
.. _onedal-dg-naive-bayes: https://uxlfoundation.github.io/oneDAL/daal/algorithms/naive_bayes/naive-bayes-classifier.html

examples/notebooks/svc_adult.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"id": "6bb14ac8",
9393
"metadata": {},
9494
"source": [
95-
"Extension for Scikit-learn patching affects performance of specific Scikit-learn functionality. Refer to the [list of supported algorithms and parameters](https://uxlfoundation.github.io/scikit-learn-intelex/algorithms.html) for details. In cases when unsupported parameters are used, the package fallbacks into original Scikit-learn. If the patching does not cover your scenarios, [submit an issue on GitHub](https://github.com/uxlfoundation/scikit-learn-intelex/issues)."
95+
"Extension for Scikit-learn patching affects performance of specific Scikit-learn functionality. Refer to the [list of supported algorithms and parameters](https://uxlfoundation.github.io/scikit-learn-intelex/latest/algorithms.html) for details. In cases when unsupported parameters are used, the package fallbacks into original Scikit-learn. If the patching does not cover your scenarios, [submit an issue on GitHub](https://github.com/uxlfoundation/scikit-learn-intelex/issues)."
9696
]
9797
},
9898
{

examples/notebooks/tsne.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"id": "6bb14ac8",
8787
"metadata": {},
8888
"source": [
89-
"Extension for Scikit-learn patching affects performance of specific Scikit-learn functionality. Refer to the [list of supported algorithms and parameters](https://uxlfoundation.github.io/scikit-learn-intelex/algorithms.html) for details. In cases when unsupported parameters are used, the package fallbacks into original Scikit-learn. If the patching does not cover your scenarios, [submit an issue on GitHub](https://github.com/uxlfoundation/scikit-learn-intelex/issues)."
89+
"Extension for Scikit-learn patching affects performance of specific Scikit-learn functionality. Refer to the [list of supported algorithms and parameters](https://uxlfoundation.github.io/scikit-learn-intelex/latest/algorithms.html) for details. In cases when unsupported parameters are used, the package fallbacks into original Scikit-learn. If the patching does not cover your scenarios, [submit an issue on GitHub](https://github.com/uxlfoundation/scikit-learn-intelex/issues)."
9090
]
9191
},
9292
{

0 commit comments

Comments
 (0)