Merge pull request #515 from jrbourbeau/api-docs

Add command line API to docs
pull/518/head
Yuvi Panda 2018-12-17 16:28:13 -08:00 zatwierdzone przez GitHub
commit 82faafcf98
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
6 zmienionych plików z 19 dodań i 2 usunięć

Wyświetl plik

@ -15,6 +15,7 @@ jobs:
- restore_cache:
keys:
- cache-pip
- run: pip install --user -e .
# Install the packages needed to build our documentation
# This will depend on your particular package!
- run: pip install --user -r docs/doc-requirements.txt

Wyświetl plik

@ -11,6 +11,7 @@ recommonmark = "*"
alabaster = "*"
Sphinx = ">=1.4,!=1.5.4"
alabaster_jupyterhub = "*"
sphinxcontrib-autoprogram = "*"
[packages]
repo2docker = {path=".", editable=true}

Wyświetl plik

@ -4,3 +4,4 @@ sphinx>=1.4, !=1.5.4
recommonmark
alabaster
alabaster_jupyterhub
sphinxcontrib-autoprogram

Wyświetl plik

@ -33,7 +33,9 @@ import recommonmark.parser
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.extlinks']
extensions = ['sphinx.ext.extlinks',
'sphinxcontrib.autoprogram',
]
extlinks = {
'issue': ('https://github.com/jupyter/repo2docker/issues/%s', 'Issue #'),

Wyświetl plik

@ -107,4 +107,12 @@ be used by docker directly.
jupyter-repo2docker --no-build --debug https://github.com/norvig/pytudes
Command line API
================
.. autoprogram:: repo2docker.__main__:argparser
:prog: jupyter-repo2docker
.. _Pytudes: https://github.com/norvig/pytudes

Wyświetl plik

@ -37,7 +37,9 @@ def validate_image_name(image_name):
def get_argparser():
"""Get arguments that may be used by repo2docker"""
argparser = argparse.ArgumentParser()
argparser = argparse.ArgumentParser(
description='Fetch a repository and build a container image',
)
argparser.add_argument(
'--config',
@ -194,6 +196,8 @@ def get_argparser():
return argparser
argparser = get_argparser()
def make_r2d(argv=None):
if argv is None: