GeoscienceAustralia / ga_sar_workflow

InSAR processing workflow used by Geoscience Australia
Apache License 2.0
3 stars 1 forks source link

Add support for multiple versions of GAMMA via a GAMMA API proxy object #365

Closed mwheeler closed 2 years ago

mwheeler commented 2 years ago

This PR re-purposes the machine generated GAMMA proxy we used for unit testing, to a more general purpose of producing a GAMMA API proxy class that wraps some underlying object (something it could always do, but it's no longer specific to unit testing / it's a bit more generalised with feature flags to turn on/off validation and output file mocking).

Now, instead of using GammaInterface directly, we now request a GAMMA API proxy via create_gamma_proxy (which detects the current version of GAMMA in the operating environment and returns an appropriately versioned proxy class which wraps GammaInterface indirectly).

These wrappers override parts of the GAMMA API as the API breaks/changes, and translates the old API usage into the new GAMMA API (or our own custom logic if required / if there's no modern GAMMA equivalent).

tl;dr... one extra layer of abstraction (that hides all the version-specific details)

This PR officially supports GAMMA versions:

  1. 20191203 (this is the version we've always supported / gamma_insar is written for)
  2. 20210701 via insar/gamma/versions/v20210701.py
  3. 20211208 via insar/gamma/versions/v20211208.py (no real change over 20210701 that matters to us right now)

Unit tests passing, and tested many many times (too many times... quicklook image pain) on Gadi

This addresses #360

mwheeler commented 2 years ago

All resolved comments fixed in 595fea4

Will be closing this issue w/ the 2 unresolved comments open (one is an open question, the other is just a style nitpick which can be raised in another issue if it's important enough)