cheshire-cat-ai / plugins-backend

The backend of The Cheshire Cat plugin directory
GNU General Public License v3.0
7 stars 5 forks source link

Plugin zip cache: Try to download latest release before cloning #10

Closed pieroit closed 1 year ago

pieroit commented 1 year ago

We are giving community a recommended way of creating a plugin, with this template that handles releases creating a ready made zip to download via Github public api.

Since method Endpoints.download_plugin_zip is already dealing with the creation of the zip, covering all non-template use cases, I propose to:

Maybe @valentimarco is interested at working on this (also @nicola-corbellini )

valentimarco commented 1 year ago

Ye, i am interested!

pieroit commented 1 year ago

@valentimarco so the sequence would be this for function Endpoints.download_plugin_zip: 1 - check for the latest release via Github public api (the code you already wrote in core) 2 - if no release is available, go on cloning adn cleaning the code (what the actual function does)

Thanks! Let me know if you need clarification

EugenioPetulla commented 1 year ago

I'm glad that someone is collaborating on this repository! Let me know if you have any needs, and I'll be super-happy to assist you.

I just want to add a little request:

Keep an eye on caching files avoiding to download the same release every time. :D

I'm looking forward to reading your pull requests!

valentimarco commented 1 year ago

@EugenioPetulla i have a problem with the build right now: when i try to download a zip that is in the cache, python throws a PermissionError Can we discuss on discord?