Skip to content

TST: simplify redundant tox.ini sections enabling pip_pre#16973

Merged
mhvk merged 1 commit intoastropy:mainfrom
neutrinoceros:tst/simplify_pre
Sep 12, 2024
Merged

TST: simplify redundant tox.ini sections enabling pip_pre#16973
mhvk merged 1 commit intoastropy:mainfrom
neutrinoceros:tst/simplify_pre

Conversation

@neutrinoceros
Copy link
Copy Markdown
Contributor

@neutrinoceros neutrinoceros commented Sep 9, 2024

Description

Found this while working on #16950: the way we set install_command doesn't respect recommendations from tox's docs

Must contain the substitution key {packages} which will be replaced by the package(s) to install. You should also accept {opts} – it will contain index server options such as --pre (configured as pip_pre)

It's also redundant to use install_commands to set pip's --pre flag, and it gets in the way of tox-uv (see #16950).

Other than that the change is a noop: it doesn't change anything1 to how test env behave, it's just written in a more tidy fashion, making the configuration more maintainable.

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

Footnotes

  1. well, except that it removes a -v verbose flag from pip install in devdeps. Note that it's still possible to increase pip's verbosity with the PIP_VERBOSE env var if needed.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 9, 2024

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

github-actions bot commented Sep 9, 2024

👋 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 changed the title TST: simplify redundant tox.ini sections enabling pip_pre TST: simplify redundant tox.ini sections enabling pip_pre Sep 9, 2024
@neutrinoceros neutrinoceros marked this pull request as ready for review September 9, 2024 10:05
Copy link
Copy Markdown
Contributor

@mhvk mhvk left a comment

Choose a reason for hiding this comment

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

Seems sensible but I don't feel entirely competent to judge this!

tox.ini Outdated
devdeps: true
predeps: true
!predeps: false
!devdeps-!predeps: false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We never chain these two together and my tox-fu is weak, so maybe @saimn , @astrofrog , or @Cadair can review? 🙏

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This reads as not devdeps and not predeps. There's a similar construct already on line 121.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

(and I just realized that this line is purely redundant so I removed it for clarity)

@pllim pllim added this to the v7.0.0 milestone Sep 9, 2024
@pllim pllim requested review from Cadair, astrofrog and saimn September 9, 2024 21:13
@pllim pllim added the Extra CI Run cron CI as part of PR label Sep 9, 2024
@pllim
Copy link
Copy Markdown
Member

pllim commented Sep 9, 2024

Let me also run the predeps job just to be very sure. Thanks!

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

@pllim Good to go ?

@saimn
Copy link
Copy Markdown
Contributor

saimn commented Sep 10, 2024

There is a little difference with the new version. Just 2 characters but the -v can be helpful to detect/debug installation issues/warnings, otherwise we don't see the compilation log on CI.

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

@saimn Noted. Updated to use the env variable PIP_VERBOSE = 1 and match the existing behavior.

@pllim
Copy link
Copy Markdown
Member

pllim commented Sep 10, 2024

I want to carefully inspect the logs before I approve. It is on my todo. Thanks for your patience!

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

This is now the only blocker for #16963

@mhvk
Copy link
Copy Markdown
Contributor

mhvk commented Sep 12, 2024

With two approvals, let's get it in (with auto-merge, so assuming tests pass).

@mhvk mhvk merged commit b266a40 into astropy:main Sep 12, 2024
@neutrinoceros neutrinoceros deleted the tst/simplify_pre branch September 12, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants