Skip to content

Fix linkcheck false positives for FRED (timeout) and update redirect URLs#518

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-broken-links-documentation
Draft

Fix linkcheck false positives for FRED (timeout) and update redirect URLs#518
Copilot wants to merge 3 commits intomainfrom
copilot/fix-broken-links-documentation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

The automated link checker was reporting 2 broken links (FRED timeout) and 2 redirects (mypy, JAX) on every scheduled run.

Changes

  • Redirects already resolved: python_advanced_features.md already uses the final destination URLs (https://mypy.readthedocs.io/en/stable/, https://docs.jax.dev/en/latest/) — no content changes needed.

  • FRED false positive fix (linkcheck.yml): Added a pre-processing step before the link checker runs that neutralises fred.stlouisfed.org hrefs → href="#". FRED actively blocks automated crawlers, so these timeouts are false positives. The skip list is driven by a SKIP_DOMAINS env var for easy extension:

- name: Pre-process HTML to exclude known bot-blocking domains
  env:
    SKIP_DOMAINS: "fred.stlouisfed.org"
  run: |
    python3 - <<'PYEOF'
    import os, re
    from pathlib import Path
    skip_domains = os.environ.get('SKIP_DOMAINS', '').split()
    for html_file in Path('_site').rglob('*.html'):
        ...  # replace matching hrefs with href="#"
    PYEOF

This mirrors the existing linkcheck_ignore: ['https://fred.stlouisfed.org/.*'] already present in lectures/_config.yml for Sphinx's built-in checker.

Copilot AI linked an issue Apr 9, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix broken links found in documentation Fix linkcheck false positives for FRED (timeout) and update redirect URLs Apr 9, 2026
Copilot AI requested a review from mmcky April 9, 2026 07:09
Copilot finished work on behalf of mmcky April 9, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken Links Found in Documentation

2 participants