Skip to content

Commit

Permalink
first complete version
Browse files Browse the repository at this point in the history
  • Loading branch information
griembauer committed Oct 31, 2023
0 parents commit 4320454
Show file tree
Hide file tree
Showing 17 changed files with 2,060 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[flake8]

# E402 module level import not at top of file
# E501 line too long (83 > 79 characters)
# F821 undefined name '_'

exclude = .git

max-line-length = 80
7 changes: 7 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Python Flake8, black and pylint code quality check

on: [push, pull_request]

jobs:
lint:
uses: mundialis/github-workflows/.github/workflows/linting.yml@main
39 changes: 39 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# For documentation about this config, see
# https://pylint.readthedocs.io/en/stable/user_guide/configuration/all-options.html (as of writing, version 2.17.4)

[MAIN]

jobs=0 # Default: 1

load-plugins=
pylint.extensions.broad_try_clause

recursive=yes # Default: False

# reports=yes # Default: False

# score=no # Default: True

# To disable more rules, see output of pylint. E.g.
# [...] C0301: Line too long (89/80) (line-too-long)
# can be surpressed with either disable=line-too-long or disable=C
# It is also possible to ignore a specific line by adding
# # pylint: disable=broad-exception-caught
# above the line causing the lint error
disable=
W, ; all Warnings are allowed to fail
import-error, ; To surpress e.g "Unable to import 'grass.script"
missing-module-docstring, ; we use the GRASS GIS header
R, ; refactoring + design recommendations


[BROAD_TRY_CLAUSE]
max-try-statements=4 # Default: 1

[FORMAT]
max-line-length=80 # Default: 100
max-module-lines=800 # Default: 1000
ignore-long-lines=.*COPYRIGHT:.* |# . description:.*|\s*(# )?.*http.:\/\/\S+?|# %%*

[VARIABLES]
additional-builtins=_ # Default: ()
50 changes: 50 additions & 0 deletions .pylintrc_allowed_to_fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# For documentation about this config, see
# https://pylint.readthedocs.io/en/stable/user_guide/configuration/all-options.html (as of writing, version 2.17.4)

[MAIN]

exit-zero=yes

jobs=0 # Default: 1

load-plugins=
pylint.extensions.broad_try_clause

recursive=yes # Default: False

# score=no # Default: True


[BROAD_TRY_CLAUSE]
max-try-statements=4 # Default: 1

[FORMAT]
max-line-length=80 # Default: 100
max-module-lines=800 # Default: 1000
ignore-long-lines=.*COPYRIGHT:.* |# . description:.*|\s*(# )?.*http.:\/\/\S+?|# %%*

[VARIABLES]
additional-builtins=_ # Default: ()


; [DESIGN]

; # Maximum number of arguments for function / method.
; # Default: 5
; max-args=9

; # Maximum number of attributes for a class (see R0902).
; # Default: 7
; max-attributes=11

; # Maximum number of branch for function / method body.
; # Default: 12
; max-branches=15

; # Maximum number of locals for function / method body.
; # Default: 15
; max-locals=19

; # Maximum number of return / yield for function / method body.
; # Default: 6
; max-returns=11
Loading

0 comments on commit 4320454

Please sign in to comment.