mgedmin / check-manifest

Tool to check the completeness of MANIFEST.in for Python packages
https://pypi.org/p/check-manifest
MIT License
286 stars 37 forks source link

Read config from tox.ini #83

Open vuolter opened 7 years ago

vuolter commented 7 years ago

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 commented 7 years ago

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

vuolter commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

mgedmin commented 7 years ago

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 commented 6 years ago

@mgedmin Any progress about this enhancement? Thx.

mgedmin commented 6 years ago

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 commented 4 years ago

This was resolved by https://github.com/mgedmin/check-manifest/pull/86 ?

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

mgedmin commented 4 years ago

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.