From c65210dbc02cc2118c28171cad5c4a77b14420a4 Mon Sep 17 00:00:00 2001 From: idalindegaard Date: Mon, 19 Feb 2024 14:40:21 +0100 Subject: [PATCH 1/3] delete error msg in file_to_udf --- cg_lims/EPPs/files/file_to_udf.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/cg_lims/EPPs/files/file_to_udf.py b/cg_lims/EPPs/files/file_to_udf.py index 456a565f..698caf49 100644 --- a/cg_lims/EPPs/files/file_to_udf.py +++ b/cg_lims/EPPs/files/file_to_udf.py @@ -47,9 +47,6 @@ def set_udfs(well_field: str, value_field: str, udf: str, well_dict: dict, resul if value is None: error_msg.append("Some samples in the file hade missing values.") continue - elif well not in well_dict: - error_msg.append("Some samples in the step were not represented in the file.") - continue art = well_dict[well] try: art.udf[udf] = str(value) From be83d4d947a4ca3982ecc740badc5cf893b85dc5 Mon Sep 17 00:00:00 2001 From: Ida Lindegaard <82438141+idalindegaard@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:53:20 +0100 Subject: [PATCH 2/3] Update cg_lims/EPPs/files/file_to_udf.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Karl Svärd <60181709+Karl-Svard@users.noreply.github.com> --- cg_lims/EPPs/files/file_to_udf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cg_lims/EPPs/files/file_to_udf.py b/cg_lims/EPPs/files/file_to_udf.py index 698caf49..6b36e9f5 100644 --- a/cg_lims/EPPs/files/file_to_udf.py +++ b/cg_lims/EPPs/files/file_to_udf.py @@ -47,6 +47,9 @@ def set_udfs(well_field: str, value_field: str, udf: str, well_dict: dict, resul if value is None: error_msg.append("Some samples in the file hade missing values.") continue + elif well not in well_dict: + LOG.info(f"Well {well} was not found in the step. Skipping!") + continue art = well_dict[well] try: art.udf[udf] = str(value) From ce1d2b2d2e9cdd7beff796d4ad9bdc371da5f7b5 Mon Sep 17 00:00:00 2001 From: Ida Lindegaard <82438141+idalindegaard@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:53:28 +0100 Subject: [PATCH 3/3] Update cg_lims/EPPs/files/file_to_udf.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Karl Svärd <60181709+Karl-Svard@users.noreply.github.com> --- cg_lims/EPPs/files/file_to_udf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cg_lims/EPPs/files/file_to_udf.py b/cg_lims/EPPs/files/file_to_udf.py index 6b36e9f5..9e44396b 100644 --- a/cg_lims/EPPs/files/file_to_udf.py +++ b/cg_lims/EPPs/files/file_to_udf.py @@ -45,7 +45,8 @@ def set_udfs(well_field: str, value_field: str, udf: str, well_dict: dict, resul well = sample.get(well_field) value = sample.get(value_field) if value is None: - error_msg.append("Some samples in the file hade missing values.") + error_msg.append("Some samples in the file had missing values.") + LOG.info(f"Missing value for sample {sample} in well {well}. Skipping!") continue elif well not in well_dict: LOG.info(f"Well {well} was not found in the step. Skipping!")