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

Read config from tox.ini #83

Open
vuolter opened this issue Jul 10, 2017 · 9 comments
Open

Read config from tox.ini #83

vuolter opened this issue Jul 10, 2017 · 9 comments

Comments

@vuolter
Copy link

vuolter commented Jul 10, 2017

Currently check-manifest reads its configuration just from the setup.cfg file.
Because the setup.cfg is basically an ini file, read the same config from the, widely used, tox.ini file should not to be so hard. Just an idea. Bye.

@mgedmin
Copy link
Owner

mgedmin commented Jul 10, 2017

I'm not opposed to the idea, but when would this be useful?

@vuolter
Copy link
Author

vuolter commented Jul 10, 2017

Like many devs I use travis for ci and tox for tests. Travis can be set to deploy and release code automatically, so you can use tox in travis for testing and check-manifest in tox for manifest validation. In short you can verify the manifest before the code is deployed. In this context, I think put the check-manifest config in the tox.ini would more "coherent".

@mgedmin
Copy link
Owner

mgedmin commented Jul 10, 2017

Makes sense.

The only thing remaining is to decide which config file should take preference if I find configuration in both files.

I remember there was a tool that could be configured in tox.ini (or setup.cfg, or its own config file), but I'm not sure which one it was -- flake8? coverage? Whichever it was, I would like to copy their priorities, for consistency.

@mgedmin
Copy link
Owner

mgedmin commented Jul 10, 2017

The tool I was thinking of was coverage -- but the docs don't say which config file takes precedence.

@mgedmin
Copy link
Owner

mgedmin commented Jul 10, 2017

The source code indicates that coverage reads .coveragerc, then setup.cfg, then tox.ini, and it stops after the first file that has any configuration.

I was thinking of simply passing multiple filenames to ConfigParser, which would merge the configs.

@vuolter
Copy link
Author

vuolter commented Oct 14, 2017

@mgedmin Any progress about this enhancement? Thx.

@mgedmin
Copy link
Owner

mgedmin commented Oct 16, 2017

Would you care to provide a pull request? I find it hard to motivate myself to work on something when I'm not sure how it should work.

@jayvdb
Copy link

jayvdb commented Dec 30, 2019

This was resolved by #86 ?

There is now also pyproject.toml support, and that is the new recommended approach.

@mgedmin
Copy link
Owner

mgedmin commented Dec 30, 2019

There is now also pyproject.toml support, and that is the new recommended approach.

Recommended by whom? ;-)

I personally do not like pyproject.toml for 3rd-party tool settings because it has surprising side effects: it also requires that you switch your Python project to a PEP-518 build configuration.

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

No branches or pull requests

3 participants