Browse Source

Adding mypy validations and validating codestyle in tests

merge-requests/1/head
Drew Short 6 years ago
parent
commit
21e5daacbd
  1. 1
      .gitignore
  2. 3
      .gitlab-ci.yml
  3. 1
      server/Pipfile
  4. 38
      server/Pipfile.lock
  5. 11
      server/mypy.ini

1
.gitignore

@ -4,3 +4,4 @@ instance/
*__pycache__/
.pytest_cache/
.coverage
.mypy_cache/

3
.gitlab-ci.yml

@ -11,7 +11,8 @@ Atheneum:Tests:
- python3 -m pipenv --version
- cd server
- pipenv install --dev --system
- pycodestyle atheneum
- pycodestyle atheneum tests
- mypy atheneum tests
- PYTHONPATH=$(pwd) coverage run --source atheneum -m pytest
- coverage report --fail-under=85 -m --skip-covered
tags:

1
server/Pipfile

@ -16,6 +16,7 @@ python-dotenv = "*"
pytest = "*"
coverage = "*"
pycodestyle = "*"
mypy = "*"
[requires]
python_version = "3.6"

38
server/Pipfile.lock

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "8dc4936a622c6a8fabd4d2e72934197cbaba024233501077b11d465d402741f4"
"sha256": "5286b9a3df03bd77ad7efe758fb498cad5e666806a24092c906cc3e2c8b77779"
},
"pipfile-spec": 6,
"requires": {
@ -266,6 +266,14 @@
],
"version": "==4.2.0"
},
"mypy": {
"hashes": [
"sha256:1b899802a89b67bb68f30d788bba49b61b1f28779436f06b75c03495f9d6ea5c",
"sha256:f472645347430282d62d1f97d12ccb8741f19f1572b7cf30b58280e4e0818739"
],
"index": "pypi",
"version": "==0.610"
},
"pluggy": {
"hashes": [
"sha256:7f8ae7f5bdf75671a718d2daf0a64b7885f74510bcd98b1a0bb420eb9a9d0cff",
@ -312,6 +320,34 @@
"sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"
],
"version": "==1.11.0"
},
"typed-ast": {
"hashes": [
"sha256:0948004fa228ae071054f5208840a1e88747a357ec1101c17217bfe99b299d58",
"sha256:10703d3cec8dcd9eef5a630a04056bbc898abc19bac5691612acba7d1325b66d",
"sha256:1f6c4bd0bdc0f14246fd41262df7dfc018d65bb05f6e16390b7ea26ca454a291",
"sha256:25d8feefe27eb0303b73545416b13d108c6067b846b543738a25ff304824ed9a",
"sha256:29464a177d56e4e055b5f7b629935af7f49c196be47528cc94e0a7bf83fbc2b9",
"sha256:2e214b72168ea0275efd6c884b114ab42e316de3ffa125b267e732ed2abda892",
"sha256:3e0d5e48e3a23e9a4d1a9f698e32a542a4a288c871d33ed8df1b092a40f3a0f9",
"sha256:519425deca5c2b2bdac49f77b2c5625781abbaf9a809d727d3a5596b30bb4ded",
"sha256:57fe287f0cdd9ceaf69e7b71a2e94a24b5d268b35df251a88fef5cc241bf73aa",
"sha256:668d0cec391d9aed1c6a388b0d5b97cd22e6073eaa5fbaa6d2946603b4871efe",
"sha256:68ba70684990f59497680ff90d18e756a47bf4863c604098f10de9716b2c0bdd",
"sha256:6de012d2b166fe7a4cdf505eee3aaa12192f7ba365beeefaca4ec10e31241a85",
"sha256:79b91ebe5a28d349b6d0d323023350133e927b4de5b651a8aa2db69c761420c6",
"sha256:8550177fa5d4c1f09b5e5f524411c44633c80ec69b24e0e98906dd761941ca46",
"sha256:898f818399cafcdb93cbbe15fc83a33d05f18e29fb498ddc09b0214cdfc7cd51",
"sha256:94b091dc0f19291adcb279a108f5d38de2430411068b219f41b343c03b28fb1f",
"sha256:a26863198902cda15ab4503991e8cf1ca874219e0118cbf07c126bce7c4db129",
"sha256:a8034021801bc0440f2e027c354b4eafd95891b573e12ff0418dec385c76785c",
"sha256:bc978ac17468fe868ee589c795d06777f75496b1ed576d308002c8a5756fb9ea",
"sha256:c05b41bc1deade9f90ddc5d988fe506208019ebba9f2578c622516fd201f5863",
"sha256:c9b060bd1e5a26ab6e8267fd46fc9e02b54eb15fffb16d112d4c7b1c12987559",
"sha256:edb04bdd45bfd76c8292c4d9654568efaedf76fe78eb246dde69bdb13b2dad87",
"sha256:f19f2a4f547505fe9072e15f6f4ae714af51b5a681a97f187971f50c283193b6"
],
"version": "==1.1.0"
}
}
}

11
server/mypy.ini

@ -0,0 +1,11 @@
[mypy]
ignore_missing_imports = True
follow_imports = skip
disallow_untyped_calls = True
disallow_untyped_defs = True
check_untyped_defs = True
disallow_subclassing_any = False
warn_redundant_casts = True
warn_unused_ignores = True
strict_optional = True
strict_boolean = False
Loading…
Cancel
Save