Quick code deployment

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Jongy
Posts: 9
Joined: Fri Jun 08, 2018 11:50 am

Quick code deployment

Post by Jongy » Tue Apr 23, 2019 5:43 pm

I'm working on a project that spans across multiple directories and dozens of files.

If you work on such a project that is compiled, build systems take care of what's work has to be done after you modify some sources, therefore the recompile process is usually quick, and finally redeploying/flashing a single binary is usually easy (Well, it's exactly one thing to do...)

However, back to a Python project, deploying lots of files to a remote board isn't so simple. Starting with the fact that there's no "sync directory" tools officially available (Or please enlighten me :)) so I had to hack a quick one that just copies the entire directory over webrepl, and that takes time and ain't feasible for quick development tests.

What I'd have liked is either to have a smart syncer that copies over only the files that were actually changed, or a mechanism to pack full sources into a single object, be it a single Python source / compiled bytecode /... (Basically like py2exe). I want to be able to make a single edit in a single file and see the whole application deployed within seconds.

Anyone had any progress on something similar? Or have an idea on how to achieve this with existing tools? Thanks.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Quick code deployment

Post by dhylands » Tue Apr 23, 2019 8:10 pm

rshell has an rsync command...
https://github.com/dhylands/rshell#rsync

Jongy
Posts: 9
Joined: Fri Jun 08, 2018 11:50 am

Re: Quick code deployment

Post by Jongy » Thu Apr 25, 2019 7:50 am

Cool, looks exactly like what I need.

For future reference, I've found this project which might be useful as well: https://github.com/pycampers/ampy.

Post Reply