From 4cec1bb37e9e085a34cae56bc6fc77982dfed182 Mon Sep 17 00:00:00 2001 From: Shaun Verch Date: Thu, 13 Jan 2022 13:17:30 -0500 Subject: [PATCH] Install and run pandas-vet (#1119) * Install and run pandas-vet This doesn't fix the errors, but it can give us a starting point for the discussion of which of these errors we care about. * Ignore the errors for now * Ignore eeoc.gov in link checker Sometimes it seems down from the perspective of github actions. --- data/data-pipeline/.flake8 | 11 +++++++++-- data/data-pipeline/poetry.lock | 18 +++++++++++++++++- data/data-pipeline/pyproject.toml | 1 + 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/data/data-pipeline/.flake8 b/data/data-pipeline/.flake8 index b88df142..f217b57d 100644 --- a/data/data-pipeline/.flake8 +++ b/data/data-pipeline/.flake8 @@ -1,7 +1,14 @@ [flake8] ignore = E266, # to many leading '#' for block comment - W503 # line break before binary operator + W503, # line break before binary operator + # TODO: Uncomment and fix the issues here that we care about, see + # https://github.com/usds/justice40-tool/issues/1123 + PD002, + PD003, + PD004, + PD010, + PD901 max-line-length = 150 max-complexity = 18 -select = B,C,E,F,W,T4,B9 +select = B,C,E,F,W,T4,B9,PD diff --git a/data/data-pipeline/poetry.lock b/data/data-pipeline/poetry.lock index 5b5f0988..690b7932 100644 --- a/data/data-pipeline/poetry.lock +++ b/data/data-pipeline/poetry.lock @@ -1050,6 +1050,18 @@ pytz = ">=2017.3" [package.extras] test = ["hypothesis (>=3.58)", "pytest (>=6.0)", "pytest-xdist"] +[[package]] +name = "pandas-vet" +version = "0.2.2" +description = "A flake8 plugin to lint pandas in an opinionated way" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +attrs = "*" +flake8 = ">3.0.0" + [[package]] name = "pandocfilters" version = "1.5.0" @@ -1700,7 +1712,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.7.1" -content-hash = "f832db8cb99fd9f868d6e03c7536b7679bfdc0228693ba796ae2a4028b641a28" +content-hash = "208cadba99466a38822740b0b78e5be94c4bf728eb79eda4c40cfd0d22901907" [metadata.files] appnope = [ @@ -2365,6 +2377,10 @@ pandas = [ {file = "pandas-1.3.4-cp39-cp39-win_amd64.whl", hash = "sha256:a51528192755f7429c5bcc9e80832c517340317c861318fea9cea081b57c9afd"}, {file = "pandas-1.3.4.tar.gz", hash = "sha256:a2aa18d3f0b7d538e21932f637fbfe8518d085238b429e4790a35e1e44a96ffc"}, ] +pandas-vet = [ + {file = "pandas-vet-0.2.2.tar.gz", hash = "sha256:0a316c3edaaa1bcd772bfaea0e8d2b2aa409b740198746a2b60f2007b313f42e"}, + {file = "pandas_vet-0.2.2-py3-none-any.whl", hash = "sha256:961235064ebe5b38ca9c3f45961fdce61796a01aea1f07b06b67f6b359aabea2"}, +] pandocfilters = [ {file = "pandocfilters-1.5.0-py2.py3-none-any.whl", hash = "sha256:33aae3f25fd1a026079f5d27bdd52496f0e0803b3469282162bafdcbdf6ef14f"}, {file = "pandocfilters-1.5.0.tar.gz", hash = "sha256:0b679503337d233b4339a817bfc8c50064e2eff681314376a47cb582305a7a38"}, diff --git a/data/data-pipeline/pyproject.toml b/data/data-pipeline/pyproject.toml index 490ab806..fcb538b5 100644 --- a/data/data-pipeline/pyproject.toml +++ b/data/data-pipeline/pyproject.toml @@ -37,6 +37,7 @@ safety = "^1.10.3" tox = "^3.24.0" pytest-mock = "^3.6.1" tox-poetry = "^0.4.1" +pandas-vet = "^0.2.2" [build-system] build-backend = "poetry.core.masonry.api"