0

CircuitPython and versioning
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

CircuitPython and versioning

by bludin on Thu Apr 01, 2021 4:27 am

How do people handle more complex projects in cp? (I'm not talking about the development of cp itself)
While it is very handy to have the code exist on the devices themselves, it also seems dangerous (when you lose or brick your device you lose your code) and not suitable for versioning (e.g. with git) because of the limited storage capacity. What I would like is to have a repo on my PC and have the relevant files synced with the assigned device(s) automatically. Is there a utility or even IDE (Pycharm?) which does that?

If not, what do you think about having a service that automatically scans available devices/volumes and repos for key files and if they correspond, syncs the current version with the device? Does that sound like a good idea and if so, does something like that exist already?

bludin
 
Posts: 53
Joined: Thu Apr 16, 2020 8:57 am

Re: CircuitPython and versioning

by blnkjns on Thu Apr 01, 2021 6:47 am

Following the topic, think this is much needed, backup/version management is a PITA with circuitpython imo.

blnkjns
 
Posts: 304
Joined: Fri Oct 02, 2020 3:33 am

Re: CircuitPython and versioning

by bludin on Thu Apr 01, 2021 6:53 am

...said service could also update the library files, if the key file specifies the cp version.

bludin
 
Posts: 53
Joined: Thu Apr 16, 2020 8:57 am

Re: CircuitPython and versioning

by tannewt on Thu Apr 01, 2021 5:41 pm

For updating the libraries check out `circup`: https://github.com/adafruit/circup/

Generally, I back up my code.py's into library repos as examples. My use is a bit weird though because I'm generally just developing something. That said, I do abuse things from the circuitpython core and I rarely lose files on CIRCUITPY accidentally. I think the risk is pretty small.

tannewt
 
Posts: 2349
Joined: Thu Oct 06, 2016 8:48 pm

Re: CircuitPython and versioning

by danhalbert on Thu Apr 01, 2021 7:32 pm

I have thought that there's an opportunity for a VSCode or Atom plugin that writes a file both to CIRCUITPY and also to a backup location on the host's disk (possibly doing versioning). I have looked for some existing plugin and haven't found one, but it would not be complicated to write.

danhalbert
 
Posts: 2332
Joined: Tue Aug 08, 2017 12:37 pm

Please be positive and constructive with your questions and comments.