diff --git a/daily_read/config.py b/daily_read/config.py index 9ddd49d..48f0c17 100644 --- a/daily_read/config.py +++ b/daily_read/config.py @@ -20,7 +20,7 @@ def __init__(self, env_file_path): self.FETCH_FROM_SNPSEQ = os.getenv("DAILY_READ_FETCH_FROM_SNPSEQ") self.FETCH_FROM_UGC = os.getenv("DAILY_READ_FETCH_FROM_UGC") self.STATUS_PRIORITY = { - 0: "None", + 0: "Pending", 1: "Samples Received", 2: "Reception Control finished", 3: "Library QC finished", diff --git a/daily_read/daily_report.py b/daily_read/daily_report.py index 0eaaa47..aa5f09c 100644 --- a/daily_read/daily_report.py +++ b/daily_read/daily_report.py @@ -23,11 +23,12 @@ } STATUS_DESCRIPTIONS = { - "All Raw data Delivered": "The data has been made available through NGIs delivery system", - "All Samples Sequenced": "Sequencing (including potential resequencing) of all samples has been finished", + "All Raw data Delivered": "The data has been made available through NGIs delivery system.", + "All Samples Sequenced": "Sequencing (including potential resequencing) of all samples has been finished.", "Library QC finished": "Library QC is a quality control of the sequencing library produced either by NGI or supplied by you, depending on the type of project.", "Reception Control finished": "Reception Control consists of NGI staff measuring e.g. concentration and volume for the samples received.", - "Samples Received": "The samples have been received and registered at NGI", + "Samples Received": "The samples have been received and registered at NGI.", + "Pending": "The order has been set up but the samples have not yet been received or registered by NGI.", } PORTAL_URL = "https://ngisweden.scilifelab.se/orders" diff --git a/daily_read/ngi_data.py b/daily_read/ngi_data.py index addbd2c..a2ddf75 100644 --- a/daily_read/ngi_data.py +++ b/daily_read/ngi_data.py @@ -278,7 +278,8 @@ def __init__( else: self.status = latest_statuses[0] else: - log.info(f"No project dates found for {project_id}") + log.info(f"No project dates found for {project_id}, so setting its status to Pending") + self.status = "Pending" @property def internal_id_or_portal_id(self): diff --git a/daily_read/templates/daily_report.html.j2 b/daily_read/templates/daily_report.html.j2 index 2cf1c4a..8dac544 100644 --- a/daily_read/templates/daily_report.html.j2 +++ b/daily_read/templates/daily_report.html.j2 @@ -148,7 +148,7 @@ - {% if data["projects"]|length == 1 and None in data["projects"] %} + {% if data["projects"]|length == 0 %}