This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal for simplifying repetitive tasks of the development, test, lint, format, build and flash processes #142
Comments
Great idea! I think that would be extremely useful and help to organize all the commands. One important issue, however: I want people on Windows, Mac, and Linux to all be able to pull down the code, build from source, and flash to their devices. That is a large reason for why the project uses Vagrant in the first place. As it is now, if you're on a vanilla Windows platform, all you need to do is download vagrant and git and you'll be good to go. With the introduction of a Makefile, this could complicate the process for Windows users. Is there a way to make this easy to run on Windows without requiring a lot of additional effort? Ideally, supporting it would require at most one more |
A very important issue. In theory, Mac users can run the
I believe there are close possibilities:
EDIT: |
Isn't it possible to just login Vagrant, than run all the commands as you were on Linux? |
Taking the first short steps. I think I found a node.js framework -- electron-builder -- that makes it possible to create programs for Mac, Linux and Windows using a separate instance of chrome. I think now it's integrating the build process (vagrant, etc.) and installation steps in
Yes, its possible. But I'm kind of lazy person (:face_with_head_bandage: ) and I like to type few commands when they are repetitive. |
The Because I was trying to avoid platform-specific instructions (and troubleshooting), the website documentation for installing from source just says to run the As for the development of Krux, it's less important that it be cross-platform. So, the Makefile could be written assuming it will be run on linux or inside Vagrant just like the Would that be easiest? That may have been what @odudex was suggesting. |
A GUI installer based on Electron would be pretty neat if it could automate the installation commands. Something like this:
Is that what you're proposing? |
I think it will be.
Sorry for not expressing myself properly before. But yes, that's exactly what I wanted to propose. In this sense, a GUI could (in a ideal and a similar way to what Raspiberry Pi Imager does):
|
That sounds great to me! To keep things organized, can you create two issues: one for the Makefile with a small explanation about it (similar to your original post here), and one for the installer? That way we can track their development separately (ideally in two separate PRs) Going to convert this issue into a discussion |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
When reading the official documentation over and over again (initially, with the intention of translation), I noticed that some tasks (development, build, lint, update, test, etc) require, on an extended time scale, a considerable amount of repetition of the commands.
I think this could be simplified, through a
Makefile
.I didn't open a PR to not affect some improvements being made by @jreesun and @odudex , but I share a gist that, apparently, simplified the tasks.
Some of the simplified tasks:
make update
: replacinggit pull origin main && git submodule update --init --recursive
make install
: replacingpoetry install
and some optional dependencies (in this sense, a proposal to modifypyproject.toml
to)make test
: replacingpoetry run pytest --cache-clear --cov src/krux --cov-report html ./tests
make test/verbose
: replacingpoetry run pytest --cache-clear --cov src/krux --cov-report html --show-capture all --capture tee-sys -r A ./tests
make build/sign
: replace some tasks to installing from the source:vagrant up
vagrant ssh -c 'cd /vagrant; ./krux generate-keypair'
vagrant ssh -c 'cd /vagrant; ./krux pem-to-pubkey pubkey.pem'
src/krux/metada.py
filemake build/maixpy_m5stickV
: replacevagrant ssh -c 'cd /vagrant; ./krux build maixpy_m5stickv'
make build/maixpy_amigo_ips
: replacevagrant ssh -c 'cd /vagrant; ./krux build maixpy_amigo_ips'
make simulator
: run and logs simulation processTo see all options, type
make help
I also prupose a change on
simulator/run-all-sequences.sh
, with the characteristic of reducing the console output and allowing the writing of log files during simulation.The text was updated successfully, but these errors were encountered: