Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed format test #312

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

BaptisteVandecrux
Copy link
Member

Bug origin: first we make all the format .lower() and then we test whether it matches with "STM"
Fixed now.

It is making the test of new logger files fail on AWS-L0: https://geusgitlab.geus.dk/glaciology-and-climate/promice/aws-l0/-/pipelines/7178/failures

@BaptisteVandecrux
Copy link
Member Author

I'm actually unsure about what this part is supposed to do:

formats = {dataset.attrs["format"].lower() for dataset in self.L0}
if "raw" in formats:
self.format = "raw"
elif "stm" in formats:
self.format = "STM"
elif "tx" in formats:
self.format = "tx"
else:
raise ValueError(f"Unknown formats from l0 datasets: {','.join(formats)}")

It takes all the formats from all the L0 datasets and then applies a general format attribute to the AWS object that is :

  • raw if at least one raw L0 is in the AWS object
  • STM if the AWS object doesn't contain any raw L0 dataset but at least one STM L0 dataset
  • TX if the AWS object doesn't contain any raw or STM L0 dataset but at least one TX L0 dataset

Do we need to have an overall format for the AWS object?
Doesn't make sense that it should have an overal raw format if it composed of a mix of raw, STM and TX files.

@BaptisteVandecrux BaptisteVandecrux changed the base branch from develop to feature/rename-rh_cor November 12, 2024 13:17
@BaptisteVandecrux BaptisteVandecrux merged commit 82a1367 into feature/rename-rh_cor Nov 12, 2024
6 checks passed
@BaptisteVandecrux BaptisteVandecrux deleted the bug-fix/format-test branch November 12, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant