-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bring consistency to download and upload APIs #574
Conversation
@osanseviero mostly interested on if you think I missed any. There weren't many instances of this happening from a user perspective I could see, but one may have trickled past me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. I think you cover all the cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @osanseviero's comment, otherwise this looks good!
Based on advice from @LysandreJik I forgo that logic for a complete refactor, making use of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
raise ValueError( | ||
f"""Passed `organization` and `name` organization are not the same ({organization}, {checked_name[1]}). | ||
Please either include the organization in only `name` or the `organization` parameter, such as `api.create_repo({checked_name[0]}, organization={organization})` or `api.create_repo({checked_name[1]}/{checked_name[2]})`""" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
Closes #47
This PR aims to bring some consistency in how the api can be used, by letting a user both pass in a specified
organization
as well as usingorganization/model_name
for functions revolving around uploading and downloading