Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ workflows:
matrix:
parameters:
python_version: ["min-python", "max-python"]
lint:
linting:
jobs:
- lint
47 changes: 47 additions & 0 deletions xdmod_data/warehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down