-
Notifications
You must be signed in to change notification settings - Fork 44
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
[IGNORE] Mergeability #2 #1817
Closed
Closed
[IGNORE] Mergeability #2 #1817
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ml-evs
force-pushed
the
ml-evs/pydantic-v2-migration-take3
branch
2 times, most recently
from
October 15, 2023 12:52
2fd7a3f
to
9d99e07
Compare
ml-evs
force-pushed
the
ml-evs/remove-py38
branch
from
October 15, 2023 12:59
e921de4
to
791b932
Compare
ml-evs
force-pushed
the
ml-evs/pydantic-v2-migration-take3
branch
2 times, most recently
from
October 15, 2023 13:19
87a07be
to
7a19d45
Compare
ml-evs
force-pushed
the
ml-evs/remove-py38
branch
from
October 15, 2023 13:26
791b932
to
1f0da3e
Compare
Codecov Report
@@ Coverage Diff @@
## master #1817 +/- ##
==========================================
- Coverage 90.68% 90.29% -0.39%
==========================================
Files 74 75 +1
Lines 4616 4606 -10
==========================================
- Hits 4186 4159 -27
- Misses 430 447 +17
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Use pydantic v1 API wih v2 package Replace `regex` with `pattern` Use pydantic v2 API for model dumps Go use pydantic v2 API again Bump deps in pyproject and adjust for pydantic_settings Attempt to migrate some pydantic v2 features Run bump-pydantic Update deps in requirements Post pydantic-bump tweak number 3 Post pydantic-bump tweak number 4 Post pydantic-bump tweak number 5 Reintroduce email-validator dep via pydantic extra Placating mypy Use lax annotated type rather than validator Attempt to simplify some tests for pydantic v2 Bump pydantic version in pre-commit Bump to pydantic 2.3.0
- Reintroduce `http_client` extra as an alias for `http-client`
Still need to pass in a proper REF_TEMPLATE.
Lot's of changes here - mainly in optimade.server.schemas:retrieve_queryable_properties(). Using the `model_fields` and FieldInfo instead of the generated JSON Schema. Mainly due to the changes in the generated schema. This led to a bit of hacking concerning the type (FieldInfo.annotation). But otherwise, I think this is a better approach. Also implemented for EntryCollection.get_attribute_fields(). Otherwise, changes here and there to make tests work as well as doing some static typing sporadically.
Remove mp-api and emmet-core dependencies Remove emmet-core from requirements file as well Update mkdocstrings dependency in requirements file
Use the new Python handler for mkdocstrings - updating the configuration in all_models.md to include all submodules for optimade.models.
Needed to properly ONLY check if annotation was Union or Optional before using `get_args()`. Otherwise a type required as a list of strings is unpacked to `str`, which we do not want.
Use enum `.value` for comparison (check if this should be used elsewhere in the code for any Enum classes/types). Disable ignoring warning about pydantic v2 deprecations in order to use pydantic v2 methods in remaining places. Consider completely removing the special function used for setting `nullable=true` in JSON schema for 'SHOULD' OPTIMADE support fields. It seems `nullable` is no longer a valid field in OpenAPI v3.1.0, but also, the properties/fields this is added to already support the value being `null`.
This is no longer part of the OpenAPI spec as of v3.1. Fixes #1814
Also update some static typing here and there.
- Avoid running mypy on tests folder. - Remove mypy ignore statements from tests - Revert to having implicit Optional
- Tidy up changes re: `Datatype`
ml-evs
force-pushed
the
ml-evs/pydantic-v2-migration-take3
branch
from
October 15, 2023 15:30
7a19d45
to
63e3f7c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Another PR to check mergeability after rebasing all of #1745 into #1815. I will use this PR to test a few more squashes to keep it manageable, then ensure that the overall changes are the same as #1745 before overwriting that branch.