Fix CI: bump OpenAstronomy/github-actions-workflows to v3.0.3, fix stale docs links - #640
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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
Collaborator
Author
|
I've reviewed this (human adam here, not adam.claude) and it all looks like safe and correct infrastructure corrections. Merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-buildingset_envstep failing with:This is a known bug in
OpenAstronomy/github-actions-workflowsv2.6.x'spipx runhelper 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 inci_tests.ymlandpublish.ymlfrom v2.6.3 to v3.0.3 (latest).Coverage upload compatibility: v3.0.0 introduced a breaking change requiring a
.coveragefile at the repo root for the Codecov upload step. Ourtox.iniruns tests in.tmp/{envname}viachangedir, sopytest-covwas writing.coveragethere instead of the root. AddedCOVERAGE_FILE={toxinidir}/.coveragefor thecovfactor so it lands where the new step expects it.ci_tests / Link checksand the ReadTheDocs build, failing for reasons unrelated to the above:astroplan/plots/time_dependent.pystill referenced~matplotlib.pyplot.plot_date, left over from before Replace deprecated plot_date with plot #636 replaced the actualax.plot_date(...)calls withax.plot(...). Under Sphinx'snitpickymode this is now an unresolvable cross-reference. Updated the docstrings to match the current code.docs/tutorials/plots.rstpointed at its old, long-defunctstanford.eduURL; repointed atseaborn.pydata.org.docs/index.rst) return HTTP 405 to any non-browser request — confirmed viacurlthat this is an anti-bot WAF challenge (x-amzn-waf-action: captcha), not a dead link. Added tolinkcheck_ignore.Test plan
Verified locally (Python 3.12, since this repo now requires
>=3.11):tox -e linkcheck— was failing on the staleplot_daterefs + seaborn + ADS links, now passes cleanlytox -e build_docs— passestox -e codestyle— passestox -e py312-test— 63 passed, 45 skipped (skips arealldeps-only tests; astroquery isn't in the minimaltestextras)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