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

Fix regex to work with Sentinel-2 Band 8A #393

Merged
merged 3 commits into from
Feb 12, 2022
Merged

Fix regex to work with Sentinel-2 Band 8A #393

merged 3 commits into from
Feb 12, 2022

Conversation

weiji14
Copy link
Contributor

@weiji14 weiji14 commented Feb 10, 2022

Regex was only finding numerical bands (e.g. Band 01, 02, ..., 10, 12), but not Band 8A. Change B\d{2} to the more specific B[018][\dA].

Regex was only finding numerical bands (e.g. Band 01, 02, ..., 10, 12), but not Band 8A.
@ghost
Copy link

ghost commented Feb 10, 2022

CLA assistant check
All CLA requirements met.

@github-actions github-actions bot added datasets Geospatial or benchmark datasets testing Continuous integration testing labels Feb 10, 2022
Copy link
Collaborator

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Just one suggestion to make the regex simpler.

torchgeo/datasets/sentinel.py Outdated Show resolved Hide resolved
@adamjstewart adamjstewart added this to the 0.2.1 milestone Feb 10, 2022
Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>
@calebrob6
Copy link
Member

Nice, thanks @weiji14!!

@adamjstewart
Copy link
Collaborator

If this is ready to go just click the "Ready for review" button and I can merge.

@weiji14 weiji14 marked this pull request as ready for review February 11, 2022 01:01
@adamjstewart adamjstewart merged commit 019dc24 into microsoft:main Feb 12, 2022
@weiji14 weiji14 deleted the fix/sentinel2_band8a branch February 13, 2022 01:23
adamjstewart added a commit that referenced this pull request Mar 19, 2022
* Fix regex to work with Sentinel-2 Band8A

Regex was only finding numerical bands (e.g. Band 01, 02, ..., 10, 12), but not Band 8A.

* Update test_sentinel to include Band 8A

* Simplify regex

Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
yichiac pushed a commit to yichiac/torchgeo that referenced this pull request Apr 29, 2023
* Fix regex to work with Sentinel-2 Band8A

Regex was only finding numerical bands (e.g. Band 01, 02, ..., 10, 12), but not Band 8A.

* Update test_sentinel to include Band 8A

* Simplify regex

Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasets Geospatial or benchmark datasets testing Continuous integration testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants