Commit 6a5bbfed authored by Bruno Duyé's avatar Bruno Duyé
Browse files

Minor: rename function

parent a2cac1e0
Pipeline #87233 passed with stage
in 35 seconds
......@@ -184,7 +184,7 @@ def fetch_series_by_api_link(api_link, max_nb_series=None,
# Call API via `iter_series`, add dimensions labels and store result in `series_list`. Fill `datasets_dimensions`
# Call API via `iter_series_infos`, add dimensions labels and store result in `series_list`. Fill `datasets_dimensions`
datasets_dimensions = None
series_dims_by_dataset_code = defaultdict(dict)
# series_dims_by_dataset_code example:
......@@ -197,7 +197,7 @@ def fetch_series_by_api_link(api_link, max_nb_series=None,
# ...
# }
series_list = []
for series_infos in iter_series(api_link, max_nb_series=max_nb_series):
for series_infos in iter_series_infos(api_link, max_nb_series=max_nb_series):
complete_dataset_code = series_infos['series']['provider_code'] + \
'/' + series_infos['series']['dataset_code'] # ex 'AMECO/ZUTN'
if datasets_dimensions is None:
......@@ -334,7 +334,7 @@ def iter_filtered_series(series_list, filters, apply_endpoint_url):
yield flatten_editor_series(series=filter_result["series"], dbnomics_series=dbnomics_series)
def iter_series(api_link, max_nb_series=None):
def iter_series_infos(api_link, max_nb_series=None):
"""Iterate through returned by API
Returns dicts of dataset(s) dimensions and series.
The answer can have a key 'dataset_dimensions' if only one dataset is returned by API, or 'datasets_dimensions' if
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment