Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,32 @@ jobs:
exit 1
fi

test-python-profiles-test:
runs-on: ubuntu-latest

strategy:
matrix:
bun-version: [ latest ]
python-version: [ "3.13" ]

steps:
- uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ matrix.bun-version }}

- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Test Python profiles
run: make test-python-profiles

test-mustache-java-r4-example:
runs-on: ubuntu-latest

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ test-output
.typeschema-cache
*.cpuprofile
examples/tmp/
/examples/python/fhir_types/type-schemas/
/examples/python-profiles/fhir_types/type-schemas/
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ test-csharp-sdk: typecheck format prepare-aidbox-runme lint
PYTHON=python3.13
PYTHON_EXAMPLE=./examples/python
PYTHON_FHIRPY_EXAMPLE=./examples/python-fhirpy
PYTHON_PROFILES_EXAMPLE=./examples/python-profiles

generate-python-sdk:
$(TYPECHECK) --project examples/python/tsconfig.json
Expand All @@ -112,6 +113,10 @@ generate-python-sdk-fhirpy:
$(TYPECHECK) --project examples/python-fhirpy/tsconfig.json
bun run examples/python-fhirpy/generate.ts

generate-python-profiles:
$(TYPECHECK) --project examples/python-profiles/tsconfig.json
bun run examples/python-profiles/generate.ts

python-test-setup:
@if [ ! -d "$(PYTHON_EXAMPLE)/venv" ]; then \
cd $(PYTHON_EXAMPLE) && \
Expand All @@ -129,6 +134,19 @@ python-fhirpy-test-setup:
pip install fhirpy; \
fi

python-profiles-test-setup:
@if [ ! -d "$(PYTHON_PROFILES_EXAMPLE)/venv" ]; then \
cd $(PYTHON_PROFILES_EXAMPLE) && \
$(PYTHON) -m venv venv && \
. venv/bin/activate && \
pip install -r fhir_types/requirements.txt; \
fi

test-python-profiles: typecheck format lint generate-python-profiles python-profiles-test-setup
cd $(PYTHON_PROFILES_EXAMPLE) && \
. venv/bin/activate && \
python -m pytest test_profile_patient.py test_profile_bp.py test_profile_bodyweight.py -v

test-python-sdk: typecheck format prepare-aidbox-runme lint generate-python-sdk python-test-setup
# Run mypy in strict mode
cd $(PYTHON_EXAMPLE) && \
Expand Down
Loading
Loading