-
Notifications
You must be signed in to change notification settings - Fork 304
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
Enable ServerApp to discover ExtensionApps (and their config). #180
Enable ServerApp to discover ExtensionApps (and their config). #180
Conversation
66668a0
to
3bc3815
Compare
Hi Zach, I have done a few tests with this branch. My jlab work is completed since yesterday and works fine with master. With this branch, I face 2 issues [1] Running jupyter lab does not return exception, but a 404 in the browser. I have then used the example branch and the extensions examples work fine with this branch. I would suggest: [1] merge #117 so it is easier to have a debuggable baseline upon the tests. |
@Zsailer This is the exception I receive when I run an example. Would it be related to the new method introduced here for the metadata or the _jupyter_server_extension_paths? If such, any tip to solve it? Traceback (most recent call last):
File "main.py", line 37, in <module>
ExampleApp.launch_instance()
File "/Users/echar4/datalayer/repos/jupyter-server/jupyter_server/extension/application.py", line 450, in launch_instance
load_other_extensions=cls.load_other_extensions
File "/Users/echar4/datalayer/repos/jupyter-server/jupyter_server/extension/application.py", line 366, in initialize_server
serverapp.initialize(argv=argv, load_extensions=load_other_extensions)
File "<decorator-gen-7>", line 2, in initialize
File "/opt/datalayer/opt/miniconda3/envs/jlab-server/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/echar4/datalayer/repos/jupyter-server/jupyter_server/serverapp.py", line 1684, in initialize
self.init_server_extension_config()
File "/Users/echar4/datalayer/repos/jupyter-server/jupyter_server/serverapp.py", line 1492, in init_server_extension_config
_, metadata = _get_server_extension_metadata(modulename)
File "/Users/echar4/datalayer/repos/jupyter-server/jupyter_server/extension/serverextension.py", line 381, in _get_server_extension_metadata
raise KeyError(u'The Python module {} does not include any valid server extensions'.format(module))
KeyError: 'The Python module __main__ does not include any valid server extensions' |
To reproduce, you need those 2 branches jupyterlab/jupyterlab#7416) and jupyterlab/jupyterlab_server#79. Then go to |
I have added this in the jupyterlab_server handler and th example work back. Still, I receive a 404 with the full jupyter lab command even adding _jupyter_server_extension_paths on the lab handler. The good think is that
|
All good now - Lab is working again . I have added a TODO to discuss later on the impact |
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.
I'm coming from this less updated to recent changes to the codebase, so take my questions below with a grain of salt :)
3bc3815
to
4e2e989
Compare
Checkout #188. There are some significant inconsistencies in our extension loading framework. I'd like to revisit them, fix it here, and rewrite our documention in this PR. Adding a [WIP] tag until I've finished. |
@echarles Thanks a bunch for testing out this PR. I've been making some significant changes to the extension loading API as it has many inconsistencies. I'm hoping we smooth some of these issues. |
I think this is ready for final review. |
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.
LGTM. Also tested with jlab extension
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! I had a look, and added some comments. Some of them are simply on readability, as I'm not 100% fresh on what is the current logic. Some of them might just end up as informational.
@property | ||
def serverapp(self): | ||
key = "serverapp" | ||
return self.settings[key] |
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.
I'm confused by the property names used here: serverapp
is a property that maps onto settings
. One implies a ServerApp instance, the other a settings value (not typically run-time objects?).
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.
Hm, the weird thing is that we pass all kinds of run-time objects to the webapp settings (kernel manager, contents manager, session manager, etc.) I agree, this probably isn't best practice but would take an extension refactor.
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.
So wait, what is type(self.settings[key])
here? ServerApp
?
if self.reraise_server_extension_failures: | ||
raise | ||
self.log.warning(_("Error loading server extension %s"), modulename, | ||
exc_info=True) |
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.
Should we not keep this exception guard? Or is its implementation moved? I.e. shouldn't the actual calling of the load_jupyter_server_extension
function be guarded?
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.
Depends on what you mean. It is guarded in that, if it no load_jupyter_server_extension function is found, the serverapp doesn't crash but throws (more helpful) console log warnings. This PR improves the overall messaging around server extension failures.
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.
I meant: Previously, this code had a try: load_jupyter_server_extension(...) except Exception self.log.warning("Error loading server extension" ...)
. Now it has:
try:
# This function was prefixed with an underscore in in v1.0
# because this shouldn't be a public API for most extensions.
func = getattr(extension, '_load_jupyter_server_extension')
func(self)
self.log.debug(log_msg)
except AttributeError:
# For backwards compatibility, we will still look for non
# underscored loading functions.
func = getattr(extension, 'load_jupyter_server_extension')
func(self)
self.log.debug(log_msg)
except:
warn_msg = _(
"{extkey} is enabled but no "
"`_load_jupyter_server_extension` function "
"was found.".format(extkey=extkey)
)
self.log.warning(warn_msg)
So if the load_jupyter_server_extension
throws an error (AttributeError
or not), the error message will be less informative.
jupyter_server/serverapp.py
Outdated
extapp = metadata.get('app', None) | ||
extloc = metadata.get('module', None) | ||
# Load the extension module. | ||
if extapp and extloc: |
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.
I read this logic as "if an ExtensionApp, use new initialization path, if not, use old one". It is unclear to me if we should initialize all ExtensionApp
s this way, or only the one being initialized as the main app?
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.
I think all ExtensionApp
s should be initialized the same way by the server... currently that's by creating and instance of the app and calling link_to_serverapp
.
I can see that it's a bit weird that I'm checking extloc
here too. My intention was that extloc
should always be found in metadata
. If it's not found, the extension should not be initialized and a warning thrown below.
99ed058
to
9ca9cb2
Compare
I fired off a restart on this, just to see if py3.7 terminal test succeeds. I suspect the timeout on that particular test may need to be increased. It's too bad there isn't a way to restart a single job with GH actions - at least that I could find. |
# This function was prefixed with an underscore in in v1.0 | ||
# because this shouldn't be a public API for most extensions. | ||
func = getattr(extension, '_load_jupyter_server_extension') | ||
func(self) |
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.
This is the line I meant should be guarded with an "Error loading server extension"
warning.
func = getattr(extension, 'load_jupyter_server_extension') | ||
func(self) | ||
self.log.debug(log_msg) | ||
except: |
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.
And this one will swallow Ctrl+C kills.
… version 2.0.0 Afshin T. Darian (7): Add schema to settings list Update tests. Release 2.0.0b9 Bump jupyter_server dependency Release 2.0.0rc0 dynamic => federated Release 2.0.0rc1 Afshin Taylor Darian (7): Remove out of date LICENSE reference to json_minify (#135) Respect environment for page_config.json (#133) Update page_config handling (#137) Ensure there is a disabled_key (#138) Handle source extensions that are disabled (#140) Update for new jupyter_server pytest plugin interface (#141) Unpin pytest version (#143) Alex Bozarth (2): Fixed bug where disabled extensions still ran Fix var name typo from prev commit (#139) Brian E. Granger (1): Changes needed for improved single document mode (#101) Eric Charles (72): initial working version for jupyterlab as sever extension - See also TODO ECH user jupyter_server - tests need to be updated revert the .jp-Notebook in the shortcut extension definition add jupyter_server as deps - will need to pin the version once jupyter_server released install jupyter_server from @Zsailer branch use jupyter_server master user master jupyter server revert the py deps depends on jupyter server master dependency links deps from git more iteration to use the jupyter_server pytest plugin more iteration to use the jupyter_server pytest plugin handlers are now working fine extensionhandler is a mixin more tests for the settingshandler settings api test ok test workspaces are ok add github actions and exra_requires for test convert posixpath to str for py3.5 add py3.7 and 3.8 to travis handler loading jupyterlab_server pytest plugin rename make_lab_extension_app add a TODO to pin to a released jupyter_server once available add missing import ensure default mathlab_url add todo to remove cdn usage update to take jupyter-server/jupyter_server#180 use zach repo use zach repo Update to the latest jupyter_server.git@discover-extensionapp-config Make examples test green ProcessApp is a server extension ProcessApp comment Order methods Use extension_url to align to latest jupyter server branch Fix listings app fixture link to server use jupyter_server master user jupyter server py35 branch Remove duplicated extension_url property Use name instead of extension_name listings url Use jserver extension-loadin branch Use ZSailer repo Fix more tests Better handlers Add back tree_url Remove space Migrate transation test Remove notebook deps from translation handler Manually install branches for GitHub Actions Fix deps for tests Try uninstall and install jupyter_server Try again jupyter_server deps Try to clone jupyter_server Try to clone jupyter_server Remove github actions main.yml relax pytest coverage Use MASTER_URL_PATTERN Remove travis.yml Try with pip cache disablee on Github Actions Enable temporary git clone to install jupyter_server Use _jupyter_server_extension_points Correct url pattern Depend on released jupyter_server Depend on jupyter_server 1.0.0rc2 Depend on jupyter_server 1.0.0rc3 Enable back the pip cache on github actions Use blocked/allowed extensions naming in JupyterLab Server (#111) app_version should be a trait (#117) Gonzalo Peña-Castellanos (3): Add translations handler (#96) Add CI with github (#100) PR: Add other OS and update py versions (#102) Jason Grout (4): Update minimum python version to 3.6 (#119) Cache lab extension assets by default (#121) Support a metadata file in the lab extension directory (#132) Update jupyter_server requirement to 1.* instead of 1.1.* (#144) Nicholas Bollweg (4): Add last_modified and created to settings and workspace API items (#99) fix file mtime/ctime confusion, restore win3.8, patch event loop (#107) UTF-8 all over, test with big unicode string (#108) don't patch event loop for tornado 6.1+ (#142) Steven Silvester (31): Release 1.3.0rc0 Release 2.0.0a0 Release 2.0.0a1 Add handling of dynamic labextensions (#109) Release 2.0.0a2 Fix open_browser for process apps (#110) Release 2.0.0a3 Release 2.0.0a4 Change payload parsing to accept JSON5 as raw string in JSON payload (#114) Release 2.0.0b0 Use tilde for server requirement (#116) Release 2.0.0b1 Release 2.0.0b2 Release 2.0.0b3 Release 2.0.0b4 Release 2.0.0b5 Allow default setting overrides to be configurable in jupyter config (#122) Release 2.0.0b6 Clean up handling of config (#123) Release 2.0.0b7 Add handling of incomplete dynamic extension data (#124) Release 2.0.0b8 Release 2.0.0rc2 Release 2.0.0rc3 Release 2.0.0rc4 Release 2.0.0rc5 Release 2.0.0rc6 Release 2.0.0rc7 Release 2.0.0rc8 Release 2.0.0rc9 Release 2.0.0 Zachary Sailer (2): fix spurious logging issue (#115) Added support for fullStaticUrl and fix handling of base_url (#120) Zsailer (5): patches to support new extension loading module in jupyterlab working tests remove commented lines and fix minor bug in handlers renamed linking method in pytest plugin upgrade pip user
…n 3.0.1 Adam Liddell (3): Remove absolute document search pane width Remove absolute width on search pane replace <input> Replace width with min-width in document search pane Afshin T. Darian (170): Add a shell JupyterLab extension. Add debugger to right panel. Remove launcher item for now as well. It may be unnecessary. Add initial interfaces. session management Add scaffold file and notebook debugger plugins. Add console plugin. Export console plugin. Update restoration. Update plugin architecture. Fix IDs. Add more scaffolding. More scaffolding Export sidebar and update its model when tracker changes. Add setter/getter for sidebar model and sync it to tracker. Update some conventions, add license, minor clean up. More clean up. Clean up. More clean up. No underscore variable names. Simplify table. Refactor model. Update description public API usage. Use @jupyterlab/apputils Toolbar for breakpoints. Remove toolbar from utils Update sidebar styles. Refactor breakpoints. Move style import. Update sidebar styles. More style clean up. Skip two failing tests, fix in later iteration. Add initial design document. Update description Add more description. Describe debugger switching behaviors. Add more details about restoration, fix typo Fix design file location. Rename/reorganize some paths. BROKEN - just for comments Export debugger sidebar. Add sessionChanged signal. Remove token for sidebar. Add `mode` to IDebugger. Remove IDebuggerSidebar. Add IDebugger.Mode Update getters/setters + signals for `mode` and `session`. work in progress -- broken state more work in progress Clean up import order in `handlers` and `index`. Rename handler classes. v0.1.0-alpha.1 v0.1.0-alpha.2 v0.1.0-alpha.3 v0.1.0-rc.1 Remove unused dependency. v0.1.0 v0.1.1 v0.1.2 v0.2.0-alpha.1 v0.2.0-alpha.2 Update CSS Simplify header. Simplify title. Simplify header. Add doc strings Add super.dispose to debugger dispose method. v0.2.0-alpha.3 WIP v0.2.0-beta.1 Wrap constraint arguments in `conda` command in quotation marks. Update binder dependency versions. xeus-python=0.6.12 v0.2.0-rc.1 v0.2.0 Install libgbm1 Upgrade to xeus-python 0.7.1 v0.3.0-alpha.1 Add canvas as a dev dependency to facilitate DataGrid tests. Some clean up of plugins Move IDebugger into a standalone service plugin Fix import of IIterator Clean up some API surface area Remove superfluous async Change some function names and clean up. Rename to filter Remove Private.toSourceBreakpoints Update breakpoint setting logic More clean up More clean up v0.3.0-beta.1 Remove superfluous console log from the application shell Remove superfluous page reload on workspace reset Reload the application on manual state reset v0.3.0-beta.2 Some clean up and refactoring Update doc strings Refactor setHashParams() More clean up and refactoring Refactor editor finder Change hashing seed to `any` and make it optional to support future algorithms and remove superfluous dispose method Remove EditorFinder#dispose Update yarn.lock v0.3.0-beta.3 Update yarn.lock Update some variable names, docs, etc. Rename workspaces plugin file to match other plugins, clean up exports Make IRouter optional Fix header of printing file Rename all the things. Change Debugger.Config to follow convention of other classes Update Debugger.Session Update more token definitions Move DebuggerSidebar into its own file Reorder public interfaces by convention and alphabetically. Minor clean up of DebuggerService Move all model interface definitions to IDebugger.Model namespace v0.3.0-beta.5 Remove unnecessary each() function More alphabetization v0.3.0-beta.6 Support themes in grid component. Clean up v0.3.0 Prepare for merging into JupyterLab core Add debugger-extension package Update Debugger exports Update package.json files Remove debugger yarn.lock Update imports / exports of debugger Update imports Update debugger-extension readme Update more paths Add debugger packages as imports in metapackage Fix compilation issues Add license to icons file Remove debugger from staging Fix some debugger tests Update plugin IDs Fix test compilation More test clean up Skip pagination test as there is no front end for it yet anyway, fix broken service test Fix build issues with publicpath dynamic => federated Make extension dependency versions more permissive. Default to not minimizing in Windows Update webpack to 5.0.0-rc.0 Add postcss. Reset minimize back to True New version bump version Publish 3.0.0rc0 Add missing types Satisfy lint. Update favicon handler Fix watch mode Update RTD Update change log Add JupyterHub to page config; Fixes #9248 Trivial clean up of layout restorer Clean up file browser class Increase minimum sidebar width to accommodate file browser columns Use @ivanov's min-width Target sys-prefix by default but allow you to specify user Address review comments and update Update jupyterlab_server dependency Fixes #9277 Add tests and workflow job for interop between source and prebuilt extensions Update static path Fix browser test Update server(s), nbclassic, pytest fixtures Add better handling of extensions that provide both prebuilt and source extensions Update disabled extension logic Afshin Taylor Darian (9): Initial commit Update LICENSE Update README.md Update src/editor-finder.ts Revert "Update API method names, refactor DebuggerService" Update docs/source/getting_started/changelog.rst Update docs/source/getting_started/changelog.rst Update jupyterlab/tests/mock_packages/interop/consumer/package.json Update jupyterlab/tests/mock_packages/interop/consumer/setup.py Alex Bozarth (7): Update HackMD Meeting link URLExt.join cant handle colon in relative paths Updated to leverage PathExt.join added new test cases added review tests and fixed bug they found added fix for auth case Update committer list Borys Palka (171): simple header in variables add widgets, which represent variabels,callstack and breakpoints add model of variable, and observer method of variable small fixy change style names fix styles remove phospor VirtualDOM, put React components for variable table add searchInput and conect with model of Variables fix conflicts add tooltipWidget add simple Menu ReactComponent with mock data add outSideClick Handle debug clickoutside in scope menu, add overflow in table start improve table list set namespaces for Variables resolve search issue, split css in files refactor callstack refacotr variables widget fix styles refactor table,body variables add icon search breakpoints list and model add list and model for callstack add tool in breakpoints remove all debug breakpoints extend Varaiable Model by scope debug breakpoints develop searchScope some changes add mock for other scopes insert update widget mechanism in description variable add setting breakpoint in UI add notebooktracker to breakpoint wideget debug for test add method for update breakpoints after changedLines in Notebook develope toogle remove all breakpoints changes refactor , suggest by Jeremy rename INoteTracker variable add DebugerNotebookTracker add breakpointservice add service instance remove breakpoints change breakpoints UI during new lines debug forr tests new method for redner line add cellManager add and debeug consoletracker plugin debug consoleTracker check type of kernel and set breakpoints refactoring, still work in progress next refactor delete breakpointService , set sidebar in to model of Debuger add Tracker for handlers between console/notebook fix line numbers for breakpoints fix line numbers for breakpoints fix edge cases set session only in debugger model set session only in debugger model add debugger widget to main add commendt to start debbuger session refactor debugging refactor after review toggle method for start command debug handle session for notebook and console add change mode and connenct proxy IDebugger with Debugger refactor both handlers, cellManger and implement in to plugin trackers remove console.logs done with todos of file plugin refactor after review add checking isStarted debuger running remove dumb log Revert "add checking isStarted debuger running" Revert "remove dumb log" remove unenescary console logs fast commit debug floting promises bugfix realoded page with mode condensed add service and debug sidebar when scopes is empty convert response for UI debug getResponse when no data remove scopes in search component resolved issue with handlers debug change frame add type for frame in service add type for frame in service add react-inspector add react-inspector implement custom react-inspector add useState to variablesComponent add theme to objectInspector add theme to objectInspector add highligth for breakpoints rename styles add jp variable styles refactor objectInspector, add information about typing react-inspector add cleanupHigligth method add cleanupHigligth method debug service higthline next on next frame remove unessecary console logs remove unessecary console logs refactor after review refactor after review rename method and variable debug get rigth higlights get moreDetials of variable add symbold for check if variable had get addtional variables add hover method for breakpoints typos resolve hover gutter by only css resolve hover issue and aligment of gutter add filter obj and add Demo Data add method for convertingData for display by ObjectInspector resolve render linenumbers issue of notebook resolve issue with set breakpoints after dispose notebook resolve hover issue in console and editor error refactor after code review not render node variables during get/expanded variable Reopening a notebook with an active session throws an error Switching between notebooks removes the breakpoints hover only on editable notebook, clear only on gutterClick focus editor onGutterClick fix first start and dispose after close debugger fix dark icons setOffoptions put to the namespace of CellManger remove setOff linenumbers and implement clearGutters on dispose Debugger dont create handler for not supported kernels remove deactive breakpoints change input box with circle content remove breakpointChanged no throws error after close debugger set data atrribute add signal for changded client add setAtribute data-jupyter-debugger in one place create simple button in toolbar of notebook and console add updateToolbar function implementing functionalyt of lifecycle debugger[WIP] change currentState to StatesClient as Set simplify code, toggle life set session start/stop add toolbar toggle for FileEditor stop session for toggle off widgets remove close command remove create command from palete removed create command, and create directly in main plugin set truncate breakpoint paths at the beginning create header for sidebar debugger set IlabShell with optional dependency add left-truncted css class add simple table UI show all scopes table add service for get more details of variable add draggable variableDetialsBox add toggle for switch table/tree view detailsVariable add to mainAreaWidget add comment, found bug emit change connection signal with setTimieout-bugfix add SidebarHeaderModel, fix lifecycle bug, and clear header after widged disposed remove keeping name of toggled name simplify code, add plugin detials for adding variableDetials Widget to mainArea keep name of enabled debugger resolve no kernel issue fix, add breakpoint after change path keep connection of started debugger session split update add component SourcePathName create simple gridData add filters to dataGrid create VariableDetialsGrid add style for gridTable add selection row in gridData Brian E. Granger (81): Change main menu ranks. Adding doc mode to IPaths and testing for doc mode. Adding doc mode to IPaths from PageConfig. Updating tree resolver to handle doc mode in the URL. Work on apputils :resolver command. Remove mode from layout state. Remove mode from layout restorer. Work on :layout and :tree-resolver Add skipRouting option to router navigation. Add getUrl to PageConfig to generate master URLs given mode and treePath. Add workspace to IInfo Get treePath and mode from PageConfig as it can mutate at runtime. Watch mode and current path and udpate page URL. Add mode and tree path signals and handling. Deal with chagne to urls. Clean up and simplify ITreeResolver logic. Remove obsolete IPaths attributes. Add ITreePathUpdater Let state layout handle L panel logic. Wire up ITreePathUpdater. Fixes to resolver logic. Add workspace to getUrl Fix documentation of getUrl workspace. More work on single document mode Add URI encoding and fix bug in go-to-path. Linting Fixing application tests. Attempting to get browser test working. More work on browser tests. Fix Shareable link. Remove extra ILabShell argument Add actualOnClick to ToolbarButtonComponent props. Remove note about popups - this is fixed. Fixing browser_check Clean up browser_test experiments. Adding PageConfig.defaultWorkspace as chr code 0. Adding mode to launcher. Go back to using the string 'default' for the default workspace. Remove mode from launcher. Remove workspace from IInfo in favor of PageConfig. Removing extra JupyterLab Remove commented out line from shell. Addressing minor review comments. Initial prototype. Fixing minor issues in rebase. Fully working modal command palette. Add test suite for ModalCommandPalette. Removing unused style Add setting to allow user to make the CP modal/left panel. Fixing state restoration. Fix active tab border position. Fixing layout of file browser UI controls. Filebrowser toolbar button styles. Minor style improvements to cell tags. Minor style improvements to notebook cell tools. Fixing mismatched terminal border color. Don't attach command palette in constructor. Show palette. Fix commandpalette test. Initial work to combine running and tabs panel. Initial prototype Rename files working. Remove tabmanager-extension package. Remove tabmanager-package from TS docs. Remove tabmanager from GitHub labeler. Remove tabmanager from ensure-repo. Remove tabmanager from metapackage. Remove tabmanager from dev_mode. Remove tabmanager from examples. Remove tabmanager from extensionmanager-extension examples. Styling improvements. Improved style and APIs. Integrity run. Cleaning up old build stuff. Wire up icons. integrity. Reorder left/right panel ranking. Add left/right panel ranking docs. Fix typo. Linting fix. Add CP to View menu, and reorder. Carlos Herrero (1): debugger-sidebar David Koop (4): Use the same font-family for cell prompt and code Revert "Fixed the alignment issue while displaying cell in rendermime" Set ansi spans to inline-block display Add border-top to execute result, move rule to outputarea Devansh Goenka (1): #8600: Added UTF-8 encoding parameter to create process Eric Charles (147): initial working version for jupyterlab as sever extension - See also TODO ECH use nbclassic remove unneeded notebookapp.py mv jupyter_notebook_conf.d to jupyter_server_conf.d load jupyterlab extension if not yet loaded log warnings in case of NotebookApp settings usage use warnings package install jupyterlab from @datalayer-contrib branch add TODO for flags list the py deps user master jupyter server revert the py deps use again the github deps shim the configs dependency links revert yarn.lock deps from git deps from git rename shim method use handlers from server extension package update to latest changes in jupyterlab_server handler loading use jupyterlab_server pytest plugin tests are running use tree/ syntax to resolve github branch use tree/ syntax to resolve github branch http request timeout for tests use jupyter-notebook-classic@py35 temporary comment failing test in build_api user nbclassic jupyterlab branch use fetch_long for timeeouts js test green fix compilation for examples tests app and cell example test greeene examples tests greeen pytest green fixes for ci more fixes for ci more fixes for ci more fixes for ci fix workspace export for ci update to take https://github.com/jupyter/jupyter_server/pull/180 use zach repo use zach repo retrigger CI update index pages for the examples to deal with recent jupyter server changes add missing html files for app example try to fix last ci failure ensure lab_config is loaded for the examples better lab_config for the examples update examples for ci ensure success for python -m jupyterlab.browser_check Update to the latest jupyter_server.git@discover-extensionapp-config Depend on nbclassic Remove deprecated load_jupyter_extensions Make examples test green Make examples test green Make js test green again Move missing fields to ProcessTestApp run js win tests on py3.6 not nbclassic requirement Karma and Jest App are extensions Karma test app Create static and template dir for test_app Better test app Define _jupyter_server_extension_paths in launch method Use connection_url KarmaTestApp launch without argv Get token from settings for karmatestapp Call ProcessApp init Force allow_origin for ProcessTestApp Remove typo Ensure karma tests succeed browser_app is also an extension browser_check is operational in normal mode Support core and dev mode Use extension_url to align with latest jupyter server branch More work on example to align on latest server Examples tests working again Fix typo app link to serverapp fixture examples tests app fixture intialize use jupyter_server master use server branch py35 fix browser check kernel_manager is on serverapp Add open_browser as trait on serverapp Fix listings url revert jest config listings url Migrate testutils Eslint filebrowser search Extension name is lab File search box placeholder Filter box is always visible Skin filterbox and use LabIcon on InputGroup File filter on top of breadcrumbs FilenameSearch placeholder Fuzzy search Add typedoc on indices attribute Add virtualdom as dep Fix eslint in search tsx Typescript doc on FilenameSearcher Filebrowser example use FilterFileBrowserModel Add setting and mark in black Highlight in non fuzzy filter Add optional forceRefresh option to be used when useFuzzyFilter setting is changed Use jserver extension-loading branch Use ZSailer repo More fix furhter to merge with masteer More green tests fix app example use _main_ as module name for app example Use jupyter_server master Examples test Install deps with git clone Ensure jupyterlab_server correct branch is installed Use _jupyter_server_extension_points Do not initialize super templates Depend on released jupyter_server, nbclassic and jupyterlab_server + remove direct dep on notebook jlpm integrity Benchmarks: notebook in subfolder + larger timeout + errorOutputs Do not set base_url on workspace apps Use base_url from labapp if available for workspace app Remove duplicate and unused index.html in the examples folder Use blocked/allowed extension naming in the docs Use blocked/allowed extension naming in typescript Use blocked/allowed extension naming in typescript Revert some change further to allowed/blocked naming Use blocked/allowed extension naming Use blocked/allowed extension naming Load app_version next to running on jupyter_server Use favicons provided by jupyter_server security docs: link to jupyter-server instead of jupyter-noteboook docs: fix commands to watch List the federated extension in the extension manager webpack builder: set bail to false Do not bail only in watch mode lint Revert PR #9236 List the dynamic extensions in the extension manager Update jupyterlab/handlers/extension_manager_handler.py Extension handler should return correct pkg_type Extension manager should take into account the source and pre-built package type Update jupyterlab/handlers/extension_manager_handler.py Use the install block to display uninstall instruction Swap prebuilt and source nomenclature Invoke transalation on the provided uninstall instructions Fernando Perez (1): Remove visible 1px border for terminal Frederic Collonval (1): Remove input-checkbox style Frédéric Collonval (2): Fixes #9508 Improve upgrade script to add style settings Ian Hunt-Isaak (1): Restore old capitalizaiton of PDF file type James (1): Allow downloads in iframe "sandbox" Jason Grout (449): Reconnect a websocket when a kernel is restarted. Experiment with module federation Update to webpack 5b21 Add url as a polyfill dependency for apputils. Fix webpack error by creating an array from an iterator. Update the singleton packages to include at least every package with a 'tokens.ts' file. In the federated example, get the proper static path from the page config. Fix translation error in federated example. New version bump version Remove temporary fix Publish 3.0.0a9 Fix boolean error New version bump version Publish 3.0.0a10 Use Promise.allSettled to implement error handling that can recover from errors. Update to webpack 5b26 New version bump version Publish 3.0.0a11 Fix checking for errors from Promise.allSettled. Upgrade mini-css-extract-plugin to be more compatible with webpack 5 Fix dependencies and resolutions in the federated example. Update webpack-merge. Lint fix Update yarn.lock Add another federated example package. Fix lint errors Add build step Fix integrity error Fix typo Fix app example. Set the public path Add Lumino dependencies to buildutils so the phosphor webpack aliasing works Fix dependencies in buildutils Add phosphor package Remove notebook dependency Update examples/federated gitignore Clean up md and middle packages Move federated install step to install:all Lint fixes lint fixes Lint fixes Dynamically set public path in generated extensions according to page config. Update yarn.lock Split buildutils into buildutils and builder Let webpack automatically determine the required version of dependencies Upgrade to Typescript 4 Fix typescript 4 compilation errors. Pin typedoc to 0.17.0-3 for the typedoc library mode Update eslint-typescript and config so linting passes. Update minimum python version to python 3.6. Remove the extension path, not the entire extension directory, when uninstalling an extension. Update APOD extension tutorial. Remove note. update links to apod tutorial Use jupyter labextension develop —overwrite in tutorial instead of uninstalling extension. Add a note about publishing to npm Move notebook output logging extension to notebook-extension from logconsole-extension. Use the new recommended [contenthash] naming for webpack files. Retrieve dynamic extension paths from build metadata embedded by webpack lint Revamp the mode for building lab extensions Move build-extension.ts to build-labextension.ts for consistency with entry point Add development option to lab extension build scripts. Defaults to production mode. Update builder/src/build-labextension.ts Upgrade webpack loaders Upgrade codemirror Upgrade various utility dependencies Update core dependencies, such as xterm and marked Make typedoc version consistent Upgrade yarn-deduplicate, jest-junit, and linting packages Upgrade prettier, and remove unnecessary packages from recently absorbed extensions. Integrity updates Lint - updates from the new version of prettier. Downgrade eslint react/prop-types rule to warning. Fix codemirror typings Fix testutils typing issues. Update test:summary for the current test structure Convert jest imports to typescript type references. Have prettier the large autogenerated nbconvert css file. Update yarn.lock prettier updates Ignore testutils typing errors by casting to any. Use ArrayBuffer.isView rather than instanceof to distinguish between views and array buffers. Integrity fixes Update webpack Remove workarounds for the webpack bug preventing it from compiling vega Add --development and --source-map flags for building extensions. Lint fixes Fix comment explaining the extension entry point. Update sharing config in the jupyterlab metadata. Do not load dynamic extensions in core mode. Handle when sharedPackages is not defined. Lint Do not bundle core jlab packages in extensions Upgrade webpack to 5.0.0-beta.30 Delete docker instructions that are not used Install jupyter-packaging in release process New version bump version Publish 3.0.0b5 Update tsconfigdoc.json Fix federated example. Fix federated module example New version bump version Publish 3.0.0b6 Update to webpack 5.0 beta 31 Update yarn.lock Run the extension building webpack from builder directory. Better error descriptions for example tests Comment out the example error logging. New version bump version Publish 3.0.0b7 Support node 10.x Make the extension builder run webpack directly. yarn.lock update Lint If the compilation had an error, throw an error instead of returning. Clean up the temporary public path file Get version from builder if the builder is installed from disk. Support watch mode and better information output Set default output directory Update yarn.lock Fix integrity issue Yarn.lock Remove duplicate warning output. Add setup.py to the test pip cache hashing Bump server requirements lint update nbclassic More updates to the changelog New version bump version Publish 3.0.0b8 Updates to changelog Update docs/source/getting_started/changelog.rst Fix lerna warning Use the new webpack 5 ‘auto’ publicPath Fix doc build Lint Fix argument destructuring to make text settings menu work. New version bump version Publish 3.0.0rc1 Fix html injection opportunity in the title widget. Add tab hover info to single-document mode title. lint Bump webpack to 5.0rc1 Do not special-case logic for MainAreaWidget. Update yarn.lock. Add border at top of single-document open menus Fix integrity error Add hover scrolling to menu, like toolbar. Sort completion filtering results Add tests for completion sorting, and fix bugs exposed by tests Fix more bugs in and exposed by the tests. Update tsconfigdoc.json Implement a simple checkbox for single-document mode in the menu bar. Fix watch mode Bump webpack to 5.0rc2 Refine the use of tokens in urls. New version bump version Publish 3.0.0rc2 Create codeql-analysis.yml New version bump version Publish 3.0.0rc3 Upgrade to webpack ^5 Update yarn.lock Add an offline circle icon for disconnected or unknown kernel state Switch to solid version of offline bolt icon. Add paths to ignore in codeql scanning Fix useless escaping of regex character Escape all matches in rendermime autolink test Fix codeql config file option Update ignored files to ignore templates ignore code scanning node_modules Bump webpack to get some bugfixes from 5.x releases Yarn lock Only check session attributes we care about when determining if we need to update. Check only kernel model attributes we are tracking to see if an update is needed. integrity Add jupyter_packaging to the extension tutorial Delete tabmanager extension Use url-parse @types package instead of our homegrown one. Simplify the join function to not do a posix join twice. Use url-parse and posix.join directly to do the URLExt.join. Resolve some issues with parent directories at the top of a url path Formatting Move jupyter-packaging up to the conda environment creation Update tests for handling relative paths Use jupyter-packaging instead of jupyter_packaging Only reset command palette if focus is shifting outside of the palette. Fix tabmanager extension reference that snuck in again. Handle sharing of linked packages and locally installed extensions. New version bump version Publish 3.0.0rc6 lint fixes WIP update extension documentation more for 3.0. Fix documentation build errors. More rewording and reorganizing of the extension user docs Try eliminating the word "federated" for simplicity. Copy over the extension manager docs from 2.2.x. More extensive reworking of the extension user docs Fix deprecation error Make docs headings consistent with each other. Make h4 headings more distinguishable from h3 headings. Move “Advanced Usage” docs to their own file/section. Refuse to uninstall federated extensions. Move the federated check back up to the top of the uninstall code. Use a set for set-like operations federated_exts -> federated_extensions for consistency For federated extensions, move static assets down to a static/directory Add installation metadata messages to jupyter labextension uninstall and list. update docs headings Update webpack to 5.3.1 update yarn.lock metadata -> install for installation metadata Add jupyter_core as a dependency Put exposeAppInBrowser and quitButton values back in page config Asyncify some functions in rendermime and attachments Don’t use an *old* version of node’s path module. Try to fix ts errors involving compiling path from node yarn.lock Use the new webpack resolve.fallback for polyfills. Fix services webpack.config.js to use a fallback for the node path module. Move path-browserify fallback to package.json to be more general. Lint yarn.lock Add path-browserify to coreutils dependency for browsers. yarn.lock Fix imports again so we are importing path and polyfilling with path-browserify. polyfill process.cwd in webpack defines. Delete old typings for path-posix, add node typings to coreutils. Propagate webpack config defineplugin changes to other wepback configs. integrity Fix styling of single-document mode switch in menu bar Change “Single-Document Mode” in menu bar to just “Mode” Move generic switch widget to ui-components Make an application extension that adds the mode switch to the top area. Add translation and keyboard bindings to mode switch. Handle click events more conventionally integrity Update top area tests lint Respond to widgets removed in shell PanelHandler. Add a new ‘menu’ area which moves below the top area in single-document mode. Fix borders for single-document mode top area Move Jupyter Logo to application class. Align the left edges of the title widget and the main menu in single-document mode. Fix the small offsets in the placement of open menus. Update tests Remove ensure-max-old-space script. Bump tests to use node 12.x Mention menu area in extension dev docs Integrity Lint Move top-level logo to application-extension Update tests to account for the top-level menu area added to the top area. Add tests for menu area lint Fix isEmpty for menu area. Account for hidden title widget in top area. Fix shell.widgets for menu area. lint Fix json error Integrity Enable using federated extensions in dev mode when a flag is set. New version bump version Publish 3.0.0rc7 Pause after publishing packages to allow npm time to update their listing. Enable mimedocument to use an optional specific renderer Update sleep function to a conventional function, and lint. lint Clarify that federated extensions may not work if they were compiled against published packages. Fix linting errors in GitHub PRs Update binder to use conda, which allows us to install our own nodejs. Use matplotlib-base for a lighter binder environment Require 'package' instead of 'package/' so webpack activates sharing Use conda_forge vega_datasets instead of pypi vega-datasets Use python 3.8 Refactor/reorganize webpack.config.js Make built-in extensions shared eagerly Reorganize code dealing with externalExtensions Share all dependencies of extension packages. Merge in custom share config from extensions Move module federation container initialization to bootstrap file. Lint fix Share extensions that are not in resolutions. Get actual version of installed extensions Fix typo Make built-in dependencies, compiled extensions, and their dependencies eager by default. Clean up build() function signature to take options instead of parsing a command string. Add --dev-build and --no-minimize cli flags to labextension install and jupyter lab build. Lint New version bump version Increase the pause between publishing and using npm packages to 5 minutes. Publish 3.0.0rc8 Add staging/bootstrap.js from the 3.0.0rc8 release Do not error if requiredVersion is not provided. Do not use ?. on node 12 (node 14 supports it, but not node 12). Only make core packages or dependencies of core packages eagerly shared. Clean up naming conventions for variables representing package names in webpack.config.js to be consistent. Lint Lint: Add const New version bump version Publish 3.0.0rc9 Fix typing for docmanager mode, and handle the null case for labShell. Revert maybeNewWorkspace argument for docmanager open. Remove the docmanager mode, now that it is not used. Adds all transitive dependencies of eager packages to eager packages. Eliminate eager packages. New version bump version Publish 3.0.0rc10 Add Reconnect to Kernel main menu item, and notebook implementation. Chunk the jupyterlab and lumino modules together when building the core application. Add a polyfill for path in the base webpack config integrity Change user references from single-document mode to Simple Interface (mode) Improve logic in the extension manager a bit Include federated extension information in the extension api Generate index.js files, update style and sideEffects keys Move various index.css files to base.css for the autogeneration of index.css files. Update skipped css Import css from the js file instead of the css file. Update Lumino packages. Update css-loader Update yarn.lock Integrity Make style/index.js convention work for prebuilt extensions. Import css in build New version bump version Publish 3.0.0rc11 Update css module imports to use a new top-level styleModule key. Integrity update. Dev mode style.js update Update CSS skips to deduplicate codemirror css Integrity update Update Lumino Yarn.lock update Integrity update. New version bump version Publish 3.0.0rc12 Deduplicate nbconvert-css css. Ignore linting on the nbconvert raw.js source file. Use styleModule in prebuilt extensions. Refactor code a bit to be nicer. Upgrade Typescript to 4.1. Yarn lock update Fix compilation errors, including one actual bug. Fix typing issue with a function overload Update typedoc to 0.20 beta 27 Update yarn.lock Update typedoc config for 0.20 beta 27 Fix some errors found when compiling docs with typedoc. Lint Lint lint Fix typo in d4af07d4331e94a32bdea2c2c7bd097464425d2b (#9489) New version bump version Publish 3.0.0rc14 New version bump version Publish 3.0.0rc15 An initial pass on the first few paragraphs of the extension developer guide. Work in progress backup More work elaborating on tokens and deduplication concepts. wip wip More editing and reorganizing of extension docs. Reorganizing and filling in more documentation from old documentation Split up documentation for extension developers vs documentation for core jlab developers. Delete orphan old xkcd tutorial file. Lightly edit extension tutorial. More editing and rearranging of extension and jlab dev docs. Combine extension migration guides into a single page. Switch order of migration guide so the most relevant one is at the top. Move jlab-specific extension points to common extension points to consolidate information. Fix heading level More reorganization of content, deleting extra content. Fix typos Delete duplicate section for overrides.json Edit content Update dependency graph script. More editing and reorganization of extension docs. More editing and reorganization of extension docs. More editing and reorganization of extension docs. Tweak wording of lab config directory explanation. More editing and reorganization. Tweak wording from suggestion from @vidartf Edits from @jtpio More edits and reorganization. More rewording/reorganization of extension dev docs Delete unnecessary doc table of contents node More reorganizing More editing More editing WIP editing about deduplication Finish draft of deduplication section. Continuing editing about css files and prebuilt extensions. Delete outdated information on packaging extensions More editing about prebuilt workflow Change user-facing terminology from federated to prebuilt. Edit user-level documentation to consistently use source and prebuilt terms. Fix typo Add blank line after copyright Add typedoc module names in ensure-package script. Fix JLab docs to point to new generated typedoc docs. Delete duplicate docs. Mention property inspector moved to right sidebar. Update jupyterlab_server dependency to 2.0 final release. Fix typo Cache requests when doing the linkcheck ci test. Prime link cache by ignoring changelog Fix broken link Add back in the changelog link checks Fix another broken link Update milestone git commit range New version bump version Publish 3.0.0 Update installation instructions to account for lab 3 changes. Edit installation problems section Add notes about running on Jupyter Server Add note about floating command palette. Update command palette docs Ignore the changelog links in the linkcheck Change binder link to a jlab 3 prebuilt image. Clarify install.json information and other prebuilt extension distribution material. Update binder link to working lab version. Reset binder link to still use `/tree/demo` Fix broken links. Point most README docs to /stable. Fix the usage test New version bump version Publish 3.0.1 Jean-Baptiste Wons (3): Add a way to manage workspaces in the lab ui Package integrity updates Add missing docstrings Jeremy Tuloup (528): Remove yarn.lock, add to gitignore Add scaffolding for tests Add simple test for Debugger Add prettier git commit hook Add .prettierrc Add xeus-python debug log files to gitignore Add dev setup instructions to README.md Add simple DebugSession Create test client session with kernel preferences Use xpython as kernelPreference Update for JupyterLab 1.1.0a1 Add start and stop method Add missing license header Make _sendDebugMessage private Remove unused IClient interface Add eventMessage signal for debug events Add updateCell Fix IUpdateCellResponse interface Add test for sendRequest Rename debug protocol interfaces Rename eventMessage test Move Request, Response, Event interfaces to types Adopt JupyterLab code style for DebugSession Add jest-unit reporter Add azure-pipelines.yml Require xeus-python 0.5 Add tests for stackTrace, scopes, variables Read threadId from the thread event Add test for continue Add debug events for continue await execute promise Remove `execute` method from DebugSession Install xeus-python kernelspec for tests Update to JupyterLab 1.1 Move codemirror types to devDependencies Add kernelspy extension to the README Fix linting Add tslint task to git commit hook Await for mode state when restoring the panel Fix linting errors Wait for `stopped` debug event in tests Re-add skipped tests Add .prettierignore file Fix search input for dark theme Add editors to the main area widget Show sample files in the read-only editors Use BugIcon for the main area widget Add editorAdded signal Rename to DebuggerEditors, add docstring Use Lab CSS variables for TabPanel Cleanup signals on unmount in BreakpointComponent Add Azure Pipeline badge for build status Add tslint config for sorted imports Add test for debugInfo request Add the sidebar to the main area Wait for session ready before restoring state Add Binder files Delay definition of the palette category Remove cyclic reference sidebar <-> model Remove hard-coded color in variable tree Initialize variables model with [] Remove unused filter from the Variables model Fix comment for cleanupHighlight Add LINE_HIGHLIGHT_CLASS Re-order activeCell check Send breakpoints to kernel on breakpointChanged Cleanup unused code Cleanup frames and variables on continue Update Binder link to point to stable Add example notebook that uses xeus-python Keep line numbers on when switching cells Move createMarkerNode to private namespace Keep breakpoints from other cells Retrieve existing breakpoints from the cell Remove the launch command Set editors breakpoints on model changed Remove +1 modifiers from breakpoint model Rename removeBreakpoint to removeBreakpointAtLine Remove clearedBreakpoints signal Keep breakpoints sorted by line number Rename to removeAllBreakpoints Set breakpoints via the service Convert to source breakpoint in the service Filter breakpoints with the same line numbers Pass this to disconnect Rename onNewCell to onActiveCellChanged Ensure session is ready Use changed signal for models Use source path for the breakpoints view Add stepOut method to service Add the stepOut command Add docstring for the stepOut method Map debug actions to callstack buttons Use CommandToolbarButton for callstack buttons Hide callstack buttons labels Remove unused (for now) stop button Add the stop button to the callstack toolbar Clear model and stopped threads on stop Rename _threadStopped to _stoppedThreads Add the terminate command to the palette Add restart method to the service Send breakpoints after restart Remove clearModel from the stop method Remove onNewRenderLine Add note about test patterns to the README Add tests/src/service.spec.ts Add tests for start and stop for DebugService Add test for DebugService.sessionChanged Add test for DebugService.modelChanged Add TODO for the requestAnimationFrame Change cell.disposed to cell.isDisposed Send breakpoints on cell content changed Use an ActivityMonitor to update breakpoints Remove TODO Change default mode to condensed Call expandVariable on expand Simplify node renderer effect Refactor convertType Streamline the use of Object.assign Remove special case for class Make the filterVariable function more readable Rename haveMoreDetails to expanded Change line highlighting when switching callstack Remove frames from service, fetch scopes on change Minor README fixes Add sidebar to the layout restorer Add a Binder badge that points to master Add tests for source and loadedSources Update test for loadedSources Initial support for handling msgs for other cells Clear cells in notebook handler Jump to the cell where execution has stopped Rename showCurrentLine to onCurrentFrameChanged Add docstrings for exported CellManager functions Use the value.changed signal for the cell monitor Add support for the debugger flag in kernel info Remove canStart from the docstrings Check for debugging enabled when setting the session Add docstring for the new disposed signal Check for cell isDisposed before getting the model Rename cleanupHighlight to clearHighlight Remove click handler on CellManager disposed Add TODO for using the client name as id Remove clearing of stopped threads from restart Open read-only files on current frame changed Handle mimeType Rename cell.ts to editor.ts Rename CellManager to EditorHandler Fix isDebuggingEnabled and remove the check EditorHandler handles editor instead of cells Remove trackers from notebook and console handlers Reuse EditorHandler for main area editors Breakpoints can be removed across cells and editors Setup tabCloseRequested signal only once Prevent breakpoints from flickering Do not clear highlight on handler disposed Upgrade to TypeScript 3.7 Simplify some structures Add "Change Mode" to the sidebar context menu Add FileHandler Handle debugging files Add line highlighting to FileEditors Rename getCellId to getCodeId Keep a list of active sessions to handle restore Rename cellId variable to codeId Handles files not backed by a kernel Allow setting breakpoints in out-of-focus cells Add tracker plugin for notebooks, consoles, editors Handle editors in the tracker plugin Leave TODO on clearing all cells in the notebook Rename WidgetHandler to TrackerHandler Rename methods to findIn* Handle undefined frame for the console tracker Add docstring for the TrackerHandler Change background color on breakpoint hover Clicking on a breakpoint moves the active cell Scroll to active cell on breakpoint clicked Keep only one mode for the debugger Rename DebuggerEditors to Sources Rename src/editors to src/sources Add Source split, instantiate Debugger.Sidebar Handle EditorHandler in Source split Add data-jp-debugger attr to the sources split Cleanup references to DebuggerEditors Fix tests to instantiate a Debugger.Sidebar Grey out read only source editor Open read only files in the main area Make the read only editors MainAreaWidget Add tracker for the read only editors Keep jp-DebuggerSidebar CSS class only Use basename in read only editor title Remove mode from the IDebugger interface Create IDebugger.ISource interface Use DOMUtils.createDomId Clear `SOURCE` editor when there is no source Set session to null on model disposed Open the source when clicking on a breakpoint Activate widgets on frame changed and bp clicked Add support for breakpoints in modules and files Remove internal mount command Add drop shadows to headers Replace Environment by the bug icon Show source path above the read-only preview editor Remove unused Debugger.IOptions Align breakpoints line numbers to the right Handle overflow for long breakpoint paths Add title attribute with the full path to the bp Unify the naming of variables (span -> title) Use caret for the vscode-debugprotocol dependency Handle new console prompt cells Highlight line in console cells Also dispose cellMap in the notebook handler Add handlers on console cells changed Use more succint names for the sub-models Remove unused Debugger.Model.IOptions Add installation instructions to the README Use kernel name as adapterID Remove ensureSessionReady, use _ready promise Dispose the session on debugger closed Fix enabled commands on debugger closed Check debugging is enabled before restoring Cleanup up sub-model constructors Update service.ts to keep a consistent style Add docstrings to private methods in service.ts Add tests for service.hasStoppedThreads() Make service.isStarted a getter Format sources/index.ts according to the code style Format breakpoints source to follow the code style Rename toolbar button name to `debugger-button` Clear debuggedClients on dispose, minor reformat Minor wording fix Toggle debugger attribute on session disposed Handlers lifecycle follow the toggle button Create the handler on focus if debugger is started Restore state on current widget changed Remove debuggedClients so it's stateless again Create only one handler per widget Refactor the debugger lifecycle logic Move requestDebuggingEnabled out of the session Simplify handler.update() requestDebuggingEnabled returns a Promise<boolean> Fix the enabled state for the debug commands Move requestDebuggingEnabled to IDebugger.isAvailable Update JupyterLab to 1.2 for Binder Remove async from DebuggerHandler.disposeAll Move editor cleaning to the handler dispose method Handle kernelChanged signal for the debug handlers Clear model when a handler is removed Format the handlers according to the code style Add screencast Handle kernel restarts Remove kernel and status handlers on dispose Split breakpoints, callstack, sources files Move src/variables files Reformat src/variables according to the code style Fix docstrings and code style Move the debugger model to its own file Rename DebugService to DebuggerService for consistency Fix BreakpointsBody class name Fix docstring model -> widget Remove unused debugger:debug-console command List to cells.changed to support undos Remove unused dependencies for the main plugin Check for widget focus when toggling debugging Make breakpoints and callstack scrollable Add notebook>=6 to pre-requisites Move DebuggerHandler to a separate file Progressive transition for the DebuggerHandler Move handler.ts one level up Update to JupyterLab 2.0 Fix docstrings for the debugger handler Improve kernel restarts handling Attempt at fixing the tests on CI Reuse kernelPreference in tests Create session connection instead of context in tests Add keywords to package.json Install JupyterLab beta from prerelease channel Use 0.2.0-alpha.1 on Binder Update Binder to 0.2.0-alpha.2 Fix docstring Use a more specific name for the details plugin Follow code style Model doesn't need to be a class attribute Use LabIcon from ui-components for BugIcon Fix toggle button for JLab 2.0rc0 Add docstring for SourcePathComponent Update to JLab 2.0 final Fix grey background for read-only editors Fix callstack icons for the dark theme Migrate to LabIcon Remove theme based icons Fix debugger icon in the toolbar Rename run and stop icons to continue and terminate Make the bug icon a toolbar button Include path when comparing frame ids Fix VariableComponent key for the Tree View Remove hover effect for the bug toolbar icon Add variable filter to the settings Filter variables in tree and table Map kernel names to variable filters Rename oldConnection to previousConnection Use core lab caret icon for the tree view Align items in the variable tree view Ignore variable filter for variable panels Fix VariableDetails naming so it stays consistent Make variable table scrollable Add caption to the variables panel Fix React key error Add GitHub Actions workflow Remove Azure Pipelines Fix typo in the GitHub Actions badge link Update the instructions to install the extension Add CI workflow using the xpython wheel Move main.yml to wheel.yml Add browser check to CI Add Usage section to the README Alias xpython for the wheel tests on CI Remove the xpython wheel CI tests for now Remove previous table view Cleanup datagrid Move Theme type to the namespace Make node height 100% instead of 90% Remove unused CSS Handle double-clicks on the variables grid Use consistent colors for the light and dark styles Disconnect signal handler on widget disposed Simplify the datagrid widget Rename "details" to the more explicit "variables" Fix stale docstring Remove the datagrid border Update example notebook to include explanations Add sidebar section to the tutorial notebook Use signalToPromise in the tests Fix wording Switch to ESLint Add GitHub Actions lint workflow Update to TypeScript 3.9 Fix linting Remove the temporary libgbm1 fix Fix prettier Fix plugin docstring Pin to xeus=0.23.14 Remove console.log Add explicit return types to functions and methods Add JSDoc rules for ESLint Require jsdoc on functions and classes Require jsdoc on method definitions Require jsdoc description for eslint Add jsdoc description for createBreapoint Remove unused start and stop command ids Expand the sidebar on the initialized event Update to @jupyterlab/testutils 2.2.0-alpha.0 Update test scripts Switch to JupyterServer from @jupyterlab/testutils Set jest timeout to 20000 Check debugging enable with kernel spec metadata.debugger Mock KernelSpecManager in the tests Unpin xeus Remove Font Awesome CSS Use the same version of @jupyterlab/services Align versions in package.json Use @jupyterlab/coreutils ^4.0.0 Use @jupyterlab/coreutils ^4.2.0-rc.1 Fix file editor toolbar CSS Add yarn.lock Add test for the breakpoints UI Add test for breakpoint line number and new breakpoint Add test for Sources in the sidebar Add test for the callstack in the sidebar Fix prettier formatting (not caught in the rebase) Bump @lumino/datagrid to 0.6.0 IEditorFinder#find returns CodeEditor.IEditor[] v0.3.0-beta.4 Update to JupyterLab 2.2 final Cleanup DebuggerModel in Sidebar Add the Debug Protocol Overview to README.md Update protocol sequence diagram Update README.md Fix README.md for prettier Add IEditorFinder#open to open read-only editors Update token definition for IDebugger.UI.ICallstack Update token definitions for IVariables and ISources Implement IDebugger.UI interfaces Fix undefined debuggerModel in tracker.ts Rename editorFinder to debuggerSources Remove unused DebuggerSources plugin dependency Update docstrings Remove casts to Debugger.Model Remove unnecessary await Update tests for DebuggerService#start Add test for conditional breakpoints Hide sidebar if no kernel supports debugging Remove tracker plugin Make IDebuggerSources optional to the service plugin Move CallstackModel.IFrame to IDebugger.IStackFrame Move Variables interfaces to tokens Disable ESLint no-empty-interface rule Throw if the kernel does not have tmp file params Add happy case for the config test Kernel name optional chaining Handle non-existing kernels with getCodeId Handle non-existing kernels when removing handlers Return empty string for internal _getCodeId too Switch to SourceBreakpoint for the debugInfo response Remove active from IDebugger.IBreakpoint Make DebuggerService#IOptions#kernelspecs optional Rename the celltags plugin id Rename the logconsole:nboutput plugin id Fix prettier v0.3.0-beta.7 Rename IDebugger tokens Add js-debugger to the Linux tests Install xeus-python for the js-debugger job Remove debugger specific GH workflows Remove duplicated files from the debugger package Rename to @jupyterlab/debugger-extension Add debugger to the metapackage Lint debugger Remove lint-staged from the debugger packages Add missing license headers to the debugger files Fix link syntax in the apod tutorial Fix titles in the extension development docs Add a debugger section to the user docs Add developer docs to contribute to the debugger Fix Table of Contents header styling Show debugger toggle button before restoring state Add debugger to the GitHub labeler Revert "Move CodeMirror HTML tree and related CSS to shadow DOM." Update extension tutorial to use jlpm run build Add get_ipython to the debugger variable filter list Apply suggestions from code review Update jupyterlab_server to 2.0.0rc1 Fix lint check for the codemirror-extension package Upgrade script does not replace dev deps to caret Fix the open tabs handling of MainAreaWidget icons Set an icon for the inspector main area widget Add setup.py and pyproject.toml to MANIFEST.in Add more XXX for the mktemp command New version bump version Publish 3.0.0rc4 Add more XXX to the mktemp command in release_test.sh Attempt at fixing the examples CI Add xeus-python to the dev Binder requirements Debugger: switch to a different murmurhash2 impl Stub TextEncoder in debugger tests similar to services Update jupyter lab command in ext dev guide New version bump version Publish 3.0.0rc5 Update release test script to also install federated extensions Remove @types/webpack (shipped with webpack 5) Draft for the 2.x -> 3.x migration guide Mention the script in the migration guide Add example diff Add link to the publishing section in tutorial Mention jupyterlab/builder dev dependency Add note about publishing to npm Link to the ext tutorial for more details Mention jupyter-packaging and cookiecutter in migration guide Allow custom webpack config for federated extensions Custom webpack config as opt-in for federated extensions Add docs for the custom webpack config Fix typo in the custom webpack config docs Link to the default webpack config for reference Update to webpack-cli 4.1.0 Update ci_script to install mock-mime-extension Check federated extension after uninstall command Auto start the logo plugin Fix commandpalette blur test in apputils Make ILabShell optional for the launcher extension Update upgrade script to use labextension for outputDir Set outputDir from the cookiecutter package.json Reinstate extension manager Lint extension manager Link to docs in federated extension dialog Add --extensions-in-dev-mode to the Binder dev mode Try with node=14 on the Binder dev mode Remove ptvsd from the debugger user docs Update blueprintjs core and select dependencies Bump react-json-tree Revert "Bump react-json-tree" Move the Single Document Switch to the status bar Rename the mode switch plugin id Cleanup tsconfig for the translation extension Tests: handle debugpy sequence of event messages Tests: handle debugpy returning multiple scopes Tests: fix error message check on undefined variable Tests: comply to the source breakpoints debugInfo response Tests: disable loadedSources for now (timeout) Remove the test for loadedSources pip install xeus-python>=0.9.0,<0.10.0 on CI Remove the memory usage status bar item Bump the ESLint dev dependencies Fix conditional expect eslint error Warn for the new jest recommended rules Handle multiple scopes in the debugger variables tree Add debugpy to the xpython variables filter Show variables from all scopes in grid view Add dropdown to switch between scopes Handle scopes in the variables table view Add back initial scopes for main area view Remove scope arg for inspect variable command Fix key in the VariablesComponent Minor cleanup and add missing docstrings Cleanup scopes in the…
* use start.sh * bump version * fix script target * clean up docker and status extension * remove extra comment
…er-server#180) * enable extensionapp config to be discoverable from serveapp * add some comments for future devs * allow None in non-ExtensionApp extensions * adjust tests to capture changes * minor bug fixes * renamed config pytest fixture * standardize extension loading mechanism * pass serverapp and extesnionapp to extensionapp handlers * use static url prefix for static paths * iniitalize all enabled extension, then load later * split extension initialization and loading * Upgrade examples to align on discovery branch * Polish examples * Launch example via python module * Avoid to run initialisation methods twice * Add main for simple_ext2 and simple_ext11 * minor changes to extension toggler * adding some comments throughout the code * move all CLI handling to the ServerApp * remove old traits from extensionapp * update tests * update tests with changes to extensionapp * fix examples entrypoint * add test dependency: pytest-lazy-fixture * unpin pytest * import lazyfixture directly due to changes in pytest * drop pytest-lazy-fixture * cleaner error handling in init_server_extension * minor clean up * minor fixes after review * add underscore as prefix to extension function * remove load_jupyter_server_extension from examples * minor typo in example comment Co-authored-by: Eric Charles <[email protected]>
Summary
This PR enables the ServerApp to discover ExtensionApp's before the server's Tornado Web Application is configured.
Other smaller changes:
default_url
changed toextension_url
.load_jupyter_server_extension
, changed to_load_jupyter_server_extension
(a private function prefixed with_
)._jupyter_server_extension_paths
function to discover server extensions. Previously, this was only used to toggle extensions."app"
key to the metadata returned by_jupyter_server_extension_paths
.initialize
method. Then, constructs a WebApplication.tl;dr Why?
There's a challenge with the order in which the Server and Extensions are loaded. Previously, the order is:
load_jupyter_server_extension
The issue is that, during a transition to jupyter server, extension apps that try configuring serverapp do not load their config early enough (step 5). The serverapp will already have created it's WebApplication and HTTPServer objects before the extension can change their attributes. E.g. if you want to change the
port
of the server through a CLI likejupyter lab --LabApp.port=8890
, you cannot currently do this. The port value will be loaded too late. The server will run on 8888, and the trait will change after this server starts.This PR adds a step after step 2, where the ServerApp can discover ExtensionApp subclasses listed in jpserver_extensions. The ServerApp can then call its
load_config_file()
method and discover server-specific config from the ExtensionApp._load_jupyter_server_extension
function.The added benefit is that it allows me to intercept the ServerApp config and shim traits using the shim layer added in Zsailer/nbclassic#7.
How
This adds an optional key:value pair to the extension metadata dict,
app: <ExtensionApp subclass
. If an ExtensionApp is listed injpserver_extension
, this key will be found in the extension metadata and discoverable by ServerApp. Then, the ServerApp's initialize method can pick up these extensions and load their config before creating a webapp.My apologies for the auto-formatting diffs! 😦 If the diff is too difficult to look at, I can highlight the chunks that matter