Use new Parameter machinery from *-common

Merged
#127 · Created  · Last updated

Merged pull request

Merge branch 'new_parameters' (pull request #127)

6660fc7·Author: ·Closed by: ·2023-11-28

Description

This PR takes advantage of new Parameter paradigms established in *-common. Namely, we no longer need to explicitly instantiate the VispParameters class with either obs_ip_start_time or wavelength; we get the former from new behavior in ParameterBase, and we get the latter by using the ParameterWavelengthMixin. 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 to VispParameters. This situation exists in Parse, where we need the parameters only for max_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 called VispParsingParameters that doesn’t use the ParameterWavelengthMixin and only has non-wavelength parameters (just max_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 a VispTaskBase subclass) and this change makes the separation even more clear.

0 attachments

0 comments

Loading commits...