Skip to content

Commit

Permalink
Merge pull request #247 from rcpch/eatyourpeas/issue246
Browse files Browse the repository at this point in the history
Eatyourpeas/issue246
  • Loading branch information
eatyourpeas authored Jan 31, 2025
2 parents 773ee71 + 2a48f8d commit 30affb7
Show file tree
Hide file tree
Showing 7 changed files with 312 additions and 161 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 4.3.2
current_version = 4.3.3
tag = True
commit = True

Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from routers import trisomy_21, trisomy_21_aap, turners, uk_who, cdc, who, utilities


version='4.3.2' # this is set by bump version
version='4.3.3' # this is set by bump version

# Declare the FastAPI app
app = FastAPI(
Expand Down
5 changes: 3 additions & 2 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "RCPCH Digital Growth API",
"description": "Returns SDS and centiles for child growth measurements using growth references. Currently provides calculations based on the UK-WHO, Turner's Syndrome and Trisomy-21 references.",
"version": "4.3.2"
"version": "4.3.3"
},
"paths": {
"/uk-who/calculation": {
Expand Down Expand Up @@ -1183,6 +1183,7 @@
"type": "string",
"enum": [
"cole-nine-centiles",
"extended-who-centiles",
"three-percent-centiles",
"five-percent-centiles",
"eighty-five-percent-centiles"
Expand All @@ -1199,7 +1200,7 @@
}
],
"title": "Centile Format",
"description": "Optional selection of centile format using 9 centile standard ['cole-nine-centiles'], or 'three-percent-centiles' [3.0, 10.0, 25.0, 50.0, 75.0, 90.0, 97.0], five-percent-centiles [5.0, 10.0, 25.0, 50.0, 75.0, 90.0, 95.0] or eight-five-percent-centiles as used in CDC BMI [3.0, 5.0, 10.0, 25.0, 50.0, 75.0, 85, 90.0, 95, 98.0, 99.0, 99.9, 99.99] or accepts a list of floats as a custom centile format e.g. [7/10/20/30/40/50/60/70/80/90/93]. Defaults to cole-nine-centiles",
"description": "Optional selection of centile format using 9 centile standard ['cole-nine-centiles'], or 'extended-who-centiles' [1, 3, 5, 10, 15, 50, 85, 90, 95, 97, 99], 'three-percent-centiles' [3.0, 10.0, 25.0, 50.0, 75.0, 90.0, 97.0], five-percent-centiles [5.0, 10.0, 25.0, 50.0, 75.0, 90.0, 95.0] or eight-five-percent-centiles as used in CDC BMI [3.0, 5.0, 10.0, 25.0, 50.0, 75.0, 85, 90.0, 95, 98.0, 99.0, 99.9, 99.99] or accepts a list of floats as a custom centile format e.g. [7/10/20/30/40/50/60/70/80/90/93]. Defaults to cole-nine-centiles",
"default": "cole-nine-centiles"
}
},
Expand Down
2 changes: 1 addition & 1 deletion requirements/common-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ pydantic == 2.*

# rcpch dependencies
# python package which does the centile and SDS calculations
rcpchgrowth==4.3.5
rcpchgrowth==4.3.6
4 changes: 2 additions & 2 deletions schemas/request_validation_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ class ChartCoordinateRequest(BaseModel):
description="Boolean flag (default False) referring to centile_format. If custom lines requested as SDS, rather than as centiles, set this to True."
)
centile_format: Optional[
Union[Literal["cole-nine-centiles", "three-percent-centiles", "five-percent-centiles", "eighty-five-percent-centiles"], List[float]]
Union[Literal["cole-nine-centiles", "extended-who-centiles", "three-percent-centiles", "five-percent-centiles", "eighty-five-percent-centiles"], List[float]]
] = Field(
"cole-nine-centiles",
description="Optional selection of centile format using 9 centile standard ['cole-nine-centiles'], or 'three-percent-centiles' [3.0, 10.0, 25.0, 50.0, 75.0, 90.0, 97.0], five-percent-centiles [5.0, 10.0, 25.0, 50.0, 75.0, 90.0, 95.0] or eight-five-percent-centiles as used in CDC BMI [3.0, 5.0, 10.0, 25.0, 50.0, 75.0, 85, 90.0, 95, 98.0, 99.0, 99.9, 99.99] or accepts a list of floats as a custom centile format e.g. [7/10/20/30/40/50/60/70/80/90/93]. Defaults to cole-nine-centiles"
description="Optional selection of centile format using 9 centile standard ['cole-nine-centiles'], or 'extended-who-centiles' [1, 3, 5, 10, 15, 50, 85, 90, 95, 97, 99], 'three-percent-centiles' [3.0, 10.0, 25.0, 50.0, 75.0, 90.0, 97.0], five-percent-centiles [5.0, 10.0, 25.0, 50.0, 75.0, 90.0, 95.0] or eight-five-percent-centiles as used in CDC BMI [3.0, 5.0, 10.0, 25.0, 50.0, 75.0, 85, 90.0, 95, 98.0, 99.0, 99.9, 99.99] or accepts a list of floats as a custom centile format e.g. [7/10/20/30/40/50/60/70/80/90/93]. Defaults to cole-nine-centiles"
)

@model_validator(mode='after')
Expand Down
Loading

0 comments on commit 30affb7

Please sign in to comment.