rcpch / digital-growth-charts-server

RCPCH's open source Digital Growth Chart API
https://growth.rcpch.ac.uk/
GNU Affero General Public License v3.0
16 stars 11 forks source link

Dockerise #206

Closed eatyourpeas closed 7 months ago

eatyourpeas commented 7 months ago

Dockerise

Overview

This PR covers a few issues:

  1. dockerises the whole server, making it easier to develop locally - this uses the RCPCH playbook standard of an s folder to and docker compose files
  2. Updates requirements (though these are still not pinned) to include httpx for tests/startlette
  3. Updates pydantic to v2. This has several breaking changes which have all been fixed, including to the typing in the request and response schemas
  4. update the tests in particular in the fictional child endpoint for bone ages to be floats

Code changes

Key changes are to typing in request_validation_classes, response_schema_classes, to allow pydantic 2+ to work New files relate to docker, and files deleted are deprecating old code Changes to routers folders are mostly linting changes Tests mostly unchanged though the responses have been updated to ensure floats are used where previously there were strings

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

This needs doing

Related Issues

There is no associated issue

Mentions

@pacharanero has comments here to discuss

eatyourpeas commented 7 months ago

The final failing test here is actually not the server, but the RCPCHGrowth python package inside it which uses the now deprecated pkg_resources in 3.12 My interpretation of this is that we should not support 3.12 for the time being until we have updated the package to include a .toml file and remove pkg_resources in favour of something else for loading in the reference data.