Skip to content

Commit

Permalink
Merge pull request #38 from QuantEcon/revert-35-update-help
Browse files Browse the repository at this point in the history
Revert "Update to help messages"
  • Loading branch information
mmcky committed Aug 2, 2019
2 parents ef7094e + 04c9de7 commit 1a2f8ad
Showing 1 changed file with 10 additions and 36 deletions.
46 changes: 10 additions & 36 deletions jupinx/cmd/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import sys
import copy
from typing import Dict, List
import textwrap

import locale
import sphinx.locale
Expand Down Expand Up @@ -47,52 +46,27 @@ def get_parser() -> argparse.ArgumentParser:
)
parser = argparse.ArgumentParser(
usage='%(prog)s [OPTIONS] <DIRECTORY> [ADDITIONAL OPTIONS]',
formatter_class=argparse.RawTextHelpFormatter,
formatter_class=argparse.RawDescriptionHelpFormatter,
description=description,
epilog=epilog,
)
parser.add_argument('directory', nargs='?', type=str, default='./', action='store',
help=textwrap.dedent("""
provide path to a project directory
[Optional: './' will be assumed if not specified]
""".lstrip("\n"))
)
parser.add_argument('-c', '--coverage', action='store_true', dest='coverage',
help=textwrap.dedent("""
compile coverage report for project
[Result: <project-directory>/_build/coverage/reports/{filename}.json]
""".lstrip("\n"))
)
help="provide path to a project directory (optional)")
parser.add_argument('-c', '--clean', action='store_true', dest='clean',
help="Clean build so sphinx recompiles all source documents")
parser.add_argument('-n', '--notebooks', action='store_true', dest='jupyter',
help=textwrap.dedent("""
compile a collection of Jupyter notebooks
[Result: _build/jupyter]
""".lstrip("\n"))
)
help="compile a collection of Jupyter notebooks (result: _build/jupyter)")
parser.add_argument('-t', '--coverage-tests', action='store_true', dest='coverage',
help="compile execution test report for project (result: _build/coverage/reports/{filename}.json)")
parser.add_argument('-w', '--website', action='store_true', dest='website',
help=textwrap.dedent("""
compile a website through Jupyter notebooks
[Result: _build/website/]
""".lstrip("\n"))
)
help="compile a website through Jupyter notebooks (result: _build/website/")
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=textwrap.dedent("""
Specify the number of workers for parallel execution
[Default: --parallel will result in --parallel=2 if no value is specified]
""".lstrip("\n"))
)
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=textwrap.dedent("""
Once build is complete 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"))
)
help="Once build is complete open a server to view results. [Default --view='notebooks']")
return parser

def check_directory_makefile(arg_dict):
Expand Down

0 comments on commit 1a2f8ad

Please sign in to comment.