kopia lustrzana https://github.com/jupyterhub/repo2docker
Allow passing in traitlets via commandline
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/1112pull/1123/head
rodzic
6ab41efd4d
commit
885cb464b6
|
@ -251,9 +251,10 @@ def make_r2d(argv=None):
|
||||||
print(__version__)
|
print(__version__)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
args = get_argparser().parse_args(argv)
|
args, traitlet_args = get_argparser().parse_known_args(argv)
|
||||||
|
|
||||||
r2d = Repo2Docker()
|
r2d = Repo2Docker()
|
||||||
|
r2d.parse_command_line(traitlet_args)
|
||||||
|
|
||||||
if args.debug:
|
if args.debug:
|
||||||
r2d.log_level = logging.DEBUG
|
r2d.log_level = logging.DEBUG
|
||||||
|
|
|
@ -490,7 +490,7 @@ class Repo2Docker(Application):
|
||||||
extra=dict(phase="failed"),
|
extra=dict(phase="failed"),
|
||||||
)
|
)
|
||||||
|
|
||||||
def initialize(self):
|
def initialize(self, *args, **kwargs):
|
||||||
"""Init repo2docker configuration before start"""
|
"""Init repo2docker configuration before start"""
|
||||||
# FIXME: Remove this function, move it to setters / traitlet reactors
|
# FIXME: Remove this function, move it to setters / traitlet reactors
|
||||||
if self.json_logs:
|
if self.json_logs:
|
||||||
|
|
Ładowanie…
Reference in New Issue