Ver Fonte

Fix federated example

Maciej Nowacki há 4 anos atrás
pai
commit
7d6d350d9b

+ 2 - 0
examples/federated/core_package/webpack.config.js

@@ -85,6 +85,8 @@ module.exports = [
         name: ['_JUPYTERLAB', 'CORE_OUTPUT']
       },
       filename: 'bundle.js',
+      // TODO: if this path changes we will also have to
+      // change main.py (name property inside ExampleApp)
       publicPath: 'static/lab/'
     },
     module: {

+ 3 - 1
examples/federated/main.py

@@ -26,7 +26,9 @@ def _jupyter_server_extension_points():
     ]
 
 class ExampleApp(LabServerApp):
-    name = __name__
+    # TODO: right now static url use 'name' param if this changes
+    # we have to change webpack.config.js output.publicPath
+    name = 'lab'
     load_other_extensions = False
     app_name = 'JupyterLab Example Federated App'
     app_settings_dir = os.path.join(HERE, 'build', 'application_settings')

+ 0 - 2
examples/test_examples.py

@@ -48,8 +48,6 @@ def main():
                 runner = osp.join(path, 'main.py')
                 subprocess.check_call([sys.executable, runner], cwd=cwd)
                 count += 1
-        elif osp.basename(path) == 'federated':
-            print('Skipping federated test for now')
         elif osp.exists(osp.join(path, 'main.py')):
             with tempfile.TemporaryDirectory() as cwd:
                 header(path)