Closed bananenpampe closed 8 months ago
Looks good but I fear the semantics is a bit confusing. save
is a method associated with a chemiscope widget, that saves its status. load
should be similarly a method that loads a ".json" into an existing chemiscope widget.
IDK if this is something that makes sense, and/or something you want to implement in this PR but I would rename the current load
method as something like read_input
or probably show_input
It makes sense, yet it would require first initializing an empty widget and then loading the saved widget into the empty one. I dont really see a usecase for it. I changed the names.
It makes sense, yet it would require first initializing an empty widget and then loading the saved widget into the empty one. I dont really see a usecase for it. I changed the names.
I am thinking of having a loaded CS, and then changing the file it has loaded. Might be interesting in interactive notebooks. I think however it's a corner case, and we could cover it in another PR if the need ever arises.
Adds a load function to load the .json or .json.gz file after saving a jupyter widget