Use new Parameter
machinery from *-common
Arthur Eigenbrot
Branch: new_parameters
Branch: main
Merged
Merged pull request
Merge branch 'new_parameters' (pull request #127)
Parameter
machinery from *-common
Merge branch 'new_parameters' (pull request #127)
This PR takes advantage of new Parameter paradigms established in
*-common
. Namely, we no longer need to explicitly instantiate theVispParameters
class with eitherobs_ip_start_time
orwavelength
; we get the former from new behavior inParameterBase
, and we get the latter by using theParameterWavelengthMixin
. Neat!A small wrinkle is that the
Parameter*Mixin
classes generally use args (instead of kwargs) in their__init__
methods so it’s no longer OK to not pass in the wavelength toVispParameters
. This situation exists inParse
, where we need the parameters only formax_cs_step_time_sec
and we don’t know the wavelength (because it hasn’t been parsed yet). To get around this there’s a new parameter class calledVispParsingParameters
that doesn’t use theParameterWavelengthMixin
and only has non-wavelength parameters (justmax_cs_step_time_sec
for now).After being a little frustrated with this I actually have come to like this new pattern. It keeps us in the “explicit is better than implicit” mode of operation because
Parse
has always been a bit of an oddball (e.g., it’s NOT aVispTaskBase
subclass) and this change makes the separation even more clear.