From 2c7ebb6646f22bb0a0b220994c5d96c694ea00e8 Mon Sep 17 00:00:00 2001 From: rsbrost <151087253+rsbrost@users.noreply.github.com> Date: Thu, 20 Jun 2024 13:46:02 -0600 Subject: [PATCH 1/4] chore(general): cleaned up minor unwanted changes for this PR. --- pyscan/measurement/load_experiment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyscan/measurement/load_experiment.py b/pyscan/measurement/load_experiment.py index 68230ebd..52b0a2ab 100644 --- a/pyscan/measurement/load_experiment.py +++ b/pyscan/measurement/load_experiment.py @@ -36,7 +36,7 @@ def load_experiment(file_name): open('{}.pkl'.format(file_name), "rb")) expt = ItemAttribute() - # expt.runinfo = ItemAttribute() + expt.runinfo = ItemAttribute() expt.devices = ItemAttribute() for key, value in meta_data['runinfo'].items(): From 835334e20adc13c5584fa0b806c5c431be40f4a8 Mon Sep 17 00:00:00 2001 From: rsbrost <151087253+rsbrost@users.noreply.github.com> Date: Thu, 20 Jun 2024 13:46:42 -0600 Subject: [PATCH 2/4] chore(general): cleaned up other unwanted change for this PR. --- test/measurement/test_abstract_experiment.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/measurement/test_abstract_experiment.py b/test/measurement/test_abstract_experiment.py index 5e924041..cc12e704 100644 --- a/test/measurement/test_abstract_experiment.py +++ b/test/measurement/test_abstract_experiment.py @@ -290,6 +290,3 @@ def test_ms_diff_inputs(data_dir=None, measure_function=measure_point, allocate= test_ms_diff_inputs(data_dir=None, measure_function=measure_up_to_3D) test_ms_diff_inputs(data_dir='./backup', measure_function=measure_up_to_3D) test_ms_diff_inputs(data_dir='./backup', measure_function=measure_up_to_3D, allocate='preallocate_line') - - -test_abstract_experiment() From 0507c5bbc350c6ee21885c6187731d0cc4012331 Mon Sep 17 00:00:00 2001 From: rsbrost <151087253+rsbrost@users.noreply.github.com> Date: Tue, 25 Jun 2024 09:34:29 -0600 Subject: [PATCH 3/4] Update json_encoder.py --- pyscan/general/json_encoder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyscan/general/json_encoder.py b/pyscan/general/json_encoder.py index ef5ae778..84462665 100644 --- a/pyscan/general/json_encoder.py +++ b/pyscan/general/json_encoder.py @@ -36,7 +36,7 @@ def default(self, obj, debug=False): # keys_to_skip = {'logger', 'expt_thread', 'data_path', 'instrument', 'module_id_string', 'spec'} if type(obj) is type: - return f"" + return f"" # DISCUSS WITH ANDY, could return "float" instead of "" elif isinstance(obj, (InstrumentDriver, ItemAttribute)): if debug is True: print(f"obj {obj} was instance of InstrumentDriver and or ItemAttribute.") From 3ff79e3dad5fd0be4d0500f8ae8275dccfc4aed0 Mon Sep 17 00:00:00 2001 From: rsbrost <151087253+rsbrost@users.noreply.github.com> Date: Tue, 25 Jun 2024 09:48:42 -0600 Subject: [PATCH 4/4] Update json_encoder.py --- pyscan/general/json_encoder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyscan/general/json_encoder.py b/pyscan/general/json_encoder.py index 84462665..64d1617f 100644 --- a/pyscan/general/json_encoder.py +++ b/pyscan/general/json_encoder.py @@ -36,7 +36,7 @@ def default(self, obj, debug=False): # keys_to_skip = {'logger', 'expt_thread', 'data_path', 'instrument', 'module_id_string', 'spec'} if type(obj) is type: - return f"" # DISCUSS WITH ANDY, could return "float" instead of "" + return f"" # DISCUSS WITH ANDY, could return "float" instead of "" elif isinstance(obj, (InstrumentDriver, ItemAttribute)): if debug is True: print(f"obj {obj} was instance of InstrumentDriver and or ItemAttribute.") @@ -64,7 +64,7 @@ def default(self, obj, debug=False): elif callable(obj): if debug is True: print(f"obj {obj} is a function, returning source code.") - return inspect.getsource(obj) + return inspect.getsource(obj) # Talk with Andy about this and perhaps implementing in load_expt? elif isinstance(obj, (WindowsPath, Path)): # This covers both WindowsPath and PosixPath if debug is True: print(f"obj {obj} is a Path or WindowsPath, returning string of the path.")