Garden-AI / garden

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

`garden-ai garden delete` command #429

Closed WillEngler closed 7 months ago

WillEngler commented 7 months ago

Closes #421

Overview

This PR adds a new command. garden-ai garden delete -g 10.23677/some-doi. It deletes the garden locally and on the search index.

Discussion

By default, if a garden isn't in your data.json, the command won't let you remove it from the search index. There is a hidden --dangerous-override flag you can add that will let you remove it from the search index anyways.

Testing

I tested this against the new DELETE /garden-search-record endpoint in dev. I also added new unit tests for the command

Documentation

Just the CLI docs for now


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

codecov-commenter commented 7 months ago

Codecov Report

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

Project coverage is 76.70%. Comparing base (cf5a849) to head (5bbaa44).

Files Patch % Lines
garden_ai/local_data.py 20.00% 4 Missing :warning:
garden_ai/backend_client.py 50.00% 2 Missing :warning:
garden_ai/client.py 33.33% 2 Missing :warning:
garden_ai/app/garden.py 92.30% 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 #429 +/- ## ========================================== + Coverage 76.64% 76.70% +0.06% ========================================== Files 46 46 Lines 2834 2880 +46 ========================================== + Hits 2172 2209 +37 - Misses 662 671 +9 ```

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

WillEngler commented 7 months ago

I like the ask! I'll make that change and then merge

blaiszik commented 7 months ago

Came here to mention deletability of Gardens and entry points with registered DOIs, but see you already found that issue! 🙂