From 49dcb3d16438d5bd02f597ddea1f3d363fa78198 Mon Sep 17 00:00:00 2001 From: Simo Tukiainen Date: Thu, 14 Nov 2024 15:51:55 +0200 Subject: [PATCH] Add `--all` argument --- scripts/cloudnet.py | 5 +++++ src/processing/fetch.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/scripts/cloudnet.py b/scripts/cloudnet.py index f14333f9..ec5c8c34 100755 --- a/scripts/cloudnet.py +++ b/scripts/cloudnet.py @@ -149,6 +149,11 @@ def _parse_args(): action="store_true", help="Fetch raw data. Only applicable if the command is 'fetch'.", ) + group.add_argument( + "--all", + action="store_true", + help="Fetch ALL raw data including .LV0. Only applicable if the command is 'fetch --raw'.", + ) args = parser.parse_args() diff --git a/src/processing/fetch.py b/src/processing/fetch.py index 6ddbfaed..d007ba03 100644 --- a/src/processing/fetch.py +++ b/src/processing/fetch.py @@ -58,6 +58,8 @@ def get_raw_instrument_metadata(self) -> list: res = requests.get(url=url, params=payload) res.raise_for_status() metadata = res.json() + if self.args.all: + return metadata return [m for m in metadata if not m["filename"].lower().endswith(".lv0")] def get_raw_model_metadata(self) -> list: