Skip to content

Commit 4d8266e

Browse files
committed
Update Webservice
- Update `version` endpoint to include `py-ard` version as well - Base Image for Docker Deployment is Python 3.12
1 parent 82a944e commit 4d8266e

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.11-slim-buster
1+
FROM python:3.12-slim-bullseye
22

33
LABEL MAINTAINER="Pradeep Bashyal"
44

Dockerfile-local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.10-slim-buster
1+
FROM python:3.12-slim-bullseye
22

33
LABEL MAINTAINER="Pradeep Bashyal"
44

api-spec.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,22 @@ paths:
2828
operationId: api.version_controller
2929
summary: IPD-IMGT/HLA Version
3030
description: |
31-
Get IPD-IMGT/HLA DB Version used for this service
31+
Get IPD-IMGT/HLA DB Version and `py-ard` version used for this service
3232
responses:
3333
200:
3434
description: IPD-IMGT/HLA version number
3535
content:
3636
application/json:
3737
schema:
38-
type: integer
39-
example: 3440
38+
properties:
39+
ipd-version:
40+
description: IPD-IMGT/HLA DB Version
41+
type: integer
42+
example: 3560
43+
py-ard-version:
44+
description: py-ard library version
45+
type: string
46+
example: "1.2.1"
4047
/redux:
4148
post:
4249
tags:

api.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,15 @@ def drbx_blender_controller():
105105

106106

107107
def version_controller():
108-
version = ard.get_db_version()
109-
return {"version": version}, 200
108+
ipd_version = ard.get_db_version()
109+
return {
110+
"ipd-version": ipd_version,
111+
"py-ard-version": pyard.__version__,
112+
}, 200
110113

111114

112115
def splits_controller(allele: str):
113-
mapping = pyard.find_broad_splits(allele)
116+
mapping = ard.find_broad_splits(allele)
114117
if mapping:
115118
return {"broad": mapping[0], "splits": mapping[1]}, 200
116119

0 commit comments

Comments
 (0)