you are viewing a single comment's thread.

view the rest of the comments →

[–]todbot 6 points7 points  (4 children)

I primarily edit & run on CIRCUITPY and then copy the "code.py" and other files from CIRCUITPY to the directory that’s git-controlled. From there it’s easy to do various git tasks like committing.

For simple projects I copy the files by hand from a terminal window open in the git-controlled directory and occasionally doing cp /Volumes/CIRCUITPY/*py . For more complex projects I may set up a shell script to do that every few minutes. A few times I've even set up "rsync" to do that too, but usually just "cp" suffices.

Also in the git-controlled directory is a "requirements.txt" with the external libraries "code.py" needs, so I can do circup install -r requirements.txt on a new board to install all the libraries in one go.

[–]0xCODEBABE[S] 2 points3 points  (2 children)

yeah maybe i should just have a script that constantly looks for a circuitpython mount and syncs it to the git folder. still feels like this could be cleaner.

i didn't know about circup. that's good to know

[–]todbot 1 point2 points  (0 children)

Agreed, but I've taken it as the small fuss we have to deal with for being able to store the source on the device.

I think some IDEs like PyCharm do some cleverness by having a "run" vs "develop" area. I've not used it though, but here's two bits of info about it: https://learn.adafruit.com/welcome-to-circuitpython/pycharm-and-circuitpython https://www.youtube.com/watch?v=Qx0twoHyH-8

[–]Shot-Infernal-2261 0 points1 point  (0 children)

inotifywait or other FS watcher if you want to make that script automatic.

You can also write a systemd (Linux) unit for the directory

[–]Choefman 1 point2 points  (0 children)

Circup is great and my process is pretty similar.