Skip to content

Commit da9a103

Browse files
committed
Add type-checking to CI
`poetry.lock` was updated with `poetry lock --no-update`. `types-pytz` may need to be a runtime dependency. No effects were observed on Make-managed files. Disclaimer: Participation by NIST in the creation of the documentation of mentioned software is not intended to imply a recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended to imply that any specific software is necessarily the best available for the purpose. Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent 7a983e0 commit da9a103

File tree

4 files changed

+100
-3
lines changed

4 files changed

+100
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
- name: Pre-commit Checks
3131
run: pre-commit run --all-files
3232

33+
- name: Type Checking
34+
run: poetry run mypy case_mapping example.py tests
35+
3336
- name: Unit Tests
3437
run: poetry run pytest
3538

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ all: \
3434
.venv-pre-commit/var/.pre-commit-built.log \
3535
case.jsonld
3636

37+
.PHONY: \
38+
check-mypy
39+
3740
# This virtual environment is meant to be built once and then persist, even through 'make clean'.
3841
# If a recipe is written to remove this flag file, it should first run `pre-commit uninstall`.
3942
.venv-pre-commit/var/.pre-commit-built.log:
@@ -82,6 +85,15 @@ case.jsonld: \
8285
mv _$@ $@
8386

8487
check: \
85-
all
88+
all \
89+
check-mypy
8690
source venv/bin/activate \
8791
&& poetry run pytest
92+
93+
check-mypy: \
94+
.venv.done.log
95+
source venv/bin/activate \
96+
&& mypy \
97+
case_mapping \
98+
example.py \
99+
tests

poetry.lock

Lines changed: 82 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ python = "^3.9"
2323
pytz = "^2023.3.post1"
2424

2525
[tool.poetry.dev-dependencies]
26+
mypy = "^1"
2627
pytest = "^7.4.2"
28+
types-pytz = "^2024"
2729

2830
[build-system]
2931
requires = ["poetry-core"]

0 commit comments

Comments
 (0)