Skip to content

Commit

Permalink
[RELEASE] v1.0.2 (#553)
Browse files Browse the repository at this point in the history
* [RELEASE] v1.0.2

* Use github context object instead of env var

* Use commit SHA instead of branch ref
  • Loading branch information
nickclyde authored May 9, 2023
1 parent 4ec4178 commit 60718ec
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 47 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/buildContainers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Containers

on:
pull_request:
branches:
- "**"
paths:
- "containers/**"

jobs:
list-containers:
uses: ./.github/workflows/listContainers.yaml
build:
name: Build containers
needs: list-containers
runs-on: ubuntu-latest
strategy:
matrix:
container-to-build: ${{fromJson(needs.list-containers.outputs.containers)}}
steps:
- name: Check Out Changes
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Target branch in requirements.txt
working-directory: ./containers/${{matrix.container-to-build}}
run: |
sed 's/phdi @ git+https:\/\/github.com\/CDCgov\/phdi.git@main/phdi @ git+https:\/\/github.com\/CDCgov\/phdi.git@${{ github.sha }}/g' requirements.txt > requirements_new.txt && mv requirements_new.txt requirements.txt
- name: Build
uses: docker/build-push-action@v3
with:
context: ./containers/${{matrix.container-to-build}}
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
14 changes: 7 additions & 7 deletions containers/fhir-converter/app/main.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
from phdi.containers.base_service import LicenseType, BaseService
from pathlib import Path
import subprocess
import json
import uuid
from enum import Enum
from fastapi import Response, status
from fastapi import FastAPI, Response, status
from pydantic import BaseModel

# Instantiate FastAPI via PHDI's BaseService class
app = BaseService(
service_name="PHDI FHIR Converter Service",
description_path=Path(__file__).parent.parent / "description.md",
license_info=LicenseType.MIT,
).start()
app = FastAPI()


class InputType(str, Enum):
Expand Down Expand Up @@ -102,6 +97,11 @@ class FhirConverterInput(BaseModel):
root_template: RootTemplate


@app.get("/")
async def health_check():
return {"status": "OK"}


@app.post("/convert-to-fhir", status_code=200)
async def convert(input: FhirConverterInput, response: Response):
result = convert_to_fhir(**dict(input))
Expand Down
78 changes: 39 additions & 39 deletions containers/fhir-converter/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
anyio
asgiref
attrs
certifi
charset-normalizer
click
dnspython
email-validator
h11
httptools
idna
iniconfig
itsdangerous
Jinja2
MarkupSafe
orjson
packaging
phdi @ git+https://github.com/CDCgov/phdi.git@main
pluggy
py
pydantic
pyparsing
pytest
python-dotenv
python-multipart
PyYAML
requests
six
sniffio
starlette
tomli
typing_extensions
ujson
urllib3
uvicorn
uvloop
watchgod
websockets
uuid
anyio==3.6.1
asgiref==3.5.2
attrs==22.1.0
certifi==2022.12.7
charset-normalizer==2.1.0
click==8.1.3
dnspython==2.2.1
email-validator==1.2.1
fastapi==0.79.0
h11==0.13.0
httptools==0.4.0
idna==3.3
iniconfig==1.1.1
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.1
orjson==3.7.11
packaging==21.3
pluggy==1.0.0
py==1.11.0
pydantic==1.9.1
pyparsing==3.0.9
pytest==7.1.2
python-dotenv==0.20.0
python-multipart==0.0.5
PyYAML==6.0
requests==2.28.1
six==1.16.0
sniffio==1.2.0
starlette==0.19.1
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
watchgod==0.8.2
websockets==10.3
uuid
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "phdi"
version = "v1.0.1"
version = "v1.0.2"
description = "Public health data infrastructure Building Blocks is a library to help public health departments work with their data"
authors = ["Kenneth Chow <kenneth@skylight.digital>", "Brandon Mader <brandon@skylight.digital>", "Spencer Kathol <spencer@skylight.digital>", "Nick Clyde <nclyde@skylight.digital", "Dan Paseltiner <dan@skylight.digital>", "Brady Fausett <brady@skylight.digital>", "Marcelle Goggins <marcelle@skylight.digital", "Nick Bristow <nick@skylight.digital>", "Bryan Britten <bryan@skylight.digital>", "Emma Stephenson <emma@skylight.digital>" , "Gordon Farrell <gordon@skylight.digital>", "Robert Mitchell <rmitchell@skylight.digital>"]
homepage = "https://github.com/CDCgov/phdi"
Expand Down

0 comments on commit 60718ec

Please sign in to comment.