-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update for Jlab 3 #90
Conversation
attn all those reviewing the previous PR: @martinRenou @jtpio @jasongrout @vidartf |
+ align folder structure with js cookiecutter + Update .gitignore
Looks like the output of is getting mangled somehow into:
Which I'm also seeing locally. Is that a real problem with the widget or an issue with python and printing out color characters? |
It turns out it is a real error. This is the second time I accidentally broke notebook while working on this PR. |
Probably because of the coloring? What does |
Looking into it more I think this is due to the changes to I copied the version from the widget cookiecutter: https://github.com/jupyter-widgets/widget-cookiecutter/blob/969471848da747d5aa562b8ab00988e3117e4ccf/%7B%7Bcookiecutter.github_project_name%7D%7D/%7B%7Bcookiecutter.python_package_name%7D%7D/__init__.py#L25 which uses:
but originally this cookiecutter used the python path: Lines 7 to 13 in 78716a6
Is either of these more correct? I have no idea what notebook wants. and since the npm package name has a slash in it Do notebooks for widgets work when there is a slash in the npm package name (or does the other cookiecutter work when there is a slash in the name)? |
Ahh, this is discussed in the widget-cookiecutter: jupyter-widgets/widget-cookiecutter#80 I think the python name is the best approach |
Looks like it would make sense for the nbextension yes. |
{{cookiecutter.github_project_name}}/{{cookiecutter.python_package_name}}/__init__.py
Outdated
Show resolved
Hide resolved
@ianhi looks like CI is now passing after switching to |
Nice! thanks for fixing that. I've got to do lots of lab stuff today, but I'll try to test out a generate extension in both notebook and lab this evening just to make sure it really does show up properly. |
Thanks! I just tried it locally with the following and it seems to be working fine 👍 cookiecutter https://github.com/ianhi/widget-ts-cookiecutter --checkout jlab-3
cd widgetexample
python -m pip install -e .
# check the extensions are installed
jupyter nbextension list
jupyter labextension list
# test in lab and notebook
jupyter lab example/introduction.ipynb
jupyter notebook example/introduction.ipynb |
Awesome - I see the same! So I think this is good to merge unless there are any complaints? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Building off of #83
I tested this locally and it worked in both classic notebook and jlab3.
Things I did not do:
Waiting until jupyter-widgets/widget-cookiecutter#87 resolves.
They were broken before and there is a draft fix in #86 so I didn't want to overcomplicate this PR.