- warn if repo is specified in config, because it doesn't make sense and will be ignored
- only override config for ref/image/run/build if specified on the cli
requires both-directions config for run and build, to handle the default being inverted in a config file
- avoid CLI defaults clobbering values from config.
Mostly by using `default=None`, and adding `if args.name is not None` checks
before assigning attributes
Allows specifying `-p9999` or `-p5555:9999` without also needing to override the default command
app retrieves port arguments from length-1 port mapping for default command,
instead of requiring random port OR overriding the whole command
Without this, you *always* needed a repo2docker_config.py
file to configure anything. This PR makes r2d match the
behavior of most traitlets based applications (like jupyter_server,
jupyterhub, nbconvert, etc)
Fixes https://github.com/jupyterhub/repo2docker/issues/1112
Added a custom action handler for '-e' and '--env' so that the
'environment' variable passed to docker reflects how docker would have
processed the same args
The initial plan was to modify our copy of the environment variables as
set via cli argparsing at the point-of-use. However, that function's
purpose is to launch a container. Adding argument processing doesn't
feel right.
The new plan is to modify our copy of the environment when the arguments
are parsed. `argparse` provides a hook to do such work: custom actions.
Add tests for image caching
Adjust tests and main app for cached builds
Remove obsolete command-line handling
Remove print statement from test
Fix subdirectory handling
Put back exception instead of sys.exit()
Argument parsing should only be used when calling from
the command line, and not be deeply tied into the class
itself. This makes it easier for folks to just set
traitlets on an empty class and start it, without having to
deal with passing arguments.
This breaks how people might already be using Repo2Docker as
a library, so should not be part of 0.7