Skip to content

Commit

Permalink
Merge pull request #39 from QuantEcon/update-help
Browse files Browse the repository at this point in the history
Update to help commands
  • Loading branch information
mmcky committed Aug 2, 2019
2 parents 1a2f8ad + 1a7009b commit 6addb42
Showing 1 changed file with 38 additions and 8 deletions.
46 changes: 38 additions & 8 deletions jupinx/cmd/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,52 @@ def get_parser() -> argparse.ArgumentParser:
epilog=epilog,
)
parser.add_argument('directory', nargs='?', type=str, default='./', action='store',
help="provide path to a project directory (optional)")
help=textwrap.dedent("""
provide path to a project directory
[Optional: './' will be assumed if not specified]
""".lstrip("\n"))
)
parser.add_argument('-c', '--clean', action='store_true', dest='clean',
help="Clean build so sphinx recompiles all source documents")
help=textwrap.dedent("""
clean build so sphinx recompiles all source documents
""".lstrip("\n"))
)
parser.add_argument('-n', '--notebooks', action='store_true', dest='jupyter',
help="compile a collection of Jupyter notebooks (result: _build/jupyter)")
help=textwrap.dedent("""
compile a collection of Jupyter notebooks
[Result: _build/jupyter]
""".lstrip("\n"))
)
parser.add_argument('-t', '--coverage-tests', action='store_true', dest='coverage',
help="compile execution test report for project (result: _build/coverage/reports/{filename}.json)")
help=textwrap.dedent("""
compile coverage report for project
[Result: <project-directory>/_build/coverage/reports/{filename}.json]
""".lstrip("\n"))
)
parser.add_argument('-w', '--website', action='store_true', dest='website',
help="compile a website through Jupyter notebooks (result: _build/website/")
help=textwrap.dedent("""
compile a website through Jupyter notebooks
[Result: _build/website/]
""".lstrip("\n"))
)
parserj.add_argument('-v', '--view', dest='view', nargs='?', type=str, const='notebooks', action='store',
help=textwrap.dedent("""
Open a server to view results for
1. notebooks
2. website
[Default: --view will result in --view=notebooks]
Example: jupinx -w lecture-source --view=website
""".lstrip("\n"))
)
parser.add_argument('--version', action='version', dest='show_version',
version='%%(prog)s %s' % __display_version__)
group = parser.add_argument_group(__('additional options'))
group.add_argument('--parallel', dest='parallel', nargs='?', type=int, const='2', action='store',
help='Specify the number of workers for parallel execution. [Default --parallel 2]')
group.add_argument('-v', '--view', dest='view', nargs='?', type=str, const='notebooks', action='store',
help="Once build is complete open a server to view results. [Default --view='notebooks']")
help=textwrap.dedent("""
Specify the number of workers for parallel execution
[Default: --parallel will result in --parallel=2 if no value is specified]
""".lstrip("\n"))
)
return parser

def check_directory_makefile(arg_dict):
Expand Down

0 comments on commit 6addb42

Please sign in to comment.