forked from huggingface/huggingface_hub
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Clone from deprecation add expected deprecation in tests #1
Merged
merveenoyan
merged 25 commits into
merveenoyan:clone_from_deprecation
from
huggingface:clone_from_deprecation_add_expected_deprecation_in_tests
Aug 29, 2022
Merged
Clone from deprecation add expected deprecation in tests #1
merveenoyan
merged 25 commits into
merveenoyan:clone_from_deprecation
from
huggingface:clone_from_deprecation_add_expected_deprecation_in_tests
Aug 29, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 🖍 first draft of fix * 🖍 apply omar review, add upload_folder to guide * 🖍 add section for upload_folder * 🖍 apply niels feedback * 🖍 apply more feedback and minor edits * 🖍 apply julien feedback * 🖍 apply omar feedback * 🖍 fix typo
* this is not correct anymore * same here (not correct anymore- * README.md: promote datasets, not just models * Promote `hf_hub_download` over the deprecated `cached_download` * Apply suggestions from @stevhliu Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Omar Sanseviero <osanseviero@gmail.com> * Apply suggestions from code review Co-authored-by: Simon Brandeis <33657802+SBrandeis@users.noreply.github.com> Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com> Co-authored-by: Omar Sanseviero <osanseviero@gmail.com> Co-authored-by: Simon Brandeis <33657802+SBrandeis@users.noreply.github.com>
* Display endpoint URL in whoami command * Add missing comma * Sort imports * Don't display endpoint name in 'whoami' for the public hub * Proposal Co-authored-by: Julien Simon <julsimon@huggingface.co> Co-authored-by: Lysandre <lysandre.debut@reseau.eseo.fr>
* enable flake8 bugbear + adapt existing codebase * fix return if no exception * FIX failing tests * Update tests/testing_utils.py Co-authored-by: Lysandre Debut <hi@lysand.re> * fix docstring * fastai repo prefix in fastai tests * flake8 Co-authored-by: Lysandre Debut <hi@lysand.re>
* ✨ create_commit: more user-friendly errors on HTTP 400 * Inherit from HTTPError & add endpoint_name argument * 📝 Update docstring * 💄 Code quality
* ✨ WIP: programmatic API for the community tab * Layout the API * 📝 Autodoc data structures * 📝 Docstring (wip) * 💄 Code quality * 📝 Fix doc build & add parent attributes * ✨ Implement the API * 🚧 Placeholder guide * ✨ git_reference property * ✨ Comment edit history helpers * 💄 Code qualityyyy * ♻ refactor Pagination a bit * 🩹 Documentation + fix POST requests URL * 🩹 Fix GET requests URLs * ✨ Programmatically create_discussion * 💄 Code quality * 📝 how-to-community guide * Re-exports * ✅ Add tests * 📝 links and typo * 🚚 Rename how-to-community guide * ✨ create_pull_request convenience wrapper * Mention `create_commit` API in guide & docstrings * Use self._validate_or_retrieve_token * Apply suggestions from code review Co-authored-by: Omar Sanseviero <osanseviero@gmail.com> * 💄 Capitalize "Discussion" and "Pull Request" * Use Literal type hint * 💄 Fix typo * 🔊 Add warning when hiding a comment * 💚 CI fix * 🔥 Remove Pagination util * Update docs/source/how-to-discussions-and-pull-requests.mdx Co-authored-by: Julien Chaumond <julien@huggingface.co> * 📝 Documentation improvements * 🎨 Move ternary expressions out of the constructor call * 💄 Code quality * Update docs/source/how-to-discussions-and-pull-requests.mdx * Update docs/source/how-to-discussions-and-pull-requests.mdx * Update src/huggingface_hub/community.py * Update src/huggingface_hub/hf_api.py * Update src/huggingface_hub/hf_api.py * Update src/huggingface_hub/hf_api.py * Update src/huggingface_hub/hf_api.py * Update src/huggingface_hub/community.py * Update src/huggingface_hub/community.py Co-authored-by: Omar Sanseviero <osanseviero@gmail.com> Co-authored-by: Julien Chaumond <julien@huggingface.co> Co-authored-by: Lucain <lucainp@gmail.com>
* ✨ Add `files_metadata` option to repo_info * 🩹 Fix reference format * 📝 Add RepoInfo & RepoFile objects to pkg reference * 📝 Documentation improvements - Links to RepoInfo & RepoFile objects in docstring - Fix some typos / incorrectness * Apply suggestions from code review Co-authored-by: Omar Sanseviero <osanseviero@gmail.com> * Update src/huggingface_hub/hf_api.py Co-authored-by: Omar Sanseviero <osanseviero@gmail.com> * 📝 Type `lfs_size` and `lfs_sha256` attributes * ⏪ Better type `.lfs` attributes This reverts commit d2b1f7f. * 💚 Fix TypedDict import * 👽 blob_id -> blobId * Apply suggestions from code review * Update src/huggingface_hub/hf_api.py * Update tests/test_hf_api.py Co-authored-by: Omar Sanseviero <osanseviero@gmail.com> Co-authored-by: Lucain <lucainp@gmail.com>
* 🐛 Fix PR creation for a repo the user does not own * ✨ Add validation for create_pr & revision Co-authored-by: Lucain <lucainp@gmail.com>
* Add utility to load files from cache * Deal with repo type * Apply suggestions from code review Co-authored-by: Lucain <lucainp@gmail.com> * Address review comments Co-authored-by: Lucain <lucainp@gmail.com>
…g in cache (#985) * Add LocalEntryNotFoundError + adapt + tests * update comments * add suggested comment
…916) * 📝 Improve documentation quality for `create_commit` * ✨ Add `parent_commit` param to `create_commit` & co * 💄 Code quality * 🩹 Use `re.fullmatch` when checking a commit OID * ✅ Add a unit test * 💄 Code quality * ✅ * Update src/huggingface_hub/hf_api.py Co-authored-by: Lysandre Debut <lysandre@huggingface.co> * Fix docstring width * parentCommit needs to be at top of the payload Co-authored-by: Lysandre Debut <lysandre@huggingface.co> Co-authored-by: Lucain <lucainp@gmail.com>
* Make path in repo optional in upload folder * flake8 * Update src/huggingface_hub/hf_api.py Co-authored-by: Simon Brandeis <33657802+SBrandeis@users.noreply.github.com> * Update src/huggingface_hub/hf_api.py Co-authored-by: Simon Brandeis <33657802+SBrandeis@users.noreply.github.com>
* Add helpers to disable progress bars globally + tests * code quality + docstring * make value optional in _is_true * Update src/huggingface_hub/utils/tqdm.py Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Env variable has priority over code to disable tqdm * style Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Handle internal redirection when dowloading * expect warning on deprecated cached_download * ensure backward compatibility * clearer parameter name + docstring
* Cache non-existence of files or completeness of repo * Revert complete and add tests * Remove dupe test and quality * Remove debugging statements Co-authored-by: Lucain <lucainp@gmail.com> * Address review comments * Group tests together * Quality * FIX touch in case of subdirectory * refactored duplicated test test_file_downloaded_in_cache * fix writing new ref if ref changed Co-authored-by: Lucain <lucainp@gmail.com>
* some tests * add pytest-cov package * another ci test * new test - and quicker * new test ? * maybe coverage everywhere :) * upload coverage in CI * refacto tests in single matrix * force ci * fix workflow * fix again * set fail fast to false * FIX tensorflow tests * enable codecov comment on PRs * remove unused CI parameter + add badges to readme
* Propose a non-git mixin * Fix merge * Improvements non git mixin (#618) Add in commit_message + tests Co-authored-by: Lysandre <lysandre.debut@reseau.eseo.fr> * Big refactor * FIX typos in contributing.md * Remove redefined logger in HfApi.py * Use upload_folder in both mixins + some docstring * moved back logger to top of hf_api >< * space in documentation can be ambiguous * WIP started deprecation * deprecate skip lfs file and use Path * added decorator to deprecate specific arguments + unittests for it * simplified tests * proper decorators * fix docstring * hubmixin: fixed existing tests + add http one * unique repo names across tests * make push_to_hub_keras work + tests * logs are not overwritten in push_to_hub_keras * flake8 * refacto push_to_hub from mixin.save_pretrained * deprecate positional argument in version 0.12 * remove docstring for deprecated skip_lfs_files * delete old logs when uploading keras model to hub * remove TODO in tests * remove useless todo * Update src/huggingface_hub/hub_mixin.py * flake8 * remove un-explicit _generate_url helper * exclude some folders from flake8 * clean pr * move out tests fixing to other issue * introduce decorator to deprecate tests * docstring * fix pattern in expect_deprecation decorator * docstring * remove extras['ml'] integration * Apply suggestions from code review Co-authored-by: Omar Sanseviero <osanseviero@gmail.com> * use expect_deprecation decorator in test * remove caret in comment * explicit mocked model * delete unused and failing tett * optional path_in_repo for root * revert back token docstring * Update src/huggingface_hub/hf_api.py Co-authored-by: Lysandre Debut <lysandre@huggingface.co> Co-authored-by: Zachary Mueller <muellerzr@gmail.com> Co-authored-by: Wauplin <lucainp@gmail.com> Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
Thanks a lot, made my job quite easy 🍒 |
merveenoyan
deleted the
clone_from_deprecation_add_expected_deprecation_in_tests
branch
August 29, 2022 12:35
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Diff is big because of merge from main but the idea is to solve deprecation issues in https://github.com/huggingface/huggingface_hub/pull/952/files.
My only real commit is 19e82fc .