FEM Python coding standard

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
Kunda1
Posts: 8710
Joined: Thu Jan 05, 2017 9:03 pm

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by Kunda1 » Wed Mar 25, 2020 11:10 pm

ebrahim raeyat wrote:
Wed Mar 25, 2020 10:08 pm
@bernd, when i type codespell -L:

Code: Select all

codespell: error: no such option: -L

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

From codespell --help
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
ebrahim raeyat
Posts: 354
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: FEM Python coding standard

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

Kunda1 wrote:
Thu Sep 12, 2019 8:59 pm

Code: Select all

  -L WORDS, --ignore-words-list WORDS

when i type this command with -L flag, it takes me this error:

Code: Select all

Usage: 
	codespell [OPTIONS] [file1 file2 ... fileN]


codespell: error: no such option: -L
codespell version 1.8
User avatar
Kunda1
Posts: 8710
Joined: Thu Jan 05, 2017 9:03 pm

Re: FEM Python coding standard

Post by Kunda1 » Wed Mar 25, 2020 11:21 pm

ebrahim raeyat wrote:
Wed Mar 25, 2020 11:15 pm
codespell version 1.8

Code: Select all

$ codespell --version
1.17.0.dev0
Check out https://github.com/codespell-project/codespell#updating
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
ebrahim raeyat
Posts: 354
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: FEM Python coding standard

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

Kunda1 wrote:
Wed Mar 25, 2020 11:21 pm
ebrahim raeyat wrote:
Wed Mar 25, 2020 11:15 pm
codespell version 1.8

Code: Select all

$ codespell --version
1.17.0.dev0
Check out https://github.com/codespell-project/codespell#updating
thanks, it works.
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 » Thu Mar 26, 2020 8:36 am

bernd wrote:
Thu Mar 26, 2020 5:34 am
double posted! Is solved here https://forum.freecadweb.org/viewtopic. ... 70#p380760
yes, i prefer to solve this in related topic. if you can please move those to related topic. thanks.
User avatar
vanuan
Posts: 465
Joined: Wed Oct 24, 2018 9:49 pm

Re: FEM Python coding standard

Post by vanuan » Fri Aug 28, 2020 1:31 pm

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 » Fri Aug 28, 2020 2:22 pm

are they conform with FEM conding standards? See https://github.com/FreeCAD/FreeCAD/blob ... entions.md
User avatar
vanuan
Posts: 465
Joined: Wed Oct 24, 2018 9:49 pm

Re: FEM Python coding standard

Post by vanuan » Fri Aug 28, 2020 3:22 pm

bernd wrote:
Fri Aug 28, 2020 2:22 pm
are they conform with FEM conding standards? See https://github.com/FreeCAD/FreeCAD/blob ... entions.md
Have you read the proposal? It mainly focuses on a method to enforce those. But yeah, the first rules I propose to enable are the snake_case naming and the import grouping which are included in the document you referenced.

Does FEM already use flake8?
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 » Fri Aug 28, 2020 4:04 pm

vanuan wrote:
Fri Aug 28, 2020 3:22 pm
bernd wrote:
Fri Aug 28, 2020 2:22 pm
are they conform with FEM conding standards? See https://github.com/FreeCAD/FreeCAD/blob ... entions.md
Have you read the proposal? It mainly focuses on a method to enforce those. But yeah, the first rules I propose to enable are the snake_case naming and the import grouping which are included in the document you referenced.

Does FEM already use flake8?
the document I referenced only has coding standards which are fulfilled by FEM python code already. I only add new coding standard if at least the most code of FEM does use the coding standard. Thus there is only rare coding standard for FEM C++ code, since I do not do that much c++ code and thus I do not change the coding standard.
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 » Fri Aug 28, 2020 4:06 pm

AFAIK FEM and Draft uses flake8. Only difference is the indent. Draft uses other indent style as FEM.

vocx might give some more information in this regard.

vocx wrote: :bell:
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests