File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
packages/perspective-jupyterlab/test/jupyter
python/perspective/perspective/viewer Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,20 @@ assert w.theme == "Pro Dark"
410410 }
411411 ) ;
412412
413+ test_jupyter ( "Restores from saved config" , [ ] , async ( { page } ) => {
414+ await execute_all_cells ( page ) ;
415+ let errored = await assert_no_error_in_cell (
416+ page ,
417+ `
418+ table = perspective.Table(arrow_data)
419+ w = perspective.PerspectiveWidget(table)
420+ config = w.save()
421+ perpsective.PerspectiveWidget(df, **config)
422+ `
423+ ) ;
424+ expect ( errored ) . toBe ( false ) ;
425+ } ) ;
426+
413427 // *************************
414428 // UTILS
415429 // *************************
Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ def __init__(
7676 settings = True ,
7777 theme = None ,
7878 title = None ,
79+ # ignored, here for restore compatibility
80+ version = None ,
7981 ):
8082 """Initialize an instance of `PerspectiveViewer` with the given viewer
8183 configuration. Do not pass a `Table` or data into the constructor -
@@ -107,6 +109,9 @@ def __init__(
107109 settings(:obj:`bool`): Whether the perspective query settings
108110 panel should be open.
109111 theme (:obj:`str`): The color theme to use.
112+ version (:obj:`str`): The version this configuration is restored from.
113+ This should only be used when restoring a configuration,
114+ and should not be set manually.
110115
111116 Examples:
112117 >>> viewer = PerspectiveViewer(
You can’t perform that action at this time.
0 commit comments