Skip to content

Commit

Permalink
🐛 fix scene parser for sentinel-2c (close #100)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelrpl committed Dec 30, 2024
1 parent 4d95984 commit 7a17de5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
Changes
=======

Version 1.0.2 (2024-12-30)
--------------------------

- Review scene parsing for Sentinel-2 products - 2C

Version 1.0.1 (2024-12-16)
--------------------------

Expand Down
6 changes: 3 additions & 3 deletions bdc_collectors/scihub/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, scene_id: str):

fragments = scene_id.split('_')

if len(fragments) != 7 or fragments[0] not in ('S2A', 'S2B'):
if len(fragments) != 7 or not fragments[0].startswith("S2"):
raise RuntimeError(f'Invalid sentinel scene {scene_id}')

self.fragments = fragments
Expand Down Expand Up @@ -74,7 +74,7 @@ def __init__(self, scene_id: str):

fragments = scene_id.split('_')

if len(fragments) != 9 or fragments[0] not in ('S1A', 'S1B'):
if len(fragments) != 9 or not fragments[0].startswith("S1"):
raise RuntimeError(f'Invalid sentinel scene {scene_id}')

self.fragments = fragments
Expand Down Expand Up @@ -153,4 +153,4 @@ def level(self) -> str:

def datasource(self) -> str:
"""Retrieve the data source/consume name."""
return self.fragments[1]
return self.fragments[1]
2 changes: 1 addition & 1 deletion bdc_collectors/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@

"""Version information for BDC-Collectors."""

__version__ = '1.0.1'
__version__ = '1.0.2'

0 comments on commit 7a17de5

Please sign in to comment.