Add environment variable support for select parameters #315
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Create a mapping between environment variables and an argparse
dest
. To preserve a CLI->ENV->default order of precedence we'll look for each of the mapping's option strings in the cli paramters. If provided on the CLI, ignore the enviroment variable. If not provided use an enviroment variable if set.Environment variable are added to their respective attribute help string.
All ADE specific enviroment variables are prefaced with
ADE_
to avoid a conflict with other applicaitons.This moves and renames the
SKIP_UV
enviroment variables out to the parser asADE_UV
and adds a command line parameter to match (#278) Backward compatible support was added.This also revises the use of
VIRTUAL_ENV
such that it is the enviroment variable for the--venv
command line paramter and used if--venv
if not provided by the user. (#276). The venv will default to.venv
unless VIRTUAL_ENV is set.This cleans up the
NO_COLOR
enviroment varaible such that it is now the enviroment variable which cooresponds to the--ansi
command line parameter.Added support for
ADE_ISOLATION_MODE
mapped to--isolation_mode
Added support for
ADE_VERBOSE
mapped to-v
Tests updated as needed, largley due the correction of precedense and handling of a non existent venv, as virtual enviroments are now only build when the subcommand is
install
Additional tests forthcoming for new code.