FEM Python coding standard

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Posts: 10956
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM Python coding standard

Post by bernd » Wed Sep 11, 2019 5:09 am

would be cool to have all this in the wiki, including the latest list of the exclude words.
User avatar
bernd
Posts: 10956
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM Python coding standard

Post by bernd » Wed Sep 11, 2019 5:10 am

Since I only check in FEM I could create my own exclude word list?! Would you help here? We could minimize this list!
User avatar
Kunda1
Posts: 8710
Joined: Thu Jan 05, 2017 9:03 pm

Re: FEM Python coding standard

Post by Kunda1 » Thu Sep 12, 2019 3:27 pm

bernd wrote:
Wed Sep 11, 2019 5:10 am
Since I only check in FEM I could create my own exclude word list?! Would you help here? We could minimize this list!
https://www.freecadweb.org/wiki/Codespell

Sure I can create a FEM specific list for you. ;)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 8710
Joined: Thu Jan 05, 2017 9:03 pm

Re: FEM Python coding standard

Post by Kunda1 » Thu Sep 12, 2019 3:34 pm

Code: Select all

codespell -q 2 -S *.ts,./coding_conventions.md  -L alle,childs,dof,dum,ist,methode,nd,normaly,uint,vertexes
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
bernd
Posts: 10956
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM Python coding standard

Post by bernd » Thu Sep 12, 2019 4:13 pm

git commit daefc7f

Code: Select all

$ codespell -q 2 -S *.ts  -L alle,childs,dof,dum,ist,methode,nd,normaly,uint,vertexes  src/Mod/Fem/
src/Mod/Fem/App/FemMesh.cpp:1138: Elemente  ==> Element, elements
src/Mod/Fem/App/FemMesh.cpp:1954: Elemente  ==> Element, elements
src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp:93: freez  ==> frees, freeze
src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp:325: freez  ==> frees, freeze
src/Mod/Fem/Gui/TaskFemConstraintDisplacement.h:86: freez  ==> frees, freeze
src/Mod/Fem/femsolver/writerbase.py:111: elemente  ==> element, elements
src/Mod/Fem/femsolver/calculix/solver.py:105: noe  ==> not, no, node, know, now
src/Mod/Fem/femsolver/calculix/solver.py:106: noe  ==> not, no, node, know, now
src/Mod/Fem/femsolver/z88/writer.py:127: elemente  ==> element, elements
src/Mod/Fem/femsolver/z88/writer.py:382: Programm  ==> Program
src/Mod/Fem/femobjects/_FemSolverCalculix.py:96: noe  ==> not, no, node, know, now
src/Mod/Fem/femobjects/_FemSolverCalculix.py:97: noe  ==> not, no, node, know, now
$ 
User avatar
bernd
Posts: 10956
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: FEM Python coding standard

Post by bernd » Thu Sep 12, 2019 7:09 pm

git commit 5e939be and git commit 866010f

but one strange happens ...

Code: Select all

codespell -q 2 -S *.ts  -L childs,dof,dum,methode,nd,normaly,uint,vertexes,freez,Programm  src/Mod/Fem/
although I add Programm it finds Programm as error

Code: Select all

$
$ codespell -q 2 -S *.ts  -L childs,dof,dum,methode,nd,normaly,uint,vertexes,freez,Programm  src/Mod/Fem/
src/Mod/Fem/femsolver/z88/writer.py:382: Programm  ==> Program
$ 
User avatar
Kunda1
Posts: 8710
Joined: Thu Jan 05, 2017 9:03 pm

Re: FEM Python coding standard

Post by Kunda1 » Thu Sep 12, 2019 8:59 pm

bernd wrote:
Thu Sep 12, 2019 7:09 pm
although I add Programm it finds Programm as error

Code: Select all

  -L WORDS, --ignore-words-list WORDS
                        Comma separated list of words to be ignored by
                        codespell. Words are case sensitive based on how they
                        are written in the dictionary file
most of the words in the dictionary file are lowercase. So just change it to 'programm' and you'll be fine

Edit: is programm the correct way to write it in Deutsche ?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
kkremitzki
Posts: 2167
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: FEM Python coding standard

Post by kkremitzki » Thu Sep 12, 2019 9:16 pm

Yes, it's Programm with a capital P, auf Deutsch. It's one of the most common ways for a native-German-speaking person to give away that fact when they use English, along with accidentally switching "ist" for "is".
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
ebrahim raeyat
Posts: 354
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by ebrahim raeyat » Wed Mar 25, 2020 10:08 pm

@bernd, when i type codespell -L:

Code: Select all

codespell: error: no such option: -L
User avatar
ebrahim raeyat
Posts: 354
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by ebrahim raeyat » Wed Mar 25, 2020 11:07 pm

for flake8 linter, i applied it on sublimtext IDE.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest