Skip to content

Fix CI: bump OpenAstronomy/github-actions-workflows to v3.0.3, fix stale docs links - #640

Merged
keflavich merged 2 commits into
astropy:mainfrom
keflavich:fix-ci-actions-workflow-bump
Aug 27, 2026
Merged

Fix CI: bump OpenAstronomy/github-actions-workflows to v3.0.3, fix stale docs links#640
keflavich merged 2 commits into
astropy:mainfrom
keflavich:fix-ci-actions-workflow-bump

Conversation

@keflavich

Copy link
Copy Markdown
Collaborator

Summary

CI Tests and Wheel building have both been intermittently red on main (and on unrelated PRs, e.g. #611) for weeks, unrelated to the actual PR contents. This tracks down and fixes the root causes.

  • Load tox environments / wheel-building set_env step failing with:

    This package needs a Python matching '==3.12' and none of the interpreters on
    this system does.
    

    This is a known bug in OpenAstronomy/github-actions-workflows v2.6.x's pipx run helper scripts, fixed upstream in v3.0.2 ("allow running python helper scripts with any Python 3.12.x patch version" — OpenAstronomy/github-actions-workflows#410). Bumps the pinned SHA in ci_tests.yml and publish.yml from v2.6.3 to v3.0.3 (latest).

  • Coverage upload compatibility: v3.0.0 introduced a breaking change requiring a .coverage file at the repo root for the Codecov upload step. Our tox.ini runs tests in .tmp/{envname} via changedir, so pytest-cov was writing .coverage there instead of the root. Added COVERAGE_FILE={toxinidir}/.coverage for the cov factor so it lands where the new step expects it.

  • ci_tests / Link checks and the ReadTheDocs build, failing for reasons unrelated to the above:

    • Three docstrings in astroplan/plots/time_dependent.py still referenced ~matplotlib.pyplot.plot_date, left over from before Replace deprecated plot_date with plot #636 replaced the actual ax.plot_date(...) calls with ax.plot(...). Under Sphinx's nitpicky mode this is now an unresolvable cross-reference. Updated the docstrings to match the current code.
    • The Seaborn link in docs/tutorials/plots.rst pointed at its old, long-defunct stanford.edu URL; repointed at seaborn.pydata.org.
    • ADS's abstract pages (cited in docs/index.rst) return HTTP 405 to any non-browser request — confirmed via curl that this is an anti-bot WAF challenge (x-amzn-waf-action: captcha), not a dead link. Added to linkcheck_ignore.

Test plan

Verified locally (Python 3.12, since this repo now requires >=3.11):

  • tox -e linkcheck — was failing on the stale plot_date refs + seaborn + ADS links, now passes cleanly
  • tox -e build_docs — passes
  • tox -e codestyle — passes
  • tox -e py312-test — 63 passed, 45 skipped (skips are alldeps-only tests; astroquery isn't in the minimal test extras)

The Load tox environments / wheel-building bug is upstream and non-deterministic on the runner side, so it can't be reproduced locally — the fix is simply picking up the upstream release that resolves it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VkT4NVaQsUuACEfxpqtESS

CI Tests and Wheel building were both intermittently failing on
"Load tox environments" / the equivalent set_env step with:

    This package needs a Python matching '==3.12' and none of the
    interpreters on this system does.

This is a known bug in OpenAstronomy/github-actions-workflows v2.6.x's
pipx-run helper scripts, fixed upstream in v3.0.2 ("allow running
python helper scripts with any Python 3.12.x patch version"). Bump
the pinned SHA in ci_tests.yml and publish.yml to v3.0.3.

v3.0.0 also introduced a breaking change: the Codecov upload step now
requires a `.coverage` file at the repo root. Our tox.ini runs tests
in `.tmp/{envname}` via `changedir`, so pytest-cov was writing
`.coverage` there instead. Point `COVERAGE_FILE` at `{toxinidir}` for
the `cov` factor so it lands where the new step expects it.

Separately, `ci_tests / Link checks` and the ReadTheDocs build were
failing for unrelated reasons predating this bump:
- Three docstrings in plots/time_dependent.py still referenced
  `~matplotlib.pyplot.plot_date`, which astropy#636 replaced with
  `ax.plot(...)` in the actual code but left stale in the docs,
  triggering "reference target not found" under nitpicky mode.
- The Seaborn link in docs/tutorials/plots.rst pointed at its old,
  now-defunct stanford.edu URL; repointed at seaborn.pydata.org.
- ADS's abstract pages return a 405 to any non-browser request (an
  anti-bot WAF challenge, confirmed via curl), which linkcheck was
  treating as a broken link; added to linkcheck_ignore.

Verified locally via `tox -e linkcheck`, `tox -e build_docs`,
`tox -e codestyle`, and `tox -e py312-test` (Python 3.12, since this
repo now requires >=3.11).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VkT4NVaQsUuACEfxpqtESS
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.57%. Comparing base (1414bac) to head (5d5e006).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #640      +/-   ##
==========================================
+ Coverage   76.28%   76.57%   +0.28%     
==========================================
  Files          14       14              
  Lines        1851     1844       -7     
==========================================
  Hits         1412     1412              
+ Misses        439      432       -7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

matplotlib 3.11 fully removed Axes.plot_date() (previously just
deprecated), which was still used directly in docs/faq/iers.rst's
plot:: example -- astropy#636 only updated astroplan/plots/time_dependent.py,
missing this one. It was throwing an AttributeError during the docs
build, which sphinx's plot directive reports as a warning-turned-error
under -W, exactly matching the CI failure on PR astropy#640:

  AttributeError: 'Axes' object has no attribute 'plot_date'

My earlier local verification of this PR missed this because a stale
docs/_build cache from a prior run reused the already-rendered plot
image instead of re-executing the (broken) code block. Confirmed fixed
against a fully clean `tox -e linkcheck` / `tox -e build_docs` (with
docs/_build and the relevant .tox envs removed first).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VkT4NVaQsUuACEfxpqtESS
@keflavich

Copy link
Copy Markdown
Collaborator Author

I've reviewed this (human adam here, not adam.claude) and it all looks like safe and correct infrastructure corrections. Merging.

@keflavich
keflavich merged commit 95fe30b into astropy:main Aug 27, 2026
25 of 26 checks passed
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.

1 participant