Garden-AI / garden

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

make github connector idempotent #417

Closed OwenPriceSkelly closed 5 months ago

OwenPriceSkelly commented 5 months ago

fixes #413

Discussion

~This tweaks the trackcalls decorator so that stage can use its own has_been_called attribute and guarantee that it only executes once.~

This makes the GH connector behave a little more like the huggingface one by pulling instead of cloning when the directory is already a git repo.

Testing

~Wrote a cute little unit test, since it was easy~ updated the unit test so it checks that pull is called instead of clone when appropriate

Documentation

no docs


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

codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 96.55172% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 76.64%. Comparing base (9eb5ba2) to head (fe0a947).

Files Patch % Lines
garden_ai/model_connectors/github_conn.py 85.71% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #417 +/- ## ========================================== + Coverage 76.22% 76.64% +0.41% ========================================== Files 46 46 Lines 2810 2834 +24 ========================================== + Hits 2142 2172 +30 + Misses 668 662 -6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.