FEM Python coding standard

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: FEM Python coding standard

Post by bernd »

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

Re: FEM Python coding standard

Post by bernd »

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
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: FEM Python coding standard

Post by Kunda1 »

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. ;)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: FEM Python coding standard

Post by Kunda1 »

Code: Select all

codespell -q 2 -S *.ts,./coding_conventions.md  -L alle,childs,dof,dum,ist,methode,nd,normaly,uint,vertexes
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM Python coding standard

Post by bernd »

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
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM Python coding standard

Post by bernd »

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
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: FEM Python coding standard

Post by Kunda1 »

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 ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
kkremitzki
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: FEM Python coding standard

Post by kkremitzki »

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: 621
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by ebrahim raeyat »

@bernd, when i type codespell -L:

Code: Select all

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

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by ebrahim raeyat »

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