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

ASFProduct Subclassing #225

Merged
merged 79 commits into from
Jan 24, 2024
Merged

Conversation

SpicyGarlicAlbacoreRoll
Copy link
Contributor

@SpicyGarlicAlbacoreRoll SpicyGarlicAlbacoreRoll commented Sep 15, 2023

Breaks platform/processing level specific fields and aliases into subclasses, removes several non-common fields from base ASFProduct class.

  • Adds the following subclasses, which asf-search uses when parsing results from CMR:
    • S1Product
    • S1BURSTProduct (subclasses S1Product class)
    • ALOSProduct
    • RadarsatProduct
    • AIRSARProduct
    • ERSProduct
    • JERSProduct
    • SEASATProduct
    • SIRCProduct
    • SMAPProduct
    • UAVSARProduct
  • Moves baseline get_stack_opts() method into ASFProduct for subclasses to override
  • Adds UMMFields module for common UMM property paths and aliases
  • Adds BaselineCalcType enum class to ASFProduct, used to define perpendicular baseline calculation behavior for subclasses

@SpicyGarlicAlbacoreRoll SpicyGarlicAlbacoreRoll marked this pull request as draft September 19, 2023 20:09
@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2023

Codecov Report

Attention: 36 lines in your changes are missing coverage. Please review.

Comparison is base (a5f017e) 89.79% compared to head (19ec81f) 89.73%.

Files Patch % Lines
asf_search/ASFSearchResults.py 27.77% 13 Missing ⚠️
asf_search/Products/S1BURSTProduct.py 88.23% 4 Missing ⚠️
asf_search/Products/ARIAS1GUNWProduct.py 82.35% 3 Missing ⚠️
asf_search/Products/OPERAS1Product.py 92.10% 3 Missing ⚠️
asf_search/export/jsonlite.py 72.72% 3 Missing ⚠️
asf_search/ASFProduct.py 97.75% 2 Missing ⚠️
asf_search/Products/AIRSARProduct.py 81.81% 2 Missing ⚠️
asf_search/Products/SEASATProduct.py 80.00% 2 Missing ⚠️
asf_search/ASFStackableProduct.py 97.50% 1 Missing ⚠️
asf_search/Products/JERSProduct.py 92.30% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #225      +/-   ##
==========================================
- Coverage   89.79%   89.73%   -0.06%     
==========================================
  Files          54       69      +15     
  Lines        2028     2299     +271     
==========================================
+ Hits         1821     2063     +242     
- Misses        207      236      +29     
Flag Coverage Δ
unittests 89.73% <92.87%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

asf_search/Products/S1BURSTProduct.py Outdated Show resolved Hide resolved
asf_search/Products/S1Product.py Outdated Show resolved Hide resolved
asf_search/Products/S1Product.py Outdated Show resolved Hide resolved
asf_search/Products/S1Product.py Outdated Show resolved Hide resolved
asf_search/Products/S1Product.py Outdated Show resolved Hide resolved
asf_search/Products/SMAPProduct.py Outdated Show resolved Hide resolved
asf_search/Products/SEASATProduct.py Outdated Show resolved Hide resolved
asf_search/Products/RadarsatProduct.py Outdated Show resolved Hide resolved
asf_search/Products/JERSProduct.py Outdated Show resolved Hide resolved
asf_search/search/search_generator.py Outdated Show resolved Hide resolved
_base_properties dictionary, mapping readable property names to paths and optional type casting

entries are organized as such:
- `PROPERTY_NAME`: The name the property should be called in `ASFProduct.properties`
Copy link
Contributor

Choose a reason for hiding this comment

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

Possible to use an object for this instead of a dictionary

asf_search/ASFProduct.py Outdated Show resolved Hide resolved
asf_search/ASFProduct.py Outdated Show resolved Hide resolved
asf_search/CMR/translate.py Outdated Show resolved Hide resolved
asf_search/Products/ALOSProduct.py Outdated Show resolved Hide resolved
asf_search/export/jsonlite.py Outdated Show resolved Hide resolved
@SpicyGarlicAlbacoreRoll SpicyGarlicAlbacoreRoll marked this pull request as ready for review January 18, 2024 01:56
@SpicyGarlicAlbacoreRoll SpicyGarlicAlbacoreRoll merged commit 806867b into master Jan 24, 2024
3 checks passed
@SpicyGarlicAlbacoreRoll SpicyGarlicAlbacoreRoll deleted the topic-ASFProduct-subclassing branch January 24, 2024 20:16
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.

4 participants