Ver código fonte

finish changes for extension-examples

Steven Silvester 4 anos atrás
pai
commit
7150b25f82

+ 3 - 3
jupyterlab/dynamic_labextensions.py

@@ -113,7 +113,7 @@ def develop_labextension(path, symlink=True, overwrite=False,
                 logger.info("Symlinking: %s -> %s" % (full_dest, path))
             os.symlink(path, full_dest)
         elif not os.path.islink(full_dest):
-            raise ValueError("%s exists and is not a symlink" % path)
+            raise ValueError("%s exists and is not a symlink" % full_dest)
 
     elif os.path.isdir(path):
         path = pjoin(os.path.abspath(path), '') # end in path separator
@@ -134,7 +134,7 @@ def develop_labextension(path, symlink=True, overwrite=False,
     return full_dest
 
 
-def develop_labextension_py(module, user=False, sys_prefix=False, overwrite=False, symlink=True, labextensions_dir=None, logger=None):
+def develop_labextension_py(module, user=False, sys_prefix=False, overwrite=True, symlink=True, labextensions_dir=None, logger=None):
     """Develop a labextension bundled in a Python package.
 
     Returns a list of installed/updated directories.
@@ -200,7 +200,7 @@ def watch_labextension(path, labextensions_path, logger=None, development=False,
         ext_data = json.load(fid)
 
     if ext_data['name'] not in dynamic_exts:
-        full_dest = develop_labextension_py(ext_path, sys_prefix=True)
+        develop_labextension_py(ext_path, sys_prefix=True)
     else:
         full_dest = pjoin(dynamic_exts[ext_data['name']]['ext_dir'], ext_data['name'])
         output_dir = pjoin(ext_path, ext_data['jupyterlab']['outputDir'])

+ 0 - 19
jupyterlab/upgrade_extension.py

@@ -16,25 +16,6 @@ except ImportError:
 COOKIECUTTER_BRANCH = "3.0"
 
 
-"""TODO
-[x] use the cookiecuter api directly
-[x] do no overwrite files when --no-input
-[x] make sure the name is all hypen -> underscore for python name
-[x] fix devDependencies
-[x] make sure lint still works
-[x] make sure `yarn && yarn watch` works
-[x] if not installed, run pip develop install
-[x] the symlink is in the wrong directory when running `pip install -e .` and then watching
-[ ] update cookiecutter
-[ ] test all of the advanced extensions
-[ ] test on an example with a server extension
-[ ] make a commit where we apply the auto changes to server ext
-[ ] make another commit where we apply the manual extensiosn
-[ ] write a higher-level script that goes across the whole repo
-   - leaves server extension out 
-   - gives a top level summary of folders that had setup.py in them
-"""
-
 def update_extension(target, interactive=True):
     """Update an extension to the current JupyterLab