Skip to content

Commit

Permalink
Add --all argument
Browse files Browse the repository at this point in the history
  • Loading branch information
tukiains committed Nov 14, 2024
1 parent 329e500 commit 49dcb3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/cloudnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 2 additions & 0 deletions src/processing/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 49dcb3d

Please sign in to comment.