Closed OwenPriceSkelly closed 2 months ago
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Attention: Patch coverage is 50.42735%
with 58 lines
in your changes missing coverage. Please review.
Project coverage is 74.81%. Comparing base (
2c1a45c
) to head (ba99b9e
).
Files | Patch % | Lines |
---|---|---|
garden_ai/client.py | 9.52% | 19 Missing :warning: |
garden_ai/app/garden.py | 55.26% | 17 Missing :warning: |
garden_ai/gardens.py | 45.83% | 13 Missing :warning: |
garden_ai/app/entrypoint.py | 80.00% | 6 Missing :warning: |
garden_ai/app/main.py | 0.00% | 3 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
completes #496
Overview
This PR uses the environment variable introduced in #495 to use the new backend as a drop-in replacement anywhere that currently uses
local_data
.Discussion
This has some ugly hacks to keep everything consistent with current behavior, especially when it comes to the
Garden
vsPublishedGarden
distinction. Some of thoseGarden
helper methods are pretty crufty and I can't wait to get rid of them completely.We only even have the distinction there because of constraints due to local data in the first place -- one for normalized local_data entries, the other is for the denormalized search index entries. When the migration is through and the SDK no longer needs to worry about building the entries for the search index, we can simplify down to a single normalized
GardenMetadata
class.Until then, I suppose lazy-importing a client to talk to the backend is no more hacky than lazy-importing local_data to build the nested metadata for the search index.
The only functionality we don't quite have the backend ready to replace is the
list
subcommands, which just print/format all the gardens/entrypoints in local data. Once we have https://github.com/Garden-AI/garden-backend/issues/111 complete we can replace these with "list gardens that belong to me" functionality, but in the meantime those commands just aren't especially meaningful in a world without local_data, so now we just don't define them unless local_data is enabled.Testing
Sanity checked all of the
garden-ai {garden, entrypoint, notebook}
subcommands exhaustively from the CLI with/without having theGARDEN_DISABLE_LOCAL_DATA
variable set. If unset, everything works the same as before. If set, all the commands still work as expected but by calling the backend API instead of touching local_data. The only thing that still goes in local data is the user's email for the whoami command.Documentation
no docs
📚 Documentation preview 📚: https://garden-ai--498.org.readthedocs.build/en/498/