diff --git a/tests/test_reference_runs/test_pre_deployment.py b/tests/test_reference_runs/test_pre_deployment.py index 46c41221844f15e2ee67687699d7713e7a45ed42..2e4035bdb8b734b6d0297fc7f4ffa2c6918e297c 100644 --- a/tests/test_reference_runs/test_pre_deployment.py +++ b/tests/test_reference_runs/test_pre_deployment.py @@ -72,9 +72,9 @@ def validate_file( ref_ds = fref[dsname] out_ds = fout[dsname] if out_ds.shape != ref_ds.shape: - changed.append((dsname, f"Shape: {ref_ds.shape} -> {out_ds.shape}")) + changed.append((dsname, f"Shape: {ref_ds.shape} -> {out_ds.shape}")) # noqa elif out_ds.dtype != ref_ds.dtype: - changed.append((dsname, f"Dtype: {ref_ds.dtype} -> {out_ds.dtype}")) + changed.append((dsname, f"Dtype: {ref_ds.dtype} -> {out_ds.dtype}")) # noqa else: # Compare chunk by chunk to not use lots of RAM nanable = np.issubdtype(ref_ds.dtype, np.floating) \ @@ -82,7 +82,7 @@ def validate_file( for chunk_slice in ref_ds.iter_chunks(): ref_chunk = ref_ds[chunk_slice] out_chunk = out_ds[chunk_slice] - if not np.allclose(ref_chunk, out_chunk, equal_nan=nanable): + if not np.allclose(ref_chunk, out_chunk, equal_nan=nanable): # noqa # If just 1 entry, show the values if ref_ds.size == 1: r, o = np.squeeze(ref_chunk), np.squeeze(out_chunk) @@ -99,7 +99,9 @@ def validate_file( ) -def parse_config(cmd: List[str], config: Dict[str, Any], out_folder: str) -> List[str]: +def parse_config( + cmd: List[str], config: Dict[str, Any], out_folder: str +) -> List[str]: """Convert a dictionary to a list of arguments. Values that are not strings will be cast. @@ -242,7 +244,7 @@ def slurm_watcher(test_key: str, std_out: str): list(automated_test_config.items()), ids=list(automated_test_config.keys()), ) -def test_xfel_calibrate(test_key: str, val_dict: dict, release_test_config: Tuple): +def test_xfel_calibrate(test_key: str, val_dict: dict, release_test_config: Tuple): # noqa """Test xfel calibrate detectors and calibrations written in the given callab_test YAML file. Args: @@ -284,16 +286,16 @@ def test_xfel_calibrate(test_key: str, val_dict: dict, release_test_config: Tupl cal_conf = val_dict["config"] - out_folder = pathlib.Path( - cal_conf["out-folder"].format(out_dir_base, cal_conf["karabo-id"], test_key) - ) + out_folder = pathlib.Path(cal_conf["out-folder"].format( + out_dir_base, cal_conf["karabo-id"], test_key + )) reference_folder = pathlib.Path( val_dict["reference-folder"].format( reference_dir_base, cal_conf["karabo-id"], test_key ) ) - report_name = out_folder / f"{test_key}_{datetime.now().strftime('%y%m%d_%H%M%S')}" + report_name = out_folder / f"{test_key}_{datetime.now().strftime('%y%m%d_%H%M%S')}" # noqa cal_conf["report-to"] = str(report_name)