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
A down side of adding validation is that no Ajv instance (or sharedPackage) is exported anywhere upstream, so this ships its own copy. Not exactly lightweight, but is, at least, lazily loaded behind the optional validate=True flag.
To fully remove it from being (re-)bundled, it would be theoretically possible to grab an existing one off of:
the private _validator from a @jupyterlab/settingregistry:DefaultSchemaValidator subclass
somehow intercept an @jupyterlab/ui-components:FormComponent which has access to the underlying validator through a number of props
Welp, i had a quick look at the panels notebook: looks like there's a fair amount of drift that would need some investigation, and is probably outside the (already sprawling) scope of this PR.
@jtpio finally circled around with the jupyterlite-sphinx thing and all the lite 0.7.0 releases.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
references
changes
CommandRegistrydescribe(id, args, handler)iconlabelcaptionicon_classdescribed_byadd_command(...described_by={"args":{}}executevalidate=Trueajvclient-side to validate argshandler=Callable[[Any, List[Any], ...]jupyterlite-(core|pyodide-kernel) 0.7.0rcpackage.jsonconsistent-type-importslintersharedPackagesconfiguser-facing changes
backwards-incompatible changes
notes
on
main, command execution is "fire-and-forget"...graph TB subgraph py subgraph CommandRegistry py-ex[".execute(id, args)"] end end subgraph js subgraph CommandRegistryModel js-ex[._execute] end subgraph AppCommandRegistry [CommandRegistry] real-ex[.execute] end end py-ex --> js-ex --> real-ex...on this PR, with optional
validateandhandler, results (or errors) come backgraph TB subgraph py subgraph CommandRegistry handler["handler(result, error)"] py-ex[".execute(..., <br/>handler, validate=True)"] end end subgraph js subgraph CommandRegistryModel js-val["._validate"] js-ex[._execute] end subgraph AppCommandRegistry [CommandRegistry] real-ex[.execute] describe[.describe] end ajv end handler --> py-ex --> js-val js-val -- await --> describe --> js-val js-val -- validate(args) --> ajv --> js-val -.-> js-ex js-ex -- await --> real-ex real-ex --> js-ex -- "result<br/>errors" --> handler js-val -- errors --> handler