Skip to content

Commit

Permalink
Bump version to v0.6.1 for release
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwilliammd committed May 1, 2024
1 parent 225d504 commit cb28648
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
- Added ```fhir_parser.py``` function covering code extraction from FHIR Observation, Condition, and Bundle resources ```/fhir/parse/resource``` (singular resource) and ```/fhir/parse/bundle``` (bundle resource)
- Added FastAPI endpoint function triggering ```batchconvert``` function ```/iderare/batchconvert```
- Added ```fhir_parser.py``` function covering code extraction from FHIR Observation, Condition, and Bundle resources at ```/fhir/parse/resource``` (singular resource) and ```/fhir/parse/bundle``` (bundle resource).
- Added FastAPI endpoint function triggering ```batchconvert``` function at **/iderare/batchconvert** endpoint.


## [v0.5.0](https://github.com/ivanwilliammd/iderare-pheno/releases/tag/v0.5.0) - 2024-04-10
- Added ```omim2name``` function and ```streamlit_utils.py``` to accomodate Streamlit app
Expand Down
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,56 @@ from iderare_pheno.utils import linkage_dendrogram, list2tsv, generate_yml
```
As the complete readthedocs.io is being finalized, please kindly refer to this [Interactive Playbook Example](https://github.com/ivanwilliammd/iderare-pheno/blob/main/Playbook.ipynb)

Note : for Streamlit implementation, use ```iderare_pheno.streamlit_utils``` instead of ```iderare_pheno.utils```, this was done to prevenn file automatically saving and showing dendrogram in Streamlit.
Note : for Streamlit implementation, use ```iderare_pheno.streamlit_utils``` instead of ```iderare_pheno.utils```, this was done to prevent file to automatically saving and showing dendrogram in Streamlit.
```python
from iderare_pheno.streamlit_utils import linkage_dendrogram, list2tsv, generate_yml
```

For Python FastAPI implementation and FHIR code extraction / parsing and deploying wsgi app, ensure you have installed the dependencies below:
```bash
pip install fastapi uvicorn a2wsgi
```

Then prepare your passenger wsgi app and main FastAPI app as below:

#### passenger_wsgi.py
```python
import os
import sys
from a2wsgi import ASGIMiddleware

# Adjust the path to your FastAPI application directory if needed
app_dir = os.path.join(os.path.dirname(__file__), 'app')
sys.path.insert(0, app_dir)

# Import your FastAPI application
from app.main import app # Assuming your FastAPI app instance is named 'app'

# Application callable for Passenger WSGI
def application(environ, start_response):
return ASGIMiddleware(app)(environ, start_response)
```

#### app/main.py
```python
from fastapi.responses import RedirectResponse
from iderare_pheno.fhir_parser import *

@app.get("/")
async def welcome():
return RedirectResponse(status_code=302, url="/docs")

@app.get("/health")
async def health() -> Response :
return {"status_code" : 200, "detail" : "The services is running, try to explore the API from Postman Collection"}

if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)
```

Now you could access your http://localhost:8000 and redirected to Swagger to see the documentation of the available FastAPI endpoint. Demo example could be accessed via Postman Collection at [here](https://www.postman.com/ivanwilliamharsono/workspace/iderare-pheno/overview)


## Team

Expand Down
2 changes: 1 addition & 1 deletion iderare_pheno/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
_MINOR = "6"
# On main and in a nightly release the patch should be one ahead of the last
# released build.
_PATCH = "0"
_PATCH = "1"
# This is mainly for nightly builds which have the suffix ".dev$DATE". See
# https://semver.org/#is-v123-a-semantic-version for the semantics.
_SUFFIX = ""
Expand Down

0 comments on commit cb28648

Please sign in to comment.