Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test-centile_bands #226

Merged
merged 4 commits into from
Oct 26, 2024
Merged

Test-centile_bands #226

merged 4 commits into from
Oct 26, 2024

Conversation

eatyourpeas
Copy link
Member

Overview

This pulls in changes in the python package that corrects the centile_bands in the Measurement class on adding CDC reference.
In the process it was necessary to allow centile values more than a decimal place, since CDC BMI has complicated maths for BMI values > 99, where they are on the 99.9th or 99.99th centiles. Rounding here would have returned 100. This broke the tests so these have been fixed.

While doing this I noticed that one of the request params for fictional-child-data is reference. This is unnecessary and could lead to errors since fictional-child-data is already prefixed by the reference. If a user had requested UK-WHO children against the CDC endpoint they might have received the wrong children back.

This is now fixed but by removing reference from the request schema this will make a breaking change. I don't think anyone uses this endpoint apart from us but we have a postman suite which would break, the openapi spec would need refreshing too.
Otherwise all the tests are updated and passing.

@mbarton - how should we handle this merge?

Code changes

Please describe the changes you made here.

Documentation changes (done or required as a result of this PR)

Please describe any changes to documentation here.

Related Issues

List any issues related to this PR here.

Mentions

@mentions of the person or team responsible for reviewing proposed changes.

…hat failed. remove reference from fictional-child-data params - note might cause postman to fail. add tests for turner fictional-child-data in case request weight or male
@eatyourpeas eatyourpeas requested a review from mbarton October 23, 2024 17:40
@eatyourpeas
Copy link
Member Author

Just to add for comment really
The tests fail because the final digit (16th) for me locally does not match what is calculated on running the same tests on github. I am not going to get too lost in this level of precision, so inspite of what i said above, I have pruned the return values in the CDC and UK-WHO responses for centile values to 4 dp.

@eatyourpeas eatyourpeas merged commit c39f194 into live Oct 26, 2024
4 checks passed
@eatyourpeas eatyourpeas deleted the test-centile_bands branch October 26, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant