From f231c00f0a8fae91e19e9f47c6984ca007f05e67 Mon Sep 17 00:00:00 2001 From: rcervinoucm Date: Tue, 9 Jul 2024 14:46:38 +0200 Subject: [PATCH 1/3] Update gainsel_webmaker.py --- src/osa/scripts/gainsel_webmaker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osa/scripts/gainsel_webmaker.py b/src/osa/scripts/gainsel_webmaker.py index e6611548..2dadb92e 100644 --- a/src/osa/scripts/gainsel_webmaker.py +++ b/src/osa/scripts/gainsel_webmaker.py @@ -135,7 +135,7 @@ def main(): gain_selection_web_directory = Path(cfg.get("LST1", "GAIN_SELECTION_WEB_DIR")) gain_selection_web_directory.mkdir(parents=True, exist_ok=True) - html_file = gain_selection_web_directory / f"osa_gainsel_status_{flat_date}.html" + html_file = gain_selection_web_directory / f"osa_gainsel_status_{date}.html" # Create and save the HTML file if not run_summary_file.is_file() or len(Table.read(run_summary_file)["run_id"]) == 0: From b43a6e88326a48c07e5b6e75ece5afb63c40caca Mon Sep 17 00:00:00 2001 From: rcervinoucm Date: Tue, 9 Jul 2024 14:51:37 +0200 Subject: [PATCH 2/3] Update test_osa_scripts.py --- src/osa/scripts/tests/test_osa_scripts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osa/scripts/tests/test_osa_scripts.py b/src/osa/scripts/tests/test_osa_scripts.py index f8344769..ea27e3a6 100644 --- a/src/osa/scripts/tests/test_osa_scripts.py +++ b/src/osa/scripts/tests/test_osa_scripts.py @@ -407,14 +407,14 @@ def test_gainsel_webmaker( output = sp.run(["gainsel_webmaker", "-d", "2020-01-17"]) assert output.returncode == 0 directory = base_test_dir / "OSA" / "GainSelWeb" - expected_file = directory / "osa_gainsel_status_20200117.html" + expected_file = directory / "osa_gainsel_status_2020-01-17.html" assert expected_file.exists() # Test a date with non-existing run summary output = sp.run(["gainsel_webmaker", "-d", "2024-01-12"]) assert output.returncode == 0 directory = base_test_dir / "OSA" / "GainSelWeb" - expected_file = directory / "osa_gainsel_status_20240112.html" + expected_file = directory / "osa_gainsel_status_2024-01-12.html" assert expected_file.exists() From 3a33b827f70c7226627d509140125aaae549da04 Mon Sep 17 00:00:00 2001 From: Daniel Morcuende Date: Tue, 9 Jul 2024 15:03:48 +0200 Subject: [PATCH 3/3] [no ci] change date format of output file in docstring --- src/osa/scripts/gainsel_webmaker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osa/scripts/gainsel_webmaker.py b/src/osa/scripts/gainsel_webmaker.py index 2dadb92e..cad4266a 100644 --- a/src/osa/scripts/gainsel_webmaker.py +++ b/src/osa/scripts/gainsel_webmaker.py @@ -109,12 +109,12 @@ def determine_status(row): def main(): """Produce the html file with the processing OSA Gain Selection status. - It creates an HTML file osa_gainsel_status_YYYYMMDD.html + It creates an HTML file osa_gainsel_status_YYYY-MM-DD.html """ args = ArgumentParser( description=( "Script to create an HTML file with the gain selection status " - "(osa_gainsel_status_YYYYMMDD.html)" + "(osa_gainsel_status_YYYY-MM-DD.html)" ), parents=[common_parser], ).parse_args()