diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 73fcf6ee3..87101be7f 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -20,6 +20,12 @@ unreleased [2.x] just "-m qcX" or "-m clock" (#290). +unreleased [1.0rc3] +------------------- + +* The HDF5 format has changed. The datasets are located in the subgroup ``datasets``. + + 1.0rc2 ------ diff --git a/artiq/master/worker_db.py b/artiq/master/worker_db.py index eadc0a0b9..16046cd26 100644 --- a/artiq/master/worker_db.py +++ b/artiq/master/worker_db.py @@ -250,4 +250,5 @@ class DatasetManager: return self.ddb.get(key) def write_hdf5(self, f): - result_dict_to_hdf5(f, self.local) + g = f.create_group("datasets") + result_dict_to_hdf5(g, self.local) diff --git a/artiq/master/worker_impl.py b/artiq/master/worker_impl.py index 6bb1aaf4d..a6258b94f 100644 --- a/artiq/master/worker_impl.py +++ b/artiq/master/worker_impl.py @@ -218,14 +218,11 @@ def main(): exp_inst.analyze() put_object({"action": "completed"}) elif action == "write_results": - f = get_hdf5_output(start_time, rid, exp.__name__) - try: + with get_hdf5_output(start_time, rid, exp.__name__) as f: dataset_mgr.write_hdf5(f) - string_to_hdf5(f, "artiq_version", artiq_version) + string_to_hdf5(f, "version", artiq_version) if "repo_rev" in expid: string_to_hdf5(f, "repo_rev", expid["repo_rev"]) - finally: - f.close() put_object({"action": "completed"}) elif action == "examine": examine(ExamineDeviceMgr, ParentDatasetDB, obj["file"])