Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
Reorganization to ensure PyCQA Standards
Browse files Browse the repository at this point in the history
  • Loading branch information
zodiacfireworks committed Apr 13, 2020
1 parent 08ef552 commit 33a461e
Show file tree
Hide file tree
Showing 96 changed files with 3,439 additions and 1,330 deletions.
1 change: 1 addition & 0 deletions .bandit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
skips: ['B101']
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[run]
branch = True
omit =
*/.tox/*
*/.local/*
*/.cache/*
*/tests/*
2 changes: 1 addition & 1 deletion .env-example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DATABASE_URL=postgresql://postgres:12345@localhost:5432/epidemiologic
[email protected]
MAIL_PASSWORD=ingreseunovalido
HOST_URL=http://localhost:3000/
HOST_URL=http://localhost:3000/
34 changes: 29 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
venv/
.idea/
__pycache__/
*.db
.env
.*
!.bandit
!.coveragerc
!.gitignore
!.isort.cfg
!.pre-commit-config.yaml
!.pylintrc*
!.python-version
!.remarkrc
!.travis.yml
!.tox.ini
*.py[cod]
*.ipynb*
*.egg*
*.env
*.sqlite3
*.pid
__pycache__
autogenerated/*
build
coverage.*
dist
frontend
legacy
old.*
public
public/*

# File patterns
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
known_third_party = bcrypt,dotenv,flask,flask_cors,flask_injector,flask_jwt_extended,flask_mail,flask_restful,flask_sqlalchemy,injector,jwt,numpy,scipy,sqlalchemy
57 changes: 57 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
repos:
- repo: https://github.com/ambv/black
rev: 19.10b0
hooks:
- id: black
language_version: python3.8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.761"
hooks:
- id: mypy
language: system

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: flake8

- repo: https://github.com/asottile/seed-isort-config
rev: v1.9.2
hooks:
- id: seed-isort-config

- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- id: isort
args: [--filter-files]

- repo: https://github.com/pycqa/pydocstyle
rev: 4.0.0
hooks:
- id: pydocstyle
files: ^epical/

- repo: https://github.com/kynan/nbstripout
rev: master
hooks:
- id: nbstripout
files: ".ipynb"

- repo: https://github.com/PyCQA/bandit
rev: 1.6.2
hooks:
- id: bandit
args: [-c, .bandit, -r, epical]

- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
args: [--rcfile, .pylintrc.local]
33 changes: 33 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[MASTER]
load-plugins=pylint.extensions.docparams,pylint.extensions.docstyle,pylint.extensions.bad_builtin,pylint.extensions.mccabe,pylint_flask
persistent=yes
profile=no
cache-size=500
ignore=migrations

[MESSAGES CONTROL]
disable=C0103,C0111,C0199,C301,C0303,C0412,C1001,E1004,I0011,R0903,W0232,W0621,W0223,C0301,W0511,F0401,E231
# disable=C0111,I0011,I0012,W0704,W0142,W0212,W0232,W0613,W0702,R0201,R0903,C1001,C0103,R0901

[DESIGN]
max-parents=5
max-complexity=5

[SIMILARITIES]
min-similarity-lines=8
ignore-imports=yes
ignore-comments=yes
ignore-docstrings=yes

[TYPECHECK]
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed.
generated-members=objects,DoesNotExist,id,pk,_meta,base_fields,context
# List of method names used to declare (i.e. assign) instance attributes
defining-attr-methods=__init__,__new__

[MISCELLANEOUS]
notes=FIXME,TODO
34 changes: 34 additions & 0 deletions .pylintrc.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[MASTER]
load-plugins=pylint.extensions.docparams,pylint.extensions.docstyle,pylint.extensions.bad_builtin,pylint.extensions.mccabe,pylint_flask
persistent=yes
profile=no
cache-size=500
ignore=migrations

[MESSAGES CONTROL]
disable=C0103, C0111, C0330, C0412, C1001, E1004, E1101, I0011, R0903, W0232, W0621
# disable=C0103,C0111,C0199,C301,C0303,C0412,C1001,E1004,I0011,R0903,W0232,W0621,W0223,C0301,W0511,F0401,E231
# disable=C0111,I0011,I0012,W0704,W0142,W0212,W0232,W0613,W0702,R0201,R0903,C1001,C0103,R0901

[DESIGN]
max-parents=5
max-complexity=5

[SIMILARITIES]
min-similarity-lines=8
ignore-imports=yes
ignore-comments=yes
ignore-docstrings=yes

[TYPECHECK]
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E0201 when accessed.
generated-members=objects,DoesNotExist,id,pk,_meta,base_fields,context
# List of method names used to declare (i.e. assign) instance attributes
defining-attr-methods=__init__,__new__

[MISCELLANEOUS]
notes=FIXME,TODO
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8.1
6 changes: 6 additions & 0 deletions .remarkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"plugins": [
"remark-preset-lint-recommended",
["remark-lint-list-item-indent", false]
]
}
1 change: 0 additions & 1 deletion Procfile

This file was deleted.

142 changes: 0 additions & 142 deletions api/resources/covid_epidemiology.py

This file was deleted.

15 changes: 0 additions & 15 deletions api/resources/department.py

This file was deleted.

Loading

0 comments on commit 33a461e

Please sign in to comment.