Skip to content

Commit ca1bcf3

Browse files
committed
Add mypy details for atomic-ehr-codegen-python-us-core-profiles
1 parent 903889c commit ca1bcf3

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

developer-experience/atomic-ehr-codegen-python-us-core-profiles/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,17 @@ npx tsx generate.ts # regenerate fhir_types/ (optional
3232
python3 -m venv venv && source venv/bin/activate
3333
pip install -r fhir_types/requirements.txt # pydantic + fhirpy
3434

35+
mypy . # typecheck the example
3536
python load.py # reads patients.csv, writes bundle.json
3637
python avg.py # reads bundle.json, prints the average BP
3738
```
3839

3940
Expected output:
4041

41-
```
42+
```bash
43+
$ mypy .
44+
Success: no issues found in 35 source files
45+
4246
$ python load.py
4347
Loaded 5 rows
4448
Wrote bundle with 10 entries
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[mypy]
2+
python_version = 3.13
3+
strict = True
4+
# FHIR resources are modelled as Pydantic objects that also accept/return plain
5+
# dicts, and the demo/test code freely accesses optional fields it knows are set.
6+
# Optional-aware checks and these codes are impractical to satisfy without
7+
# pervasive asserts, so they stay relaxed even under strict.
8+
strict_optional = False
9+
disable_error_code = assignment, return-value, union-attr, dict-item, index
10+
plugins = pydantic.mypy

developer-experience/atomic-ehr-codegen-python-us-core-profiles/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"generate": "tsx generate.ts"
99
},
1010
"devDependencies": {
11-
"@atomic-ehr/codegen": "^0.0.15-canary.20260616131237.0f30eea",
11+
"@atomic-ehr/codegen": "^0.0.15-canary.20260619123134.2ecedd6",
1212
"@types/node": "^25.6.0",
1313
"tsx": "^4.21.0",
1414
"typescript": "^5.9.3"

0 commit comments

Comments
 (0)