Community API
Huge work to programmatically interact with the community tab, thanks to SBrandeis !
It is now possible to:
- Manage discussions (`create_discussion`, `create_pull_request`, `merge_pull_request`, `change_discussion_status`, `rename_discussion`)
- Comment on them (`comment_discussion`, `edit_discussion_comment`)
- List them (`get_repo_discussions`, `get_discussion_details`)
See [full documentation](https://huggingface.co/docs/huggingface_hub/how-to-discussions-and-pull-requests) for more details.
* ✨ Programmatic API for the community tab by SBrandeis in 930
HTTP-based `push_to_hub` mixins
`push_to_hub` mixin and `push_to_hub_keras` have been refactored to leverage the http-endpoint. This means pushing to the hub will no longer require to first download the repo locally. Previous git-based version is planned to be supported until v0.12.
* Push to hub mixins that do not leverage `git` by LysandreJik in 847
Miscellaneous API improvements
* ✨ `parent_commit` argument for `create_commit` and related functions by SBrandeis in 916
* Add a helpful error message when commit_message is empty in create_commit by sgugger in 962
* ✨ create_commit: more user-friendly errors on HTTP 400 by SBrandeis in 963
* ✨ Add `files_metadata` option to repo_info by SBrandeis in 951
* Add list_spaces to HfApi by cakiki in 889
Miscellaneous helpers (advanced)
Filter which files to upload in `upload_folder`
* Allowlist and denylist when uploading a folder by Wauplin in 994
Non-existence of files in a repo is now cached
* Cache non-existence of files or completeness of repo by sgugger in 986
Progress bars can be globally disabled via the `HF_HUB_DISABLE_PROGRESS_BARS` env variable or using `disable_progress_bars`/`enable_progress_bars` helpers.
* Add helpers to disable progress bars globally + tests by Wauplin in 987
Use `try_to_load_from_cache` to check if a file is locally cached
* Add utility to load files from cache by sgugger in 980
Documentation updates
* [Doc] Update "Download files from the Hub" doc by julien-c in 948
* Docs: Fix some missing images and broken links by NimaBoscarino in 936
* Replace `upload_file` with `upload_folder` in `upload_folder` docstring by mariosasko in 927
* Clarify upload docs by stevhliu in 944
Bugfixes & small improvements
* Handle redirections in `hf_hub_download` for a renamed repo by Wauplin in 983
* PR Make `path_in_repo` optional in `upload folder` by Wauplin in 988
* Use a finer exception when local_files_only=True and a file is missing in cache by Wauplin in 985
* use fixes JSONDecodeError by Wauplin in 974
* 🐛 Fix PR creation for a repo the user does not own by SBrandeis in 922
* login: tiny messaging tweak by julien-c in 964
* Display endpoint URL in whoami command by juliensimon in 895
* Small orphaned tweaks from 947 by julien-c in 958
* FIX LFS track fix for Hub Mixin by merveenoyan in 919
* :bug: fix multilinguality test and example by nateraw in 941
* Fix custom handling of refined HTTPError by osanseviero in 924
* Followup to 901: Tweak `repocard_types.py` by julien-c in 931
* [Keras Mixin] - Flattening out nested configurations for better table parsing. by ariG23498 in 914
* [Keras Mixin] Rendering the Hyperparameter table vertically by ariG23498 in 917
Internal
* Disable codecov + configure pytest FutureWarnings by Wauplin in 976
* Enable coverage in CI by Wauplin in 992
* Enable flake8 on W605 by Wauplin in 975
* Enable `flake8-bugbear` + adapt existing codebase by Wauplin in 967
* Test that TensorFlow is not imported on startup by lhoestq in 904
* Pin black to 22.3.0 to benefit from a stable --preview flag by LysandreJik in 934
* Update dev version by gante in 921