Garden-AI / garden

https://garden-ai.readthedocs.io
MIT License
16 stars 4 forks source link

Make GitHubConnector raise exception when git-lfs files are detected #466

Closed hholb closed 1 month ago

hholb commented 1 month ago

Resolves #447

Overview

Added a method _has_lfs_file to the GitHubConnector that pulls .gitattributes from the remote repo and looks for any git-lfs files.

Added a check in GitHubConnector.__init__ that raises an exception when a git-lfs file is detected. The raised exception suggests using HuggingFace to the user.

Discussion

Testing

Manually tested in IPython against this repo with a git-lfs file.

Created a new unit test in tests/test_models.py to confirm the behavior.

Documentation

No documentation updates. This behavior will be documented as part of #465.


📚 Documentation preview 📚: https://garden-ai--466.org.readthedocs.build/en/466/