-
Notifications
You must be signed in to change notification settings - Fork 570
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
Delete folder with commit endpoint #1163
Conversation
The documentation is not available anymore as the PR was closed or merged. |
Codecov ReportBase: 84.57% // Head: 84.62% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1163 +/- ##
==========================================
+ Coverage 84.57% 84.62% +0.05%
==========================================
Files 42 42
Lines 4182 4196 +14
==========================================
+ Hits 3537 3551 +14
Misses 645 645
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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
Resolves #1151 following server-side implementation (https://github.com/huggingface/moon-landing/pull/3826 (internal link)).
CommitOperationDelete
has now a different behavior depending on if the path is a file or a folder. By default, it will try to guess it automatically by looking at a trainling "/" on the path. Otherwise, it is possible to explicitly setis_folder=True
. In case of a "file not found error" (most likely due to a folder passed as a file), a custom message is added to theEntryNotFoundError
.Also implements a high-level
delete_folder
, same as existingdelete_file
.Added tests and updated the documentation.