I am new to extension making. I followed the “Let’s Make an Astronomy Picture of the Day JupyterLab Extension”, made it work (so my extension has “jupyterlab_apod” as name), and edited code so that it does what I want it to do (which is nothing to do with fetching and showing a picture). Now, I want to publish it under the name that reflects what it is. How do I rename it from here?
Thanks!
P.S.
The tutorial has a few minor issues if you really try to follow (like the definition of APODWidget does not have closing brace and trying to jlpm add at the suggested points causes an error as the code is not complete yet, etc.
It looks like I just grep for all occurrences of the example name and replace it everywhere, including the directory name the build system does take care of it. So it was okay in the end.
Or not. actually. At one point (I don’t remember changing any workflow nor stopped the server or such) it started picking up the old extension and code modification to the current files does not change the system anymore. In the Chrome debugger’s file tree, it shows the old original name as a package name.
In case anyone else is trying to do this again and fail to do so, I managed to change the extension name (and the released package name) with the following steps :
Inside your conda environment : jlpm clean:all
Search and replace all occurrences of your <extension-name> in all your extension files and replace with the new name (for ex through VS Code Search extension)
Double check for occurrences with or without underscores ‘_’ and hyphens ‘-’
Through your device file explorer, search your extension name, this time to replace all folders or files that are named after your extension
Inside your conda environment : pip uninstall <extension-name>
pip install -ve .
jupyter labextension develop --overwrite .
jlpm run watch to check if the build works fine
jupyter lab test your extension
git add, commit and push
Check the build and check release workflows to make sure nothing is failing
Release the new package with Step 1: Prep Release and Step 2: Publish Release workflows
Now you should have a published package with the new name.