Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TST: fix running a regression test with pytest 7 - #16726

Merged
pllim merged 1 commit into
astropy:mainfrom
neutrinoceros:coordinates/tst/16724/pytest_7_compat
Jul 15, 2024
Merged

pllim merged 1 commit into
astropy:mainfrom
neutrinoceros:coordinates/tst/16724/pytest_7_compat

Conversation

@neutrinoceros

@neutrinoceros neutrinoceros commented Jul 15, 2024

Copy link
Copy Markdown
Contributor

Description

This pull request is to address a spurious warning that gets in the way in the context of #16724 and which can be reproduced even on non-exotic archs with pytest 7.4.4:

$ pytest astropy/coordinates/tests/test_regression.py::test_regression_futuretimes_4302
...
============================== short test summary info ==============================
FAILED astropy/coordinates/tests/test_regression.py::test_regression_futuretimes_4302 - erfa.core.ErfaWarning: ERFA function "dtf2d" yielded 1 of "dubious year (Note 6)"
================================= 1 failed in 0.54s =================================

Fix #16724

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@pllim pllim added this to the v6.1.2 milestone Jul 15, 2024
@pllim pllim added the Extra CI Run cron CI as part of PR label Jul 15, 2024
@pllim

pllim commented Jul 15, 2024

Copy link
Copy Markdown
Member

Thanks! I just added Extra CI label. I will approve when results come in, uh, at the end of my work day (lol).

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

@pllim sorry I wasn't clear: this does not fix #16724, and extra CI will still fail, just with a less confusing log !

@pllim

pllim commented Jul 15, 2024

Copy link
Copy Markdown
Member

Well, should we also attach the fix here?

Also maybe need a rebase to pick up your mpl-dev fix?

Thanks!

@pllim

pllim commented Jul 15, 2024

Copy link
Copy Markdown
Member

I wonder if we should have a regular CI job pinned to pytest 7. 🤔

@neutrinoceros
neutrinoceros force-pushed the coordinates/tst/16724/pytest_7_compat branch from 77ef078 to 70cd098 Compare July 15, 2024 15:15
@neutrinoceros

Copy link
Copy Markdown
Contributor Author

Well, should we also attach the fix here?

That would require knowledge of a fix, which at the moment I don't have 👼🏻

Also maybe need a rebase to pick up your mpl-dev fix?

done

I wonder if we should have a regular CI job pinned to pytest 7. 🤔

I think errors are rare enough that we don't need one. In 6 month we should be able to set pytest 8.0 as our minimum requirement anyway :)

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

wait... if CI is to be believed, this is actually apparently sufficient to fix #16724 by itself. I won't pretend that I get why, but all the better.

@pllim

pllim commented Jul 15, 2024

Copy link
Copy Markdown
Member

Hmm. Okay... So maybe that warning causes pytest to throw exception at a weird place, and the ValueError: fast C time string parser failed: non-digit found where digit (0-9) required is a red herring? 🤔

@pllim pllim removed this from the v6.1.2 milestone Jul 15, 2024
@pllim

pllim commented Jul 15, 2024

Copy link
Copy Markdown
Member

Link check failure is unrelated. I will wait till aarch64 completes before approving. Thanks!

@pllim pllim added this to the v6.1.2 milestone Jul 15, 2024
@pllim

pllim commented Jul 15, 2024

Copy link
Copy Markdown
Member

If it is indeed caused by recent change by @ayshih , that means somehow the change makes the warning pops up even with the limitation of older pytest, which would theoretically mean that the backport would not be needed, but it would be obvious when the backport PR fails on the "exotic" jobs.

@pllim

pllim commented Jul 15, 2024

Copy link
Copy Markdown
Member

Thanks!

@neutrinoceros
neutrinoceros deleted the coordinates/tst/16724/pytest_7_compat branch July 15, 2024 22:04
@pllim pllim modified the milestones: v6.1.2, v7.0.0 Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TST: regression in weekly cron

2 participants