From 22cf0bfa2c49916d952a69f96e9453bda3b4fd1a Mon Sep 17 00:00:00 2001 From: Pirmin Kaufmann Date: Thu, 30 Apr 2026 10:36:39 +0200 Subject: [PATCH 1/4] Update product type mappings for test trajectories As long as the official operational production is at CSCS, we need to mark the products from ACPM with "-test" added to the product type --- pytrajplot/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytrajplot/utils.py b/pytrajplot/utils.py index 86a92a1..8ae9779 100644 --- a/pytrajplot/utils.py +++ b/pytrajplot/utils.py @@ -4,8 +4,8 @@ import logging _PRODUCT_TYPE_MAP: dict[str, str] = { - "ICON-CH1-EPS": "forecast-iconch1eps-trajectories", - "IFS": "forecast-ifs-trajectories", + "ICON-CH1-EPS": "forecast-iconch1eps-trajectories-test", + "IFS": "forecast-ifs-trajectories-test", } From 9d56ed4cc8d11fee39a1bf7e3a49399e57121c58 Mon Sep 17 00:00:00 2001 From: Paulina Grochal Date: Thu, 30 Apr 2026 13:48:57 +0200 Subject: [PATCH 2/4] add test suffix conditionally --- pytrajplot/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pytrajplot/utils.py b/pytrajplot/utils.py index 8ae9779..a43e8b7 100644 --- a/pytrajplot/utils.py +++ b/pytrajplot/utils.py @@ -2,10 +2,11 @@ # Standard library import logging +import os _PRODUCT_TYPE_MAP: dict[str, str] = { - "ICON-CH1-EPS": "forecast-iconch1eps-trajectories-test", - "IFS": "forecast-ifs-trajectories-test", + "ICON-CH1-EPS": "forecast-iconch1eps-trajectories", + "IFS": "forecast-ifs-trajectories", } @@ -13,10 +14,13 @@ def get_product_type(model_name: str) -> str: """Derive the product_type identifier from a model name. Falls back to a generated name if the model is not in the map. + Appends '-test' suffix when running on AWS (S3_BUCKET is set). """ product_type = _PRODUCT_TYPE_MAP.get(model_name.upper()) if product_type is None: product_type = f"forecast-{model_name.lower().replace('-', '')}-trajectories" + if os.environ.get("S3_BUCKET"): + product_type += "-test" return product_type From 9970cc5dc865a28294f1faad1292452e3bef45e9 Mon Sep 17 00:00:00 2001 From: Pirmin Kaufmann Date: Thu, 30 Apr 2026 13:58:42 +0200 Subject: [PATCH 3/4] Bump version from 2.1.1 to 2.1.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 951ce53..2ab3f93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pytrajplot" -version = "2.1.1" +version = "2.1.2" license = "BSD-3-Clause" authors = ["Michel Zeller", "Marco Ketzel", "Pirmin Kaufmann ", "Peider Könz", "Victoria Cherkas", "Paulina Grochal"] description = "Plot LAGRANTO trajectories starting/ending at the same location on a map together with vertical cross sections" From fbdcd8a370dab284c5e374198cd4991add798b35 Mon Sep 17 00:00:00 2001 From: Paulina Grochal Date: Fri, 1 May 2026 14:32:59 +0200 Subject: [PATCH 4/4] test suffix switch to new env var --- pytrajplot/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pytrajplot/utils.py b/pytrajplot/utils.py index a43e8b7..e3c8c76 100644 --- a/pytrajplot/utils.py +++ b/pytrajplot/utils.py @@ -14,13 +14,14 @@ def get_product_type(model_name: str) -> str: """Derive the product_type identifier from a model name. Falls back to a generated name if the model is not in the map. - Appends '-test' suffix when running on AWS (S3_BUCKET is set). + Appends a suffix when PRODUCT_TYPE_SUFFIX is set (e.g. '-test'). """ product_type = _PRODUCT_TYPE_MAP.get(model_name.upper()) if product_type is None: product_type = f"forecast-{model_name.lower().replace('-', '')}-trajectories" - if os.environ.get("S3_BUCKET"): - product_type += "-test" + suffix = os.environ.get("PRODUCT_TYPE_SUFFIX", "") + if suffix: + product_type += suffix return product_type