Skip to content

Commit

Permalink
Invert option
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 12, 2024
1 parent a2b630f commit 0f9d91c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nbsite/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ def main(args=None):

build_parser = subparsers.add_parser("build", help=inspect.getdoc(build))
build_parser.add_argument('--what',type=str,help='type of output to generate',default='html')

build_parser.add_argument('--project-name', type=str, help='name of project', default='')
build_parser.add_argument('--org',type=str,help='github organization',default='')
build_parser.add_argument('--host',type=str,help='host to use when generating notebook links',default='GitHub')
build_parser.add_argument('--repo',type=str,help='name of repo',default='')
build_parser.add_argument('--branch',type=str,help='branch to point to in notebook links',default='main')
build_parser.add_argument('--binder',type=str,help='where to place binder link',choices=['bottom', 'top', 'both', 'none'], default='none')
build_parser.add_argument('--disable-parallel',action=argparse.BooleanOptionalAction,help='whether to disable building the docs in parallel')

build_parser.add_argument('--output',type=str,help='where to place output',default="builtdocs")
_add_common_args(build_parser,'--project-root','--doc','--examples', '--overwrite')
Expand Down
4 changes: 2 additions & 2 deletions nbsite/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def build(what='html',
branch='main',
org='',
binder='none',
parallel=False,
disable_parallel=False,
examples='examples',
examples_assets='assets',
clean_dry_run=False,
Expand Down Expand Up @@ -90,7 +90,7 @@ def build(what='html',
for path in glob.glob(os.path.join(paths['doc'], '**', '*.ipynb'), recursive=True):
print('Removing evaluated notebook from {}'.format(path))
os.remove(path)
extras = ["-j", "auto"] if parallel else []
extras = [] if disable_parallel else ["-j", "auto"]
cmd = ["sphinx-build", "-b", what, paths['doc'], output] + extras
subprocess.check_call(cmd, env=merged_env)
print('Copying json blobs (used for holomaps) from {} to {}'.format(paths['doc'], output))
Expand Down

0 comments on commit 0f9d91c

Please sign in to comment.