I tried to use the cookie cutter command, but there was a key error when Jupyter Book tried to write the files.
$ jupyter-book create docs/ --cookiecutter
You've downloaded /home/hankdoupe/.cookiecutters/cookiecutter-jupyter-book before. Is it okay to delete and re-download it? [yes]: yes
author_name [Captain Jupyter]: Hank Doupe
github_username [hankdoupe]: hdoupe
book_name [my-book]: docs
book_slug [docs]: docs
book_short_description [This cookiecutter creates a simple boilerplate for a Jupyter Book.]: Developer documentation for Compute Studio.
version ['0.1.0']:
Select open_source_license:
1 - MIT license
2 - BSD license
3 - ISC license
4 - Apache Software License 2.0
5 - GNU General Public License v3
Choose from 1, 2, 3, 4, 5 [1]: 5
Select include_ci:
1 - github
2 - gitlab
3 - no
Choose from 1, 2, 3 [1]: 1
Traceback (most recent call last):
File "/home/hankdoupe/miniconda3/lib/python3.8/site-packages/cookiecutter/generate.py", line 352, in generate_files
generate_file(
File "/home/hankdoupe/miniconda3/lib/python3.8/site-packages/cookiecutter/generate.py", line 175, in generate_file
rendered_file = tmpl.render(**context)
File "/home/hankdoupe/miniconda3/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/home/hankdoupe/miniconda3/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/home/hankdoupe/miniconda3/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "./LICENSE", line 82, in top-level template code
jinja2.exceptions.UndefinedError: 'collections.OrderedDict object' has no attribute 'project_short_description'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hankdoupe/miniconda3/bin/jupyter-book", line 8, in <module>
sys.exit(main())
File "/home/hankdoupe/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/hankdoupe/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/hankdoupe/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/hankdoupe/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/hankdoupe/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/hankdoupe/miniconda3/lib/python3.8/site-packages/jupyter_book/commands/__init__.py", line 286, in create
book = cookiecutter(cc_url, output_dir=Path(path_book))
File "/home/hankdoupe/miniconda3/lib/python3.8/site-packages/cookiecutter/main.py", line 101, in cookiecutter
result = generate_files(
File "/home/hankdoupe/miniconda3/lib/python3.8/site-packages/cookiecutter/generate.py", line 359, in generate_files
raise UndefinedVariableInTemplate(msg, err, context)
cookiecutter.exceptions.UndefinedVariableInTemplate: Unable to create file 'LICENSE'. Error message: 'collections.OrderedDict object' has no attribute 'project_short_description'. Context: OrderedDict([('cookiecutter', OrderedDict([('author_name', 'Hank Doupe'), ('github_username', 'hdoupe'), ('book_name', 'docs'), ('book_slug', 'docs'), ('book_short_description', 'Developer documentation for Compute Studio.'), ('version', "'0.1.0'"), ('open_source_license', 'GNU General Public License v3'), ('include_ci', 'github'), ('_template', 'gh:executablebooks/cookiecutter-jupyter-book')]))])
No errors.
$ jupyter-book build mybook
ERROR ...
$ jupyter-book --version
Jupyter Book: 0.8.2
MyST-NB: 0.10.1
Sphinx Book Theme: 0.0.37
MyST-Parser: 0.12.10
Jupyter-Cache: 0.4.1
NbClient: 0.5.0
(base) ~/compute-studio
$ python --version
Python 3.8.1
(base) ~/compute-studio
Thanks for taking a look at this! I'm just getting started with Jupyterbooks and the cookie cutter command seemed like the right way to template everything out!