diff --git a/.circleci/config.yml b/.circleci/config.yml index 0bd4a248..497e2a83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,6 +95,6 @@ workflows: matrix: parameters: python_version: ["min-python", "max-python"] - lint: + linting: jobs: - lint \ No newline at end of file diff --git a/xdmod_data/warehouse.py b/xdmod_data/warehouse.py index ba016f76..2ee8569e 100644 --- a/xdmod_data/warehouse.py +++ b/xdmod_data/warehouse.py @@ -156,6 +156,53 @@ def get_data( params, response.text, ) + + def get_metrics_data( + self, + date_range, + realm, + metric, + group_by, + dataset_type, + aggregation_unit, + include_only, + exclude + ): + + _validator._assert_runtime_context(self.__in_runtime_context) + + if isinstance(metric, list): + raise NotImplementedError("metric as a list is not yet implemented") + + if isinstance(group_by, (list, dict)): + raise NotImplementedError("group_by as a list or dict is not yet implemented") + + if exclude: + raise NotImplementedError("exclude is not yet implemented") + + translated_params = { + 'duration': date_range, + 'realm': realm, + 'metric': metric, + 'dimension': group_by, + 'filters': include_only, + 'dataset_type': dataset_type, + 'aggregation_unit': aggregation_unit, + } + + params = _validator._validate_get_data_params( + self, + self.__descriptors, + translated_params, + ) + + response = self.__http_requester._request_data(params) + + return _response_processor._process_get_data_response( + self, + params, + response.text, + ) def get_raw_data( self,