Feature: add an utility to scan cache (#990)
* WIP utility to scan cache
* add example in scan.py
* code quality
* property in CachedRepoInfo + typing fixes
* changes from feedback
* rename to private util module
* remove scan.py script and make proper CLI
* review CLI help
* remove unused colors
* start documentation
* add file to doctree
* fix snippets ?
* try generating doc from docstring
* doc
* refacto to frozen dataclasses
* always more doc
* always more docs
* forgotten line
* finalize doc
* add text to snippet type
* test cache scanner
* mypy
* siort
* add tests for CLI
* fix cli tests
* Update docs/source/how-to-cache.mdx
Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
* Update docs/source/how-to-cache.mdx
Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
* Update docs/source/how-to-cache.mdx
Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
* Add valuerror is cache dir is missing
* update doc
* Change from errors to warnings
* Update src/huggingface_hub/commands/_cli_utils.py
Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>
* test cli utils
* Test scan cache cli initialization
* make style
* typing
Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>