Skip to content

Commit

Permalink
Ensure platform is landsat
Browse files Browse the repository at this point in the history
  • Loading branch information
n3h3m committed Oct 9, 2020
1 parent baf8505 commit b75c385
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions eodatasets3/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ def _dataset_label(self, sub_name: str = None):
@property
def platform_abbreviated(self) -> Optional[str]:
# For now from Alchemist the platform is always landsat for C3 processing
if "ls" not in self.dataset.platform:
raise ValueError(
"ComplicatedNamingConventionsDerivatives assumes lansat as platform"
)
return "ls"


Expand Down
2 changes: 1 addition & 1 deletion eodatasets3/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class StacPropertyView(collections.abc.Mapping):
"landsat:wrs_path": int,
"landsat:wrs_row": int,
"odc:dataset_version": None,
"odc:collection_number": None,
"odc:collection_number": int,
"odc:naming_conventions": None,
# Not strict as there may be more added in ODC...
"odc:file_format": of_enum_type(FileFormat, strict=False),
Expand Down

0 comments on commit b75c385

Please sign in to comment.