You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have had a lot of trouble trying to package and deploy jupyterlab widgets. Particularly around "module not found errors". There are many moving parts to a widget, and it would be nice to know at build time what doesn't line up.
From my investigations I can see module names pop up in the following places
package.json -> name
this is imported into js or srcversion.ts as MODULE_NAME
MODULE_NAME is used in DOMWidgetModel extending models on the js/ts side
MODULE_NAME is also used in plugin.ts in the activateWidgetExtension function via registry.registerWidget
There is also an EXTENSION_ID used for IPlugin
Then on the python side there is
_frontend.py which references a hardcoded module_name
finally in ipydatagrid.json there is the following form
I am trying to take the ipydatagrid repo as a baseline and first strip out everything to a very simple installable pip package (with it's own repo).
Then I want to put my ipywidget on to of that repo.
Another way of stating this is: "When I look at an existing working repo for an ipywidget - like ipydatagrid. I see the string ipydatagrid repeated in a variety of locations referencing different things - a python module, the name of an npm package, the MODULE_NAME of an ipywidget. and as part of the string of some type of jupyter notebook registration piece".
I understand that by convention ipydatagrid will be the same in each place, it would be nice to read an explanation of the true meaning of each occurence.
Proposed Solution
There should be some type of check command included with hatch-jupyter-builder that will make a good faith attempt to verify that all of these strings line up properly.
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋
Problem
I have had a lot of trouble trying to package and deploy jupyterlab widgets. Particularly around "module not found errors". There are many moving parts to a widget, and it would be nice to know at build time what doesn't line up.
From my investigations I can see module names pop up in the following places
package.json
->name
this is imported into
js
orsrc
version.ts
asMODULE_NAME
MODULE_NAME
is used inDOMWidgetModel
extending models on the js/ts sideMODULE_NAME
is also used inplugin.ts
in theactivateWidgetExtension
function viaregistry.registerWidget
There is also an
EXTENSION_ID
used forIPlugin
Then on the python side there is
_frontend.py
which references a hardcodedmodule_name
finally in
ipydatagrid.json
there is the following formI think this gets converted into an
install.json
I am trying to take the ipydatagrid repo as a baseline and first strip out everything to a very simple installable pip package (with it's own repo).
Then I want to put my ipywidget on to of that repo.
Another way of stating this is: "When I look at an existing working repo for an ipywidget - like ipydatagrid. I see the string
ipydatagrid
repeated in a variety of locations referencing different things - a python module, the name of an npm package, theMODULE_NAME
of an ipywidget. and as part of the string of some type of jupyter notebook registration piece".I understand that by convention
ipydatagrid
will be the same in each place, it would be nice to read an explanation of the true meaning of each occurence.Proposed Solution
There should be some type of check command included with hatch-jupyter-builder that will make a good faith attempt to verify that all of these strings line up properly.
Additional context
I filed a related bug against widget-ts-cookiecutter
jupyter-widgets/widget-ts-cookiecutter#131
The text was updated successfully, but these errors were encountered: