Garden-AI / garden

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

fix: staging error in GitHubConnector #529

Closed hholb closed 2 months ago

hholb commented 3 months ago

Resolves: #521

Overview

This PR fixes a bug @WillEngler found when calling stage on a GitHubConnector.

Discussion

The error was due to calling _checkout_revision before cloning/downloading the repo. I moved the call to _checkout_revision to after the download step in stage to ensure the repo is present before attempting to checkout the tagged revision.

Tests

Added a integration test covering the logic Will reported in #521 Run with: pytest -m "integration"


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

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 47.05882% with 9 lines in your changes missing coverage. Please review.

Project coverage is 75.29%. Comparing base (ff790ca) to head (5d6f5da). Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
tests/model_connectors/test_github_conn.py 30.76% 9 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #529 +/- ## ========================================== - Coverage 75.46% 75.29% -0.18% ========================================== Files 48 48 Lines 3298 3311 +13 ========================================== + Hits 2489 2493 +4 - Misses 809 818 +9 ```

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