Skip to content

Commit

Permalink
Merge pull request #4811 from QCoDeS/astafan8-patch-1
Browse files Browse the repository at this point in the history
Add from_json_to_current to dataset public API for loading RunDescriber from json
  • Loading branch information
astafan8 authored Nov 18, 2022
2 parents 060227b + b882fad commit 0f1a604
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/changes/newsfragments/4811.improved
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add ``rundescriber_from_json`` to dataset public API
for materializing ``RunDescriber`` objects from json strings
2 changes: 2 additions & 0 deletions qcodes/dataset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from .data_set_protocol import DataSetProtocol, DataSetType
from .database_extract_runs import extract_runs_into_db
from .descriptions.param_spec import ParamSpec
from .descriptions.versioning.serialization import rundescriber_from_json
from .dond.do_0d import do0d
from .dond.do_1d import do1d
from .dond.do_2d import do2d
Expand Down Expand Up @@ -87,4 +88,5 @@
"plot_by_id",
"plot_dataset",
"reset_default_experiment_id",
"rundescriber_from_json",
]
3 changes: 3 additions & 0 deletions qcodes/dataset/descriptions/versioning/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ def from_json_to_current(json_str: str) -> current.RunDescriber:
return from_dict_to_current(data)


rundescriber_from_json = from_json_to_current


# YAML


Expand Down

0 comments on commit 0f1a604

Please sign in to comment.