Merge branch 'add/circleci' of github.com:vsoch/repo2docker into add/circleci

pull/351/head
Vanessa Sochat 2018-07-18 12:11:32 -07:00
commit 07f8de0585
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 55B56B9BF3B77E5C
3 zmienionych plików z 20 dodań i 4 usunięć

Wyświetl plik

@ -20,8 +20,8 @@ repo2docker is called with this command::
where ``<URL-or-path to repo>`` is a URL or path to the source repository.
For example, use the following to build an image of the
`Python Pytudes notebook <https://github.com/norvig/pytudes>`_::
For example, use the following to build an image of Peter Norvig's
`Pytudes <https://github.com/norvig/pytudes/>`_::
jupyter-repo2docker https://github.com/norvig/pytudes
@ -47,7 +47,7 @@ Python 3.6 unless you include the version of Python in your
Python 2.7, 3.5, and 3.6. In the case of this repo, a Python version is not
specified in their configuation files and Python 3.6 is installed.
`Python Pytudes Repository <https://github.com/norvig/pytudes>`_
`Pytudes <https://github.com/norvig/pytudes>`_
uses a `requirements.txt file <https://github.com/norvig/pytudes/blob/master/requirements.txt>`_
to specify its Python environment. ``repo2docker`` uses ``pip`` to install
dependencies listed in the ``requirement.txt`` in the image. To learn more about

Wyświetl plik

@ -217,6 +217,7 @@ class Repo2Docker(Application):
def get_argparser(self):
"""Get arguments that may be used by repo2docker"""
argparser = argparse.ArgumentParser()
argparser.add_argument(
'--config',
default='repo2docker_config.py',
@ -342,6 +343,14 @@ class Repo2Docker(Application):
type=str,
help=self.traits()['appendix'].help,
)
argparser.add_argument(
'--version',
dest='version',
action='store_true',
help='Print the repo2docker version and exit.'
)
return argparser
def json_excepthook(self, etype, evalue, traceback):
@ -357,6 +366,13 @@ class Repo2Docker(Application):
"""Init repo2docker configuration before start"""
if argv is None:
argv = sys.argv[1:]
# version must be checked before parse, as repo/cmd are required and
# will spit out an error if allowed to be parsed first.
if '--version' in argv:
print(self.version)
sys.exit(0)
args = self.get_argparser().parse_args(argv)
if args.debug:

Wyświetl plik

@ -5,7 +5,7 @@ import shutil
import subprocess
import sys
from traitlets import Integer
from traitlets import Integer, TraitError
def execute_cmd(cmd, capture=False, **kwargs):