-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
PEEP-002: Specify options via environment variables #2819
Conversation
The relevant implementation changes originally proposed in #2537 |
peeps/PEEP-002.md
Outdated
|
||
☤ | ||
|
||
Systems running not only on containerized solutions (like Kubernetes or OpenShift) are often parametrized via environment variables. The aim of this PEEP is to provide an extension to the current pipenv implementation that would simplify parametrizing options passed via environment variables. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'pipenv' should always be capitalized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjusted.
I like this idea, as pip does this, but I think it would be difficult to implement with Click. @techalchemy thoughts? |
@fridex I meant like title case, |
Fixed :)
Please check #2537 where this was implemented and discussed with @uranusjr. |
As implied in in #2537, I am generally +1 with this proposal. There are, however, some (edge) cases that need to be addressed and clarified in the PEEP. First of all, what format should the environment variables have? Should they always be Second, what would this affect manually evaluated environment variables we currently have (in Thanks for the excellent (and the very first!) PEEP entry. I hope this is a good sign we will have a much better process in Pipenv going forward :D |
Agreed! I'll let you take it from here, @uranusjr. +1 from me, assuming all details get worked out. |
(For @fridex: Feel free to update the PEEP and provide extra information regarding the topics I mentioned, including submitting additional PRs) |
+1 from me as well |
Sure will do. Unfortunately I will not be available by the end of week and the week after, so please bear with my time. Thanks! |
I think we can do a better job of documenting this in As long as you pass a prefix to the top level click context, it should percolate down to any options which have You could therefore set the prefix to Universal options like Aside: I think there's a very minor bug in the linked code, and I'll submit a fix which we should hopefully be able to get into |
@sirosen, could you be more specific with the issue (if there needs to be done patching on Pipenv side to get changes in based on click 7 fixes)? Thanks! |
No problem. If an older click is vendored or there's a patch you need to worry about conflicting, here's the exact change: If you passed an |
I have a new question. Would it be possible to blacklist certain options, or whole options of commands from being accessible from envvar? There isn’t a use case for this right now, but I feel it would be best if we can have an idea what we can do to amend edge cases when they come up. I don’t think we are patching our vendored Click. There are a few dependencies that have Click as a secondary dependency (e.g. click-completions), so we’ll need to make sure they can handle the Click 7.0 upgrade. |
Also, before I forget, discussions in this thread will need to be summarised and written up in the PEEP document. It is not enough to add a link pointing to the issue page, since comments on GitHub can be edited, or even deleted. |
No description provided.