ruff compatible to YTT,E,W,F
All checks were successful
Pytest / pytest (3.12) (push) Successful in 50s
Pytest / pytest (3.13) (push) Successful in 49s
Pytest / pytest (3.14) (push) Successful in 49s
Pytest / pytest (3.12) (pull_request) Successful in 48s
Pytest / pytest (3.13) (pull_request) Successful in 49s
Pytest / pytest (3.14) (pull_request) Successful in 50s

This commit is contained in:
Justus Kuhlmann 2025-12-02 10:28:22 +01:00
commit d137f67e10
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6
8 changed files with 225 additions and 16 deletions

View file

@ -58,7 +58,7 @@ def write_measurement(path, ensemble, measurement, uuid, code, parameter_file=No
pars = {}
subkeys = []
for i in range(len(parameters["rw_fcts"])):
par_list = []
par_list = []
for k in parameters["rw_fcts"][i].keys():
par_list.append(str(parameters["rw_fcts"][i][k]))
subkey = "/".join(par_list)
@ -79,12 +79,12 @@ def write_measurement(path, ensemble, measurement, uuid, code, parameter_file=No
subkey = "/".join(par_list)
subkeys = [subkey]
pars[subkey] = json.dumps(parameters)
for subkey in subkeys:
for subkey in subkeys:
parHash = sha256(str(pars[subkey]).encode('UTF-8')).hexdigest()
meas_path = file_in_archive + "::" + parHash
known_meas[parHash] = measurement[corr][subkey]
if c.execute("SELECT * FROM backlogs WHERE path = ?", (meas_path,)).fetchone() is not None:
c.execute("UPDATE backlogs SET updated_at = datetime('now') WHERE path = ?", (meas_path, ))
else:
@ -107,7 +107,7 @@ def load_record(path: str, meas_path: str):
Path of the correlator library.
meas_path: str
The path to the correlator in the backlog system.
Returns
-------
co : Corr or Obs
@ -126,7 +126,7 @@ def load_records(path: str, meas_paths: list[str], preloaded = {}) -> list[Union
Path of the correlator library.
meas_paths: list[str]
A list of the paths to the correlator in the backlog system.
Returns
-------
List