batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Decouple updates file array from predbat.py

Open Meatballs1 opened this issue 1 year ago • 4 comments

Very initial stage to start decoupling the update code.

I've not tested this as its a bit of a pain to do so in branch setting tags, but to get your thoughts.

Meatballs1 avatar Apr 23 '24 18:04 Meatballs1

Seems like a sensible approach, I can give it a try when I get time

springfall2008 avatar Apr 24 '24 08:04 springfall2008

I will fix up the paths and see if I can find a sensible way to test. Might be worthwhile adding an optional configuration base URL in apps.yaml that can be used for testing

Meatballs1 avatar Apr 24 '24 08:04 Meatballs1

I've introduced the update_override_url in the configuration which lets us point to a different fork/branch which helps a lot with testing.

I've tested with it pointing at https://raw.githubusercontent.com/Meatballs1/batpred/update_decouple/ and works for my test HAOS with Appdaemon add on and predbat manually installed. Also tested in my live dockerised appdaemon install.

I suspect there may be issues if users haven't maintained the directory structure as per the repo e.g. apps/predbat/predbat.py? You can really just dump predbat.py anywhere apps directory and it doesn't really care, but we are attempting to overwrite files based on the repo structure.

Meatballs1 avatar Apr 25 '24 19:04 Meatballs1

I've not forgotten this its just not made it to the top of the list yet:)

springfall2008 avatar May 17 '24 07:05 springfall2008

This is now done on main, in a slightly different way but the files are split up :)

springfall2008 avatar Jun 15 '24 11:06 springfall2008