Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api-client get_dataset_file #821

Merged
merged 5 commits into from
Jan 18, 2024
Merged

Conversation

emanuel-schmid
Copy link
Collaborator

@emanuel-schmid emanuel-schmid commented Dec 1, 2023

Changes proposed in this PR:

  • Adds a convenience method to the Client, get_dataset_file, which combines get_dataset_info and download_dataset, thus reducing boilerplate code.

PR Author Checklist

PR Reviewer Checklist

Parameters
----------
**kwargs
arguments for get_dataset and download_dataset
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
arguments for get_dataset and download_dataset
arguments for get_dataset and download_dataset

It is only download_dataset right?

Copy link
Collaborator Author

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
Copy link
Member

chahank commented Dec 12, 2023

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
Copy link
Collaborator Author

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
Copy link
Member

chahank commented Dec 13, 2023

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

@chahank
Copy link
Member

chahank commented Dec 13, 2023

good for merging.

@emanuel-schmid emanuel-schmid merged commit 5f55a17 into develop Jan 18, 2024
11 checks passed
@emanuel-schmid emanuel-schmid deleted the feature/get_dataset_file branch January 18, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants