Throw errors when parmeter file is not set
Some checks failed
Pytest / pytest (3.14) (push) Failing after 41s
Mypy / mypy (push) Successful in 1m15s
Pytest / pytest (3.13) (push) Failing after 41s
Mypy / mypy (pull_request) Failing after 39s
Pytest / pytest (3.12) (pull_request) Failing after 39s
Pytest / pytest (3.13) (pull_request) Failing after 40s
Pytest / pytest (3.14) (pull_request) Failing after 43s
Ruff / ruff (pull_request) Failing after 39s
Ruff / ruff (push) Successful in 1m3s
Pytest / pytest (3.12) (push) Failing after 1m18s
Some checks failed
Pytest / pytest (3.14) (push) Failing after 41s
Mypy / mypy (push) Successful in 1m15s
Pytest / pytest (3.13) (push) Failing after 41s
Mypy / mypy (pull_request) Failing after 39s
Pytest / pytest (3.12) (pull_request) Failing after 39s
Pytest / pytest (3.13) (pull_request) Failing after 40s
Pytest / pytest (3.14) (pull_request) Failing after 43s
Ruff / ruff (pull_request) Failing after 39s
Ruff / ruff (push) Successful in 1m3s
Pytest / pytest (3.12) (push) Failing after 1m18s
This commit is contained in:
parent
bd581c6c12
commit
c6f3603fbf
1 changed files with 9 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ import shutil
|
|||
from typing import Any
|
||||
|
||||
|
||||
def write_measurement(path: str, ensemble: str, measurement: dict[str, dict[str, dict[str, Any]]], uuid: str, code: str, parameter_file: Union[Any, None]) -> None:
|
||||
def write_measurement(path: str, ensemble: str, measurement: dict[str, dict[str, dict[str, Any]]], uuid: str, code: str, parameter_file: Union[str, None]) -> None:
|
||||
"""
|
||||
Write a measurement to the backlog.
|
||||
If the file for the measurement already exists, update the measurement.
|
||||
|
|
@ -57,7 +57,10 @@ def write_measurement(path: str, ensemble: str, measurement: dict[str, dict[str,
|
|||
files_to_save.append(file_in_archive)
|
||||
known_meas = pj.load_json_dict(file, verbose=False)
|
||||
if code == "sfcf":
|
||||
parameters = sfcf.read_param(path, uuid, parameter_file)
|
||||
if parameter_file is not None:
|
||||
parameters = sfcf.read_param(path, uuid, parameter_file)
|
||||
else:
|
||||
raise Exception("Need parameter file for this code!")
|
||||
pars = {}
|
||||
subkeys = list(measurement[corr].keys())
|
||||
for subkey in subkeys:
|
||||
|
|
@ -66,7 +69,10 @@ def write_measurement(path: str, ensemble: str, measurement: dict[str, dict[str,
|
|||
elif code == "openQCD":
|
||||
ms_type = list(measurement.keys())[0]
|
||||
if ms_type == 'ms1':
|
||||
parameters = openQCD.read_ms1_param(path, uuid, parameter_file)
|
||||
if parameter_file is not None:
|
||||
parameters = openQCD.read_ms1_param(path, uuid, parameter_file)
|
||||
else:
|
||||
raise Exception("Need parameter file for this code!")
|
||||
pars = {}
|
||||
subkeys = []
|
||||
for i in range(len(parameters["rw_fcts"])):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue