sparckles / Robyn

Robyn is a Super Fast Async Python Web Framework with a Rust runtime.
https://robyn.tech/
BSD 2-Clause "Simplified" License
4.28k stars 221 forks source link

suggestion: MAKEFILE #839

Closed VishnuSanal closed 3 months ago

VishnuSanal commented 3 months ago

how about having a MAKEFILE? for tasks like install, build, clean, etc.

sansyrox commented 3 months ago

Hey @VishnuSanal ๐Ÿ‘‹

I am not a big fan of makefiles as I don't use them myself in development. Instead of that, I use precommit-ci(https://pre-commit.ci/) , which pushes changes automatically to the PR. Reducing my time to first commit.

sansyrox commented 3 months ago

Closing this. Feel free to reopen if you have any more questions or suggestions regarding the same ๐Ÿ˜„

VishnuSanal commented 3 months ago

I am not a big fan of makefiles as I don't use them myself in development. Instead of that, I use precommit-ci(https://pre-commit.ci/) , which pushes changes automatically to the PR. Reducing my time to first commit.

@sansyrox I didn't quite get you. I am takling about maing it easier for devs to do simple tasks like build, test, clean, run etc. can this be done with pre-commit? enlighten me! :)

dist: server.py client.py
    pyinstaller --clean -y --onefile --add-data="secret-key.json:." --add-data="add_new_icon.png:." --add-data="logo.png:." --add-data="delete_icon.png:." server.py
    pyinstaller --clean -y --onefile --add-data="secret-key.json:." --add-data="logo.png:." client.py

run: client.py server.py
    python3 client.py & disown
    python3 server.py & disown

execute: dist/client dist/server
    ./dist/client & disown
    ./dist/server & disown

clean:
    rm -f *.spec
    rm -rf build/
    rm -rf dist/

this is a makefile from one of my projects, just wrote it for convenience so that I don't have to remember/type in the commands everytime. ๐Ÿ™ˆ

sansyrox commented 3 months ago

can this be done with pre-commit? enlighten me! :)

I rely on pre commit for all the formatting related issues. I donโ€™t do builds. They are done via the ci. Testing is just standard pytest. And developing is just maturin develop . The reason I donโ€™t like make files is because I dislike the syntax and prefer not to use them unless I absolutely have to. E.g. what does phony mean? What to do when I want to execute something outside the project dir and so on.

We have certain responsibility specific scripts in the scripts folder. Maybe you could have a look there?