Hal Wine
d9bf9d1a9b
--env handling now consistent with Docker
...
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
2020-04-19 16:44:48 -07:00
Hal Wine
2c9027eb80
Change location & type of fix
...
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.
2020-04-18 10:29:10 -07:00
Min RK
088cf6e308
let black have its way
2019-09-07 13:34:07 +02:00
Min RK
2871c07cc0
Merge branch 'master' into help
2019-09-07 12:16:23 +02:00
Kacper Kowalik (Xarthisius)
f80fb4b39b
Handle root user case more gracefully. Fixes #696
...
If user_id is root, exit only from cmdline. Raise exception if r2d was
invoked as a library.
2019-06-28 11:46:01 -05:00
Tim Head
8b004e06dc
Apply auto formatting
...
Apologies to anyone finding this commit via git blame or log
run the autoformatting by
pre-commit run --all-files
2019-06-03 21:37:25 +02:00
Tim Head
92d69010c7
Merge pull request #652 from betatim/fix-memory-limit
...
[MRG] Fix handling of memory limit command line argument
2019-04-30 21:34:52 +02:00
yuvipanda
c8cff1bccc
Fix typo in comment
2019-04-30 10:46:34 -07:00
Joseph Hamman
6de4c5ea6b
add unit tests for binder dir
2019-04-30 08:35:58 -07:00
Tim Head
24eb3f923a
Fix handling of memory limit command line argument
...
If a string of only numerals is passed as argument we assume it should
be converted to an integer and specifies a size in bytes.
2019-04-27 10:49:32 +02:00
yuvipanda
5ba1e0dd44
Check if '--debug' is set properly
...
Fixes #563
2019-02-07 14:49:25 -08:00
Tim Head
e7018d7ca5
Add caching of already built repositories
...
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()
2018-12-21 11:20:51 +01:00
yuvipanda
21154d3b86
Use REPO_DIR rather than REPO_PATH
...
https://github.com/jupyter/repo2docker/pull/507#issuecomment-448184651
is a good justification
2018-12-18 11:50:35 -08:00
yuvipanda
8b26bbe4e0
Allow setting REPO_PATH from commandline
2018-12-18 11:50:24 -08:00
yuvipanda
d97219b420
Provide help text for commandline arguments
2018-12-17 16:27:18 -08:00
James Bourbeau
cc98e3f041
Add ArgumentParser description
2018-12-17 13:49:43 -06:00
James Bourbeau
9421c73117
Add CLI API docs
2018-12-17 13:06:32 -06:00
Min RK
22de9f40d0
get unittests passing again
...
fix some relative paths, temporary dirs, etc.
2018-12-17 13:11:45 +01:00
yuvipanda
0a1d9e3d5f
Add test for valid & invalid docker image names
2018-12-14 13:15:33 -08:00
yuvipanda
183d504515
Add test for cleanup_checkout
2018-12-14 13:15:33 -08:00
yuvipanda
a44aed7664
Add some argument parsing tests
...
And fix the one bug discovered in this process
2018-12-14 13:15:33 -08:00
yuvipanda
8f56061e69
Don't call sys.exit from inside the class
...
Instead, we raise exceptions that can be caught and
handled by calling code instead
2018-12-14 13:15:33 -08:00
yuvipanda
a0ad3f92e3
Rename 'build' to 'dry_run'
...
A better description
2018-12-14 13:15:33 -08:00
yuvipanda
ac700c49be
Split 'build' function out of start
2018-12-14 13:15:33 -08:00
yuvipanda
cd04da56fc
Move cleanup_checkout automatic determination to main()
...
This is automaticaly determined only from commandline args,
so it should be in __main__
2018-12-14 13:15:33 -08:00
yuvipanda
e1ead75302
Move argument parsing out of Repo2Docker class
...
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
2018-12-14 13:15:33 -08:00
Carol Willing
e85918b024
minor edit
2018-03-15 12:12:44 -07:00
yuvipanda
6505ddc564
Allow running just-built container
...
- make push optional
2017-05-22 22:55:17 -07:00
yuvipanda
a7d85c48fc
Fix __main__ entrypoint to actually work
2017-05-22 21:30:28 -07:00
yuvipanda
e3224392e0
Add a __main__ and an entrypoint
2017-05-22 20:39:12 -07:00