Skip to content

TST: require pytest-doctestplus 1.0.0 or newer#17682

Merged
pllim merged 1 commit intoastropy:mainfrom
neutrinoceros:tst/dep/require_pytest-doctestplus_1.0.0
Feb 4, 2025
Merged

TST: require pytest-doctestplus 1.0.0 or newer#17682
pllim merged 1 commit intoastropy:mainfrom
neutrinoceros:tst/dep/require_pytest-doctestplus_1.0.0

Conversation

@neutrinoceros
Copy link
Copy Markdown
Contributor

Description

Follow up to #17675
Close #17681

I ran multiple tests on my fork combining the change from #16963 (really, the only option to really check minimal test requirements at the moment), against different versions of pytest-doctestplus. I found that v0.13.0 wasn't compatible and that v1.0.0 was, which makes it our de-facto minimal requirement following #17675.

  • 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.

@neutrinoceros neutrinoceros added this to the v7.1.0 milestone Jan 28, 2025
@neutrinoceros neutrinoceros added testing Affects-dev PRs and issues that do not impact an existing Astropy release labels Jan 28, 2025
@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.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

@neutrinoceros neutrinoceros added the Extra CI Run cron CI as part of PR label Jan 28, 2025
@neutrinoceros
Copy link
Copy Markdown
Contributor Author

I checked manually that "exotic archs" all have access to at least v1.2.1

@neutrinoceros neutrinoceros changed the title TST: require pytest-doctestplus 1.0.0 or newer TST: require pytest-doctestplus 1.0.0 or newer Jan 28, 2025
@neutrinoceros neutrinoceros marked this pull request as ready for review January 28, 2025 11:54
Copy link
Copy Markdown
Member

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the correct solution. The problem is pytest is ignoring us telling it to ignore extern:

"astropy[\\/]extern",

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

sure, but the fact that it only happens with pytest-doctestplus < 1.0 seems to indicate an incompatibility between older pytest-doctestplus and pytest 8.0 (which isn't too suprising: pytest-doctestplus 1.0.0 is still older than pytest 8.0.0)

@pllim
Copy link
Copy Markdown
Member

pllim commented Jan 28, 2025

pytest-doctestplus was released Aug 11, 2023. Not too recent but also not yet 2 years (as per SPEC 0 philosophy). 🤔

@bsipocz , what do you think about requiring pytest-doctestplus>=1.0 before 2 years is up?

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

I'm not sure I get the line of reasoning here as we just required pytest 8.0.0 yesterday, and it's a single year old.

@pllim
Copy link
Copy Markdown
Member

pllim commented Jan 28, 2025

True... now makes me think if we bumped pytest too soon... but I did like the code simplification. 😱

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

if it makes you feel better, the code we removed in #17675 was not actually run on a regular basis (which is the premise to #16963), so we're probably better off without it.

@pllim
Copy link
Copy Markdown
Member

pllim commented Jan 28, 2025

I will think about this and get back to you tomorrow in a couple few of days. Feel free to ping me if I forget. Thanks!

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

@pllim did you get a chance to think about it ? I still believe in this approach.

Copy link
Copy Markdown
Member

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't completely understand the root of the problem but also no time to jump in that rabbit hole given more pressing matters. And I don't hear objections, so let's do it. Thanks!

@pllim pllim merged commit 3ac4876 into astropy:main Feb 4, 2025
5 of 15 checks passed
@neutrinoceros neutrinoceros deleted the tst/dep/require_pytest-doctestplus_1.0.0 branch February 4, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Affects-dev PRs and issues that do not impact an existing Astropy release Extra CI Run cron CI as part of PR installation no-changelog-entry-needed testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TST: testing fails with minimal test requirements

2 participants