-
Notifications
You must be signed in to change notification settings - Fork 178
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
refactor: Migrate Python projects from Pydantic v1 to v2 #14871
Open
ahiuchingau
wants to merge
143
commits into
edge
Choose a base branch
from
chore_update-pydantic-v2
base: edge
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+28,385
−52,676
Open
Changes from 131 commits
Commits
Show all changes
143 commits
Select commit
Hold shift + click to select a range
c2d17fb
update pydantic & fix all mypy errors
ahiuchingau cae6028
hardware: update pydantic & fix all mypy errors
ahiuchingau 8779c87
hardware: fix Pipfile
ahiuchingau 19f7110
api: update pydantic & fix mypy errors
ahiuchingau b5c8eab
shared-data: add Vec3f
ahiuchingau ac77352
shared-data: rename labware_definition to models
ahiuchingau ef889d4
fix api mypy test errors
ahiuchingau b3ea918
update api
ahiuchingau ea9e17e
fix protocol_engine tests
ahiuchingau 90b7fab
fix(api): tests
ahiuchingau 16b69eb
update command schema 8.json
ahiuchingau 528a825
shared-data: deprecate json_encoder and use v2 serializer
ahiuchingau ff83a57
fix api tests
ahiuchingau 80a7000
api(src): update deprecated code
ahiuchingau 1291aa1
api: linter
ahiuchingau 27bbbec
shared-data: remove deprecated code
ahiuchingau b646339
shared-data: mypy.ini removed commented out override
ahiuchingau 7588a3f
robot-server & server-utils: update pipenv
ahiuchingau 0b391da
robot-server: add pydantic_settings
ahiuchingau 8114936
robot-server: bump-pydantic to v2
ahiuchingau 52b5899
robot-server: fix lint errors
ahiuchingau 9b02831
robot-server: fix one test
ahiuchingau 2728cca
make lint
ahiuchingau c47cb10
add model serializer
ahiuchingau 82d5a51
Merge remote-tracking branch 'origin/edge' into chore_update-pydantic-v2
SyntaxColoring 96b4591
Post-merge code fixups.
SyntaxColoring 68fa893
Re-lock performance-metrics.
SyntaxColoring 86623ea
Use == version spec for robot-server, like we had before.
SyntaxColoring eac19cb
Remove outdated comment.
SyntaxColoring 7e1da8d
Update g-code-testing Pipfile.
SyntaxColoring 8ed4c1e
Update system-server Pipfile.
SyntaxColoring 913019f
Move performance-metrics from api [dev-packages] to [packages].
SyntaxColoring 2938afb
Re-lock api.
SyntaxColoring 2b7d068
_TestCommand.result and ReloadLabware.result need to default to None.
SyntaxColoring ac00d02
Revert SyncClient model_validate() changes.
SyntaxColoring 10aa798
Remove now-unneeded type-ignores.
SyntaxColoring fef7108
Don't instantiate BaseModel directly.
SyntaxColoring a7a69d7
Merge branch 'chore_update-pydantic-v2' of github.com:Opentrons/opent…
SyntaxColoring 46b024b
Regenerate command schema.
SyntaxColoring 7d73026
Delete empty log.txt.
SyntaxColoring 14bc816
Update .json() calls in cli.analyze.
SyntaxColoring 8dbe3d8
Run bump-pydantic on api.
SyntaxColoring d975c0e
Give up on test_command_executor.py.
SyntaxColoring e677a7e
Pin fastapi with == like we had before.
SyntaxColoring 3771b91
Ensure all fastapi pins consistently use 0.100.0.
SyntaxColoring ec14dd7
Move robot-server's dependency on performance-metrics to [packages].
SyntaxColoring d3c6ce2
Install pydantic-settings in system-server.
SyntaxColoring 34cae8c
Add pydantic-settings to robot-server/setup.py.
SyntaxColoring 7ee2b47
Re-lock everything.
SyntaxColoring 1b3b099
robot-server: Run bump-pydantic.
SyntaxColoring 06e87fd
robot-server: Remove now-unneeded type-ignores.
SyntaxColoring 9cdeb04
robot-server: Add a unit test for robot_server.persistence.pydantic.
SyntaxColoring 5f60e97
robot-server: Post-merge fixups to robot_server.persistence.pydantic.
SyntaxColoring dd461e9
system-server: Run bump-pydantic.
SyntaxColoring 3b1da95
system-server: Manual fixups.
SyntaxColoring ff3db4e
Merge remote-tracking branch 'origin/edge' into chore_update-pydantic-v2
SyntaxColoring 14f5c10
g-code-testing: Run bump-pydantic [WIP]
SyntaxColoring 01f0ed9
WIP: Fix some slow stuff with TypeAdapter?
SyntaxColoring de2b400
robot-server: Update error messages in tests.
SyntaxColoring d674c66
Revert BaseModel -> BaseResponseBody changes.
SyntaxColoring 1d95e40
Merge branch 'edge' into chore_update-pydantic-v2
sfoster1 18a3b22
chore: format and fix lints
sfoster1 9417cd0
s-d: fix tests
sfoster1 315a370
api: fix testst
sfoster1 fea1fad
schema format
sfoster1 7fecd09
make this installable per https://github.com/pypa/setuptools/issues/4483
sfoster1 b0c849f
Merge branch 'edge' into chore_update-pydantic-v2
sfoster1 8082363
chore: pydantic 2.9.0
sfoster1 b3f7e04
chore: mypy 1.11.0
sfoster1 5a781f1
chore: py lint fixes
sfoster1 bab482b
chore: fix hardware-testing
sfoster1 aaf8f58
chore: fix api runtime type dependencies
sfoster1 9159f4a
fixup command schema
sfoster1 666b3ff
fixup some server tests
sfoster1 cdbf235
Merge branch 'edge' into chore_update-pydantic-v2
sfoster1 4809ec3
Merge branch 'edge' into chore_update-pydantic-v2
sfoster1 25f0c72
get lint all the way working
sfoster1 6ddf38b
shared-data: lint, test, warnings
sfoster1 f3dd85a
robot-server lint
sfoster1 6344995
s-d: enum handling
sfoster1 fce1971
all but ischema string
sfoster1 e3a6b90
sort the schema for better comparison later
sfoster1 74606e6
fix schema generation
sfoster1 a26b495
fix the rest of the api warnings
sfoster1 f3c812c
fix some r-s and s-s warnings
sfoster1 6332c99
more server fixes
sfoster1 2170735
non-integration tests fixed
sfoster1 dcd9257
more validation stuff
sfoster1 6fd9da7
Format.
SyntaxColoring f9dba7e
int instead of float for ge.
SyntaxColoring b5b28b6
Fix "global" `exclude_none=True` override.
SyntaxColoring 6bd2223
Delete redundant BaseModel inheritance.
SyntaxColoring 3414714
Revert `exclude_none=True, exclude_unset=True, exclude_defaults=True`…
SyntaxColoring b00a4ec
Revert test_response.py changes.
SyntaxColoring 44f0f4d
Shift datetime workaround from production code to tests.
SyntaxColoring e065c31
Merge branch 'edge' into chore_update-pydantic-v2
SyntaxColoring fd76bcf
Fix robot-server docs build script.
SyntaxColoring f871244
Delete `no_strict_optional=True` workaround.
SyntaxColoring ab72323
performance-metrics: Fix systemd-python marker and re-lock.
SyntaxColoring 4a874de
performance-metrics: Ignore missing systemd.daemon import.
SyntaxColoring 854219d
Bump test server startup timeout from 20 to 40.
SyntaxColoring 54eb964
Revert .construct() -> .__init__() in legacy_command_mapper.py.
SyntaxColoring 8e14b56
Merge branch 'edge' into chore_update-pydantic-v2
SyntaxColoring 3a7f070
Lint hardware-testing.
SyntaxColoring d5a707d
Revert changes to command schema 8.
SyntaxColoring 4cefc25
Fix unused type ignore.
SyntaxColoring 6ee8fa2
Format.
SyntaxColoring 9768f01
Fix verify_definition() type-checking.
SyntaxColoring 3dbe348
Add missing pydantic-settings specs to api and hardware setup.py.
SyntaxColoring 10483bc
Experiment: Re-lock some Python projects.
SyntaxColoring 8d7d85d
Manually complete g-code-testing migration.
SyntaxColoring 8e81542
Merge remote-tracking branch 'origin/edge' into chore_update-pydantic-v2
SyntaxColoring 212e876
Migrate new command annotation code.
SyntaxColoring a17012f
Revert use of pydantic_core.from_json() in labware def validation.
SyntaxColoring fe5005e
Revert vector model moves/refactors.
SyntaxColoring 6f5cdba
Replace conint etc. with Annotated. Remove obsolete TYPE_CHECKING con…
SyntaxColoring f8263cb
Shore up HexColor tests for my paranoia.
SyntaxColoring ab27980
Fix up command schema after revert of vector refactors.
SyntaxColoring 944b3f5
Fix incorrect construction of LabwareOffsetVectors.
SyntaxColoring 909295d
Fix text decoding when parsing JSON from files.
SyntaxColoring 93affa8
Update analysis snapshots for 0 changing to 0.0.
SyntaxColoring 2b4863c
Revert jsonschema loosening.
SyntaxColoring 2550326
Update snapshot test for protocol type coercion bug.
SyntaxColoring 2c32dd3
Undo formatting change to mypy.ini.
SyntaxColoring 3a29b86
Merge branch 'edge' into chore_update-pydantic-v2
SyntaxColoring 8eac2cd
Diff minimization: Revert labware_definition->models rename.
SyntaxColoring 33a3fc7
Revert apparently unnecessary exclude_unset etc.
SyntaxColoring 0d7f92b
Diff minimization: Revert some trivial renames.
SyntaxColoring b451291
Diff minimization: Revert some small non-semantic changes (formatting…
SyntaxColoring 7767537
limit rpds to something old enough for oe
sfoster1 c508888
why was it like this? it cant be like this
sfoster1 3686593
Re-delete ResponseList.
SyntaxColoring c714786
Diff minimization: .json() and .dict() overrides.
SyntaxColoring 5bc242b
Delete now-obsolete (?) TypeAdapter overload workaround.
SyntaxColoring 53d902d
perf: Parse RTPs through a TypeAdapter.
SyntaxColoring d7b1740
Delete todo comment in _up_to_3_worker.py.
SyntaxColoring d97002b
Merge branch 'edge' into chore_update-pydantic-v2
SyntaxColoring eedc0e0
Update JSONResponse docstring.
SyntaxColoring 023276e
Handle the new startingTipWell param like other None-valued params.
SyntaxColoring b412650
surprise, this went through Any and wasn't caught
sfoster1 976b759
chore: need pydantic-settings in buildroot
sfoster1 363abb7
chore: update buildroot server start timeout
sfoster1 6549c34
need this for ot2 also
sfoster1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
1,812 changes: 906 additions & 906 deletions
1,812
...shot_test/test_analysis_snapshot[004ebb2b82][OT2_S_v2_11_P10S_P300M_MM_TC1_TM_Swift].json
Large diffs are not rendered by default.
Oops, something went wrong.
448 changes: 224 additions & 224 deletions
448
...s_snapshot_test/test_analysis_snapshot[011481812b][OT2_S_v2_7_P20S_None_Walkthrough].json
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the diffs in
analyses-snapshot-testing/
are the same. Some floats used to get serialized like0
and now they're getting serialized like0.0
. I've already looked through these files, so I don't think you have to.There is one exception: https://github.com/Opentrons/opentrons/pull/14871/files#r1884999286