-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
Add config file #604
Comments
I would suggest to go with a Nice suggestion 👍 |
How about a |
I haven't looked much at the |
It’s not meant to (the section names are made to match setup.py commands), but some tools look there too. A difference is that a tox.ini section like |
Perhaps the standardized [tool.pip-tools]
# ... |
Any progress on this so far?
|
If anyone wants to take this on, I think a really good option would be to copy the code from the
(I would remove the |
IMO a function or script is better for this case than a configuration, as what we need to get done is often an ordered sequence of commands, not just specific options to a single invocation. So for standardizing the operations across a team, I would either use a shell script, a Makefile (actually I wouldn't but if you like Makefiles go for it), or some invocation helper such as invoke, taskipy, poethepoet, pypyr, or doit (taskipy and poethepoet being most shell-command-friendly I think, and with definitions inside EDIT: or nox |
I think it would really help with (IMO) no inconsistency to add support for configuration in In projects like
|
The problem we face with doing something like this is fragmentation. If my org scales to 2000 repos (as I estimate it will) I don't want to have to maintain 2000 different It's much more convenient to update settings in |
FWIW you can use taskipy or poethepoet, where the task definitions exist inside pyproject.toml. |
Those are probably better than a completely free-form approach like nox but they still offer arbitrary command invocation like shell syntax. I'd like completely declarative configuration that I can statically analyse, validate and upgrade, no imperative code or command lines. |
What do you think about, rather than specifying a single set of always-on options, the pyproject.toml could contain any number of named pip-tools "profiles" (sets of options), which would be used by explicitly passing something like And any other passed arguments would override individual options in the profile? |
FWIW, I'd also like a separate config file. Using a single config for randomly smashed sections from different tools is really terrible for maintaining configs through multiple projects. |
How does this sound? Three possible config files
If that sounds good, decisions remaining include:
I don't love toml but it's the natural choice here. |
Took a stab at a PR for this. My team uses pip-tools and AWS CodeArtifact - when we |
@j00bar Do you have any thoughts regarding the points and questions in my previous comment? |
Sure.
I chose this approach to try for "make simple things simple and complex things possible". |
@j00bar I'll be insisting on having an option to have a section in a dedicated config so that on-scale FOSS maintenance isn't insufferable... |
is this config file option released? |
The PR is labeled that it will be included in the 6.14.0 release. |
I end up writing wrapper scripts to pass options (like no-header) and support multiple .in files (#532).
If pip-compile knew to find its options in
.pip-tools.cfg
ortox.ini
(many Python development tools such as pytest, flake8, coverage can find their config in tox.ini, even when they’re not run inside tox), I would put the options there and tell my co-workers they can simply runpip-compile file.in
.Idea taken from pip-tools’ fork prequ.
The text was updated successfully, but these errors were encountered: