jupyter-widgets / widget-cookiecutter

A cookiecutter template for creating a custom Jupyter widget project.
BSD 3-Clause "New" or "Revised" License
257 stars 72 forks source link

Move notebook conf.d file to use python package name, which will not have a slash in it #80

Open jasongrout opened 3 years ago

jasongrout commented 3 years ago

We have an error using the cookie cutter right now if the npm package name has an org and a slash, like ‘@jupyter-widgets/example’, for example:

Traceback (most recent call last):
  File "<snip>/bin/cookiecutter", line 10, in <module>
    sys.exit(main())
  File "<snip>/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "<snip>/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "<snip>/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "<snip>/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "<snip>/lib/python3.9/site-packages/cookiecutter/cli.py", line 140, in main
    cookiecutter(
  File "<snip>/lib/python3.9/site-packages/cookiecutter/main.py", line 101, in cookiecutter
    result = generate_files(
  File "<snip>/lib/python3.9/site-packages/cookiecutter/generate.py", line 352, in generate_files
    generate_file(
  File "<snip>/lib/python3.9/site-packages/cookiecutter/generate.py", line 179, in generate_file
    with io.open(outfile, 'w', encoding='utf-8') as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/<snip>/@jupyter-widgets/example.json'
jasongrout commented 3 years ago

ping @martinRenou for review