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

⬆️ Upgrade API server (Pydantic v2) #6511

Conversation

giancarloromeo
Copy link
Contributor

@giancarloromeo giancarloromeo commented Oct 10, 2024

What do these changes do?

They upgrade the API server (Pydantic v2).

Related issue/s

How to test

Dev-ops checklist

@giancarloromeo giancarloromeo self-assigned this Oct 10, 2024
@giancarloromeo giancarloromeo added the t:maintenance Some planned maintenance work label Oct 10, 2024
@giancarloromeo giancarloromeo added this to the MartinKippenberger milestone Oct 10, 2024
@giancarloromeo giancarloromeo changed the title ⬆️ WIP: Upgrade API server ⬆️ WIP: Upgrade API server (Pydantic v2) Oct 10, 2024
@giancarloromeo giancarloromeo added the a:apiserver api-server service label Oct 15, 2024
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (pydantic_v2_migration@fbf9fa9). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##             pydantic_v2_migration   #6511   +/-   ##
=======================================================
  Coverage                         ?   84.1%           
=======================================================
  Files                            ?     847           
  Lines                            ?   30043           
  Branches                         ?    1809           
=======================================================
  Hits                             ?   25290           
  Misses                           ?    4452           
  Partials                         ?     301           
Flag Coverage Δ
unittests 84.1% <100.0%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...c/models_library/api_schemas_webserver/projects.py 100.0% <100.0%> (ø)
...rc/models_library/api_schemas_webserver/wallets.py 94.6% <100.0%> (ø)

@@ -25,10 +25,6 @@ define _create_and_validate_openapi
export API_SERVER_DEV_FEATURES_ENABLED=$1; \
python3 -c "import json; from $(APP_PACKAGE_NAME).main import *; print( json.dumps(the_app.openapi(), indent=2) )" > $@

# patching version until tools adapted
@sed -i 's/"openapi": "3.1.0",/"openapi": "3.0.2",/g' $@
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed anymore

@@ -15,8 +15,8 @@ reqs: ## compiles pip requirements (.in -> .txt)


# specification of the used openapi-generator-cli (see also https://github.com/ITISFoundation/openapi-generator)
OPENAPI_GENERATOR_NAME := itisfoundation/openapi-generator-cli-openapi-generator-v4.2.3
OPENAPI_GENERATOR_TAG := v0
OPENAPI_GENERATOR_NAME := openapitools/openapi-generator-cli
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Official tool used for validation

Copy link

@giancarloromeo giancarloromeo requested a review from GitHK October 22, 2024 21:27
@giancarloromeo giancarloromeo changed the title ⬆️ WIP: Upgrade API server (Pydantic v2) ⬆️ Upgrade API server (Pydantic v2) Oct 22, 2024
@giancarloromeo giancarloromeo marked this pull request as ready for review October 22, 2024 21:27
@sanderegg sanderegg deleted the branch ITISFoundation:pydantic_v2_migration October 22, 2024 21:29
@sanderegg sanderegg closed this Oct 22, 2024
@giancarloromeo giancarloromeo deleted the is4481/upgrade-api-server branch November 21, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:apiserver api-server service t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants