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 GammaInterfaceindirectly).
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)
Before: GammaInterface -> subprocess calls into GAMMA
After: request version specific PyGammaProxy which proxies -> GammaInterface -> subprocess calls into GAMMA
This PR officially supports GAMMA versions:
20191203 (this is the version we've always supported / gamma_insar is written for)
20210701 via insar/gamma/versions/v20210701.py
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
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)
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 viacreate_gamma_proxy
(which detects the current version of GAMMA in the operating environment and returns an appropriately versioned proxy class which wrapsGammaInterface
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)
GammaInterface
->subprocess calls into GAMMA
request version specific PyGammaProxy
which proxies ->GammaInterface
->subprocess calls into GAMMA
This PR officially supports GAMMA versions:
20191203
(this is the version we've always supported /gamma_insar
is written for)20210701
viainsar/gamma/versions/v20210701.py
20211208
viainsar/gamma/versions/v20211208.py
(no real change over20210701
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