Garden-AI / garden

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

Add idempotency check to @entrypoint_test #467

Closed hholb closed 4 months ago

hholb commented 4 months ago

Resolves #424

Overview

@entrypoint_test will raise a EntrypointIdempotencyError if the function being tested is non-idempotent. If any other exceptions are raised during the test, they are raised as an EntrypointTestError. This should make it easier for users to catch issues with their entrypoints before publishing.

Testing

Add unit tests in test/test_entrypoints.py to confirm behavior.

Documentation

Updates the doc comments in entrypoint_test


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

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.67%. Comparing base (d30a2b7) to head (6e1c5d4). Report is 23 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #467 +/- ## ========================================== + Coverage 76.09% 76.67% +0.58% ========================================== Files 51 51 Lines 3301 3336 +35 ========================================== + Hits 2512 2558 +46 + Misses 789 778 -11 ```

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