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

Migrate to FastAPI #54

Merged
merged 5 commits into from
Jan 23, 2024
Merged

Migrate to FastAPI #54

merged 5 commits into from
Jan 23, 2024

Conversation

kbevers
Copy link
Contributor

@kbevers kbevers commented Nov 17, 2022

Work in progress.

@kbevers kbevers force-pushed the fastapi branch 9 times, most recently from 219c378 to 226c9e6 Compare November 18, 2022 13:40
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3497366675

  • 120 of 137 (87.59%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.5%) to 92.655%

Changes Missing Coverage Covered Lines Changed/Added Lines %
webproj/api.py 105 122 86.07%
Totals Coverage Status
Change from base Build 3328236843: -2.5%
Covered Lines: 328
Relevant Lines: 354

💛 - Coveralls

@kbevers kbevers force-pushed the fastapi branch 7 times, most recently from a6f43fe to 6dea204 Compare January 20, 2024 17:12
kbevers and others added 5 commits January 23, 2024 11:37
Apart from a few very minor details the API should be 1:1 comparable
with the previous rendition based on flask.

The auto-generated docs are improved and now knows about the token
parameter required when the API is accessed via dataforsyningen.dk
The existing base image seems to be abandoned and are not seeing
updates anymore. This isn't sustainable in the long run and a new
base images is implemented. The container is now based on a
condaforge image which allows us to use the conda environment used
in development.
Pydantic primarily added to have the auto-generated docs include
response examples alongside the regular API documentation.

Added benefit of Pydantic is that returned data is validated. During
development this did indeed uncover problem in data.json, where an entry
was missing data.
@kbevers kbevers marked this pull request as ready for review January 23, 2024 10:43
@kbevers kbevers merged commit 731dbbc into SDFIdk:master Jan 23, 2024
1 check passed
@kbevers kbevers deleted the fastapi branch January 23, 2024 10:43
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.

2 participants