Skip to content

Commit

Permalink
Add pyright/pytest config
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsolo1 committed Sep 26, 2023
1 parent ab01ef3 commit d5c6e07
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/data-pipeline-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ jobs:
run: black --check data-pipeline/src/data_pipeline
- name: Run Ruff
run: ruff data-pipeline/src/data_pipeline
- name: Run Pyright
run: pyright
15 changes: 15 additions & 0 deletions data-pipeline/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

echo "┏━━━ Running pyright ━━━━━━━━━━━━━━━━━━━"
pyright

echo "┏━━━ Running black ━━━━━━━━━━━━━━━━━━━"
black src/data_pipeline
black tests

echo "┏━━━ Running ruff ━━━━━━━━━━━━━━━━━━━"
ruff src/data_pipeline
ruff tests --fix

echo "┏━━━ Running pytest ━━━━━━━━━━━━━━━━━━━"
pytest -m only
53 changes: 52 additions & 1 deletion data-pipeline/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions data-pipeline/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pytest = "^7.4.2"
ipython = "^8.15.0"
ruff = "^0.0.290"
black = "^23.9.1"
pyright = "^1.1.327"

[build-system]
requires = ["poetry-core"]
Expand All @@ -30,3 +31,19 @@ line-length = 120
[tool.ruff]
line-length = 120

[tool.pyright]
include = [
"src/data_pipeline/pipeline.py",
"src/data_pipeline/config.py",
"src/data_pipeline/helpers/write_schemas.py",
"src/data_pipeline/helpers/logging.py",
"src/data_pipeline/pipelines/gnomad_v4_variants.py",
"src/data_pipeline/pipelines/gnomad_v4_coverage.py",
# "src/data_pipeline/datasets/gnomad_v4",
"tests"
]
reportMissingImports = true
reportMissingTypeStubs = false
typeCheckingMode = "basic"
pythonVersion = "3.9"

8 changes: 8 additions & 0 deletions data-pipeline/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[pytest]
testpaths =
tests
addopts = --strict -W ignore -v -s --durations=0
markers =
only: marked with "only"
long: takes a long time
broken: test is broken
9 changes: 9 additions & 0 deletions data-pipeline/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,9 @@ mypy-extensions==1.0.0 ; python_version >= "3.9" and python_version < "4.0" \
nest-asyncio==1.5.8 ; python_version >= "3.9" and python_version < "4.0" \
--hash=sha256:25aa2ca0d2a5b5531956b9e273b45cf664cae2b145101d73b86b199978d48fdb \
--hash=sha256:accda7a339a70599cb08f9dd09a67e0c2ef8d8d6f4c07f96ab203f2ae254e48d
nodeenv==1.8.0 ; python_version >= "3.9" and python_version < "4.0" \
--hash=sha256:d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2 \
--hash=sha256:df865724bb3c3adc86b3876fa209771517b0cfe596beff01a92700e0e8be4cec
numpy==1.25.2 ; python_version >= "3.9" and python_version < "4.0" \
--hash=sha256:0d60fbae8e0019865fc4784745814cff1c421df5afee233db6d88ab4f14655a2 \
--hash=sha256:1a1329e26f46230bf77b02cc19e900db9b52f398d6722ca853349a782d4cff55 \
Expand Down Expand Up @@ -1113,6 +1116,9 @@ pygments==2.16.1 ; python_version >= "3.9" and python_version < "4.0" \
pyjwt[crypto]==2.8.0 ; python_version >= "3.9" and python_version < "4.0" \
--hash=sha256:57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de \
--hash=sha256:59127c392cc44c2da5bb3192169a91f429924e17aff6534d70fdc02ab3e04320
pyright==1.1.327 ; python_version >= "3.9" and python_version < "4.0" \
--hash=sha256:3462cda239e9140276238bbdbd0b59d77406f1c2e14d8cb8c20c8e25639c6b3c \
--hash=sha256:ba74148ad64f22020dbbed6781c4bdb38ecb8a7ca90dc3c87a4f08d1c0e11592
pyspark==3.3.3 ; python_version >= "3.9" and python_version < "4.0" \
--hash=sha256:384d2ad7090cd1db5b2d2ac497bda409d86ab3a27272833e1a27efadf45e4d2f
pytest==7.4.2 ; python_version >= "3.9" and python_version < "4.0" \
Expand Down Expand Up @@ -1337,6 +1343,9 @@ scipy==1.9.3 ; python_version >= "3.9" and python_version < "4.0" \
--hash=sha256:d644a64e174c16cb4b2e41dfea6af722053e83d066da7343f333a54dae9bc31c \
--hash=sha256:da8245491d73ed0a994ed9c2e380fd058ce2fa8a18da204681f2fe1f57f98f95 \
--hash=sha256:fbc5c05c85c1a02be77b1ff591087c83bc44579c6d2bd9fb798bb64ea5e1a027
setuptools==68.2.2 ; python_version >= "3.9" and python_version < "4.0" \
--hash=sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87 \
--hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a
six==1.16.0 ; python_version >= "3.9" and python_version < "4.0" \
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
Expand Down

0 comments on commit d5c6e07

Please sign in to comment.