api-client get_dataset_file by emanuel-schmid · Pull Request #821 · CLIMADA-project/climada_python

@emanuel-schmid

chahank

Parameters
----------
**kwargs
arguments for get_dataset and download_dataset

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arguments for get_dataset and download_dataset
arguments for get_dataset and download_dataset

It is only download_dataset right?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The ones for download_dataset are explicitly separated and all the others are submitted to get_dataset.

@chahank

I am a bit confused by the need of this new method. Overall, the api_client methods have all a bit confusing names. Could explain why this is needed?

@emanuel-schmid

There is no need for this new method. It's nothing but a shortcut for the use case of getting a particular file from the api. So far one has to do it in two steps:

ds = client.get_dataset_info(...)
_, [path] = client.download_dataset(ds, ...)

now it's possible in one:

path = client.get_dataset_file(...)

@chahank

Good for me, just need to resolve the conflict with the changelog ;).

@emanuel-schmid

…t_file

# Conflicts:
#	CHANGELOG.md

@chahank