diff --git a/geomagio/api/ws/DataApiQuery.py b/geomagio/api/ws/DataApiQuery.py index 16bc7180f48ee1bcaa26ca3fb49a11c3daa0c2e6..a1716691c5ae52a3ebafede166e2c828d891351e 100644 --- a/geomagio/api/ws/DataApiQuery.py +++ b/geomagio/api/ws/DataApiQuery.py @@ -151,24 +151,7 @@ class DataApiQuery(BaseModel): return values -# Added a new class to be used within the algorithms.py module. - - -# Ask Josh --> Do we need to add all the same validators here as we do for the class DataAPIQuery? -# class FilterDataApiQuery(BaseModel): -# id: str -# starttime: UTCDateTime = None -# endtime: UTCDateTime = None -# elements: List[str] = DEFAULT_ELEMENTS -# input_sampling_period: SamplingPeriod -# output_sampling_period: SamplingPeriod -# sampling_period: None -# data_type: Union[DataType, str] = DataType.VARIATION -# format: Union[OutputFormat, str] = OutputFormat.IAGA2002 -# data_host: Union[DataHost, str] = DataHost.DEFAULT #This parameter also has no meaning in the Filter alrogithm use case - - -# The new class inheriting from DataApiQuery +# The new class inheriting everything except input/output_sampling period from DataApiQuery class FilterDataApiQuery(DataApiQuery): input_sampling_period: SamplingPeriod = SamplingPeriod.SECOND output_sampling_period: SamplingPeriod = SamplingPeriod.MINUTE diff --git a/geomagio/api/ws/algorithms.py b/geomagio/api/ws/algorithms.py index 43bdd8ba63e7b4c24237ecef0a74b1b8db75d42d..60c877e8ffbe6b2b4ce10688225fcdb95deec1f3 100644 --- a/geomagio/api/ws/algorithms.py +++ b/geomagio/api/ws/algorithms.py @@ -49,8 +49,9 @@ def get_dbdt( name="Filtered Algorithm", ) def get_filter( - ##### New query parameter defined below. I am using the DataApiQuery so retreive all the same info from - # get_Data_factory and using the SamplingPeriod class to define input and output sampling period. + ##### New query parameter defined below. I am using a new query defined in DataApitQuerr. + # This relies on the new filter.py module and the get_filter_data function + # to define input and output sampling period. # I remember us discussing a different name for these variables, possibly inital_sampling_period, but I couldn't remember what we settled on. query: FilterDataApiQuery = Depends(get_filter_data_query), ) -> Response: