pre-commit-ci[bot]
27c2b403db
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-10-31 22:32:14 +00:00
Erik Sundell
15a1fb6e2d
refactor: manually add transitions to f-strings
2022-10-31 21:22:32 +01:00
pre-commit-ci[bot]
5a93542321
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-10-31 21:22:32 +01:00
Min RK
6826d72aa2
allow user to specify a single port with default command
...
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
2022-10-31 12:57:23 +01:00
Simon Li
1735925116
Use enum to standardise `phase`
2022-10-03 22:49:22 +01:00
Min RK
710d533f75
add `--help-all` support
...
a bit funky, since we are combining two separate parsers
2022-01-27 14:01:45 +01:00
YuviPanda
885cb464b6
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/1112
2022-01-26 14:48:11 +05:30
Timo Rothenpieler
ad1dea14ba
Use str.partition() for --label argument parsing
2021-12-16 13:38:56 +01:00
Timo Rothenpieler
9f4827132f
Add command line option to pass extra build args
2021-12-16 13:35:58 +01:00
Timo Rothenpieler
86df151414
Add --label command line option
2021-11-24 13:22:33 +01:00
Simon Li
787d1d3aeb
Container engine is an entrypoint: repo2docker.engines
2021-07-02 12:43:15 +01:00
Simon Li
2864b692ef
app: use DockerEngine
2021-07-02 12:39:42 +01:00
Tim Head
19c698e8d3
Remove reference to `master` branch from CLI doc
2020-10-22 07:46:20 +02:00
Min RK
60555b1d05
update repo URLs for jupyterhub/repo2docker
2020-08-10 09:33:05 +02:00
Simon Li
72fbd65649
validate_image_name: mention lowercase, fix formatting
2020-07-27 20:32:34 +01:00
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