Skip to content

Commit 989c944

Browse files
fix(linkcheck): ignore python, jupyter, and PDF artifacts (#860)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent a3e7e89 commit 989c944

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

doc/source/changelog/860.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ignore python, jupyter, and PDF artifacts

doc/source/conf.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
project = "ansys-stk"
2828
copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"
2929
author = "ANSYS, Inc."
30-
release = version = __version__
30+
version = __version__
31+
release = get_version_match(version)
3132
cname = os.getenv("DOCUMENTATION_CNAME", "stk.docs.pyansys.com")
3233

3334
# Configure the HTML theme
@@ -39,7 +40,7 @@
3940
"github_repo": "pystk",
4041
"github_version": "main",
4142
"doc_path": "doc/source",
42-
"version": "main" if version.endswith("dev0") else f"release/{version.split('.')[:-1]}",
43+
"version": "main" if version.endswith("dev0") else f"release/{release}",
4344
"base_url": f"https://github.com/ansys/pystk/blob/main",
4445
"edit_page_provider_name": "GitHub",
4546
"edit_page_url_template": "{{ base_url }}/{{ 'doc/source/' if 'examples/' not in file_name else '' }}{{ file_name }}",
@@ -66,7 +67,7 @@
6667
],
6768
"switcher": {
6869
"json_url": f"https://{cname}/versions.json",
69-
"version_match": get_version_match(__version__),
70+
"version_match": release,
7071
},
7172
"check_switcher": False,
7273
"navigation_with_keys": True,
@@ -178,15 +179,21 @@
178179
# -- Linkcheck configuration -------------------------------------------------
179180
user_repo = f"{html_context['github_user']}/{html_context['github_repo']}"
180181
linkcheck_ignore = [
181-
"https://www.ansys.com/*",
182+
r"https://www.ansys.com/*",
182183
# Requires sign-in
183-
f"https://github.com/{user_repo}/*",
184-
"https://support.agi.com/3d-models",
185-
"https://support.agi.com/downloads",
186-
"https://www.khronos.org/collada/",
184+
r"https://support.agi.com/3d-models",
185+
r"https://support.agi.com/downloads",
186+
# Spurious failures
187+
r"https://www.khronos.org/collada/",
188+
r"https://www.khronos.org/gltf/",
187189
# TODO: Determine a way to link to examples without breaking the linkcheck
188190
# https://github.com/ansys/pystk/issues/657
189191
r"../examples/",
192+
# Ignore links to the examples pdf/ipynb/py files as they are not
193+
# available until documentation is not published
194+
rf"https://{cname}/version/{release}/examples/.*\.pdf",
195+
rf"https://{cname}/version/{release}/examples/.*\.ipynb",
196+
rf"https://{cname}/version/{release}/examples/.*\.py",
190197
]
191198

192199
# -- Declare the Jinja context -----------------------------------------------

0 commit comments

Comments
 (0)