Skip to content

MNT: migrate tox configuration from tox.ini to tox.toml#19337

Draft
neutrinoceros wants to merge 4 commits intoastropy:mainfrom
neutrinoceros:mnt/tox-toml
Draft

MNT: migrate tox configuration from tox.ini to tox.toml#19337
neutrinoceros wants to merge 4 commits intoastropy:mainfrom
neutrinoceros:mnt/tox-toml

Conversation

@neutrinoceros
Copy link
Copy Markdown
Contributor

Description

would close #19334
opening now mostly so I don't loose this branch, but it's not working yet (see linked PRs and issues)

  • 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 v8.0.0 milestone Feb 26, 2026
@neutrinoceros neutrinoceros added testing Affects-dev PRs and issues that do not impact an existing Astropy release no-changelog-entry-needed dev-automation labels Feb 26, 2026
@github-actions github-actions bot added the skip-changelog-checks Tells bot to skip changlog checks label Feb 26, 2026
@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.

@astrofrog
Copy link
Copy Markdown
Member

astrofrog commented Mar 2, 2026

I'm personally not super keen on this (yet) - the reason is that if we do this we really should do it across all astropy packages for consistency, and there's something to be said for being familiar with a format. The tox.ini file is still the first one that is checked (https://tox.wiki/en/latest/reference/config.html#discovery-and-file-types). I would personally advocate waiting until the tox project recommend that existing projects migrate over to it and/or deprecate tox.ini, as it only recommends it for new projects at the moment – unless there's actually a benefit to switching over given the cost of migrating all the packages in the astropy ecosystem. At the moment, I find the TOML file a lot harder to read/parse visually, so it's not clear to me what the benefit of upgrading is.

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

neutrinoceros commented Mar 2, 2026

if we do this we really should do it across all astropy packages for consistency

definitely.

I find the TOML file a lot harder to read/parse visually

both are really hard to me. At least TOML is a well established format that is used elsewhere, so I'm still seeing a gain here:

  • reading it is a re-usable skill (while tox.ini is extremely tool specific)
  • it may put a bit of pressure on tox development to avoid making the configuration even more complex in the future (hopefully)

Though in my opinion the bulk of the benefit comes from trying to migrate now, so we get a chance to report problems upstream before the dust has settled and we're stuck between an unsupported format and something that doesn't work for us.

@astrofrog
Copy link
Copy Markdown
Member

Ok sounds good - I have no objections with having this open as an experiment (I've put the relevant label) to see if it's possible to get it working and what the final thing would look like, but I think we'll need to have a broader conversation if we want to go from experiment to actually merging this.

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 am blocking merge based on convo above. Thanks, all.

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 dev-automation Experimental no-changelog-entry-needed skip-changelog-checks Tells bot to skip changlog checks testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TST: migrating tox.ini to tox.toml

3 participants