Skip to content

Commit

Permalink
Merge branch 'main' into api-enhanced-algo
Browse files Browse the repository at this point in the history
  • Loading branch information
bamader authored Jun 13, 2023
2 parents 9b62c26 + 343575d commit fd2393d
Show file tree
Hide file tree
Showing 22 changed files with 1,669 additions and 1,732 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:


env:
TEST_RUNNER_PYTHON_VERSION: 3.9
TEST_RUNNER_PYTHON_VERSION: 3.11

jobs:
postgres-tests:
Expand Down
6 changes: 5 additions & 1 deletion containers/alerts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM python:3.10-slim
FROM python:3.11-slim

WORKDIR /code

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git

COPY ./requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt

Expand Down
6 changes: 3 additions & 3 deletions containers/alerts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ azure-communication-phonenumbers
azure-communication-sms
azure-identity
typing_extensions==4.5.0
pydantic==1.9.0
fastapi==0.95.0
phdi
pydantic==1.10.9
fastapi==0.96.0
phdi @ git+https://github.com/CDCgov/phdi@updatepython
uvicorn
httpx
slack_sdk
Expand Down
10 changes: 5 additions & 5 deletions containers/fhir-converter/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ charset-normalizer==2.1.0
click==8.1.3
dnspython==2.2.1
email-validator==1.2.1
fastapi==0.92.0
fastapi==0.96.0
h11==0.13.0
httpcore==0.17.0
httptools==0.4.0
httptools==0.5.0
httpx==0.24.0
idna==3.3
iniconfig==1.1.1
Expand All @@ -20,7 +20,7 @@ orjson==3.7.11
packaging==21.3
pluggy==1.0.0
py==1.11.0
pydantic==1.9.1
pydantic==1.10.9
pyparsing==3.0.9
pytest==7.1.2
python-dotenv==0.20.0
Expand All @@ -29,13 +29,13 @@ PyYAML==6.0
requests==2.28.1
six==1.16.0
sniffio==1.2.0
starlette==0.25.0
starlette==0.27.0
tomli==2.0.1
typing_extensions==4.3.0
ujson==5.4.0
urllib3==1.26.11
uvicorn==0.17.6
uvloop==0.16.0
uvloop==0.17.0
watchgod==0.8.2
websockets==10.3
uuid
6 changes: 5 additions & 1 deletion containers/ingestion/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM python:3.10-slim
FROM python:3.11-slim

WORKDIR /code

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git

COPY ./requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt

Expand Down
8 changes: 4 additions & 4 deletions containers/ingestion/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
typing_extensions==4.5.0
pydantic==1.9.0
fastapi==0.95.0
phdi
typing_extensions==4.6.3
pydantic==1.10.9
fastapi==0.96.0
phdi @ git+https://github.com/CDCgov/phdi@updatepython
uvicorn
httpx
6 changes: 5 additions & 1 deletion containers/message-parser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM python:3.10-slim
FROM python:3.11-slim

WORKDIR /code

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git

COPY ./requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt

Expand Down
6 changes: 3 additions & 3 deletions containers/message-parser/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
typing_extensions==4.5.0
pydantic==1.9.0
fastapi==0.95.0
phdi
pydantic==1.10.9
fastapi==0.96.0
phdi @ git+https://github.com/CDCgov/phdi@updatepython
uvicorn
httpx
pytest
Expand Down
4 changes: 2 additions & 2 deletions containers/record-linkage/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM python:3.10-slim
FROM python:3.11-slim

WORKDIR /code

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git

COPY ./requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt

Expand Down
6 changes: 3 additions & 3 deletions containers/record-linkage/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
typing_extensions==4.5.0
uvicorn
pydantic==1.9.0
fastapi==0.95.0
phdi @ git+https://github.com/CDCgov/phdi@main
pydantic==1.10.9
fastapi==0.96.0
phdi @ git+https://github.com/CDCgov/phdi@updatepython
httpx
pathlib
4 changes: 3 additions & 1 deletion containers/tabulation/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10-slim
FROM python:3.11-slim

WORKDIR /code

Expand All @@ -8,6 +8,8 @@ RUN apt-get -y update && \
apt-get upgrade -y && \
apt-get -y install gcc

RUN apt-get install -y git

COPY ./requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt

Expand Down
6 changes: 3 additions & 3 deletions containers/tabulation/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
typing_extensions==4.5.0
pydantic==1.9.0
fastapi==0.95.0
phdi
pydantic==1.10.9
fastapi==0.96.0
phdi @ git+https://github.com/CDCgov/phdi@updatepython
uvicorn
httpx
pytest
Expand Down
6 changes: 5 additions & 1 deletion containers/validation/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM python:3.10-slim
FROM python:3.11-slim

WORKDIR /code

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git

COPY ./requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt

Expand Down
6 changes: 3 additions & 3 deletions containers/validation/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
typing_extensions==4.5.0
pydantic==1.9.0
fastapi==0.95.0
phdi
pydantic==1.10.9
fastapi==0.96.0
phdi @ git+https://github.com/CDCgov/phdi@updatepython
uvicorn
httpx
pytest
Expand Down
15 changes: 9 additions & 6 deletions phdi/linkage/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,12 +949,15 @@ def read_linkage_config(config_file: pathlib.Path) -> List[dict]:
various parts of linkage pass function.
"""
try:
algo_config = json.load(open(config_file))
# Need to convert function keys back to column indices, since
# JSON serializes dict keys as strings
for rl_pass in algo_config.get("algorithm"):
rl_pass["funcs"] = {int(col): f for (col, f) in rl_pass["funcs"].items()}
return algo_config.get("algorithm", [])
with open(config_file) as f:
algo_config = json.load(f)
# Need to convert function keys back to column indices, since
# JSON serializes dict keys as strings
for rl_pass in algo_config.get("algorithm"):
rl_pass["funcs"] = {
int(col): f for (col, f) in rl_pass["funcs"].items()
}
return algo_config.get("algorithm", [])
except FileNotFoundError:
raise FileNotFoundError(f"No file exists at path {config_file}.")
except json.decoder.JSONDecodeError as e:
Expand Down
Loading

0 comments on commit fd2393d

Please sign in to comment.