gsohler / openscad

OpenSCAD - The Programmers Solid 3D CAD Modeller
https://www.openscad.org
Other
14 stars 6 forks source link

Add python linting #8

Closed Matthieu-LAURENT39 closed 11 months ago

Matthieu-LAURENT39 commented 11 months ago

This PR aims to add support for linting python files using QsciLexerPython This is still WIP as i can't get the colors to work properly, some help would be nice

Matthieu-LAURENT39 commented 11 months ago

My issue is that i have no idea why the background color where there is no text is black

Matthieu-LAURENT39 commented 11 months ago

ok, now it should be all good, everything seems to work fine

@gsohler i'd appreciate if you could take a quick look (not at the code, but at how it looks) so you can give some feedback

gsohler commented 11 months ago

Hi Matthieu! I am absolutely excited to realize that there are more people which like to see OpenSCAD to understand Python and to integrate it very well. The Vision to have keyword highlighting and other opticial effects not only to SCAD language is fantastic. However, with better integration also the required Changes and number of changed files increase and need to get reviewed by the main OpenSCAD developer team and there are many others tasks in parallel taking their time, In the past PR related to python could merge maybe every 3 month only , so I start to consider adding yet another PR with fewer changes . Right now I thinking , whether increased demand, increased usability or rather a smaller change set will "enable" python finally in OpenSCAD :)

BTW I really like the += and -= operators now, see

https://cults3d.com/en/3d-model/game/spare-wheel-for-lego-motorcycle

gsohler commented 11 months ago

matthieu i just cloned your repository now and i experienced some general cmake compilation issues. will need to look into that later ..

Matthieu-LAURENT39 commented 11 months ago

yeah i got some cmake issues too, i could fix it by using the command cmake -DEXPERIMENTAL=1 -DENABLE_PYTHON=1 -DCRYPTOPP_INCLUDE_DIRS=/usr/include/cryptopp/ -DCRYPTOPP_LIBRARIES=/usr/lib/libcryptopp.so .. personally

However, with better integration also the required Changes and number of changed files increase and need to get reviewed

Should i change the destination branch to the python one then?

gsohler commented 11 months ago

yes, this cryptopp stuff is not absolutely nice yet: issue is, that the packet is called 'crypto++' on some systems and I was not able to find the "common" solution yet. Still this cryptopp is needed to "sign" code, which users trusted to. Maybe you want to send me short email to my public documented address? My cmake issues have resolved by applying the hierarchical option to git submodule. BTW I got ctest pass rate for my python branch dramatically improved, still I believe, that this would be a very quiet branch

Matthieu-LAURENT39 commented 11 months ago

An email containing what exactly?

BTW I got ctest pass rate for my python branch dramatically improved, still I believe, that this would be a very quiet branch

Nice! So i should change the PR to the python branch then?

gsohler commented 11 months ago

Matthieu, I looked into the colored python code and it looks great! Not sure if it makes sense to PR to my python branch, I am the only one looking into that ;) The OpenSCAD Main repository has quite some python stuff inside yet(it even has the python_active flag!) . Its just not yet visible to the user. I did enjoy very much playing the role on the "approver" side, but I feel you should PR to the main branch instead so your valuable work becomes more visible to the Developper team!

gsohler commented 11 months ago

In any case, thank you for your valuable contribution. I added you as a collaborator to my repo so its easier to you if you have more ideas.