Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate tox.ini to pyproject.toml? #16318

Open
nstarman opened this issue Apr 21, 2024 · 4 comments
Open

Migrate tox.ini to pyproject.toml? #16318

nstarman opened this issue Apr 21, 2024 · 4 comments

Comments

@nstarman
Copy link
Member

nstarman commented Apr 21, 2024

What is the problem this feature will solve?

One fewer config file.

Describe the desired outcome

https://tox.wiki/en/latest/config.html#pyproject-toml

copy-paste from tox.ini to pyproject.toml

Additional context

Trying to assess the pros and cons.

@astrofrog
Copy link
Member

My initial reaction is no - tox.ini is quite long/complex as-is, and having one giant config file for everything won't necessarily help readability. After all, when it comes to Python code we encourage splitting up to avoid very long files!

@mhvk
Copy link
Contributor

mhvk commented Apr 21, 2024

Since tox is quite specifically for testing, I also think it is best kept separate. This even more so since the only way right now to include the information in pyproject.toml is as one giant string.

That said, it may pay to look if there is duplicated information.

@namurphy
Copy link
Contributor

My inclination would be to keep tox.ini separate. Putting the tox config into pyproject.toml would have the .ini content in a string called legacy_tox_ini, and I'm not sure that .ini syntax highlighting or linters would work with all IDEs if it is embedded in a TOML file. If we could get away from the .ini format (my least favorite part about using tox) and have the configuration in TOML instead, then it'd be much more tempting to put the tox configuration in pyproject.toml.

[A side note: I've been considering switching PlasmaPy from tox to nox because the configuration for nox is written in Python (https://github.com/PlasmaPy/PlasmaPy/issues/1734).]

@nstarman
Copy link
Member Author

I used nox mostly as well and like it better thus far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: TBD
Development

No branches or pull requests

5 participants