Skip to content

[PLT-600] Converted SDK to use pydantic V2 #1738

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

Merged
merged 33 commits into from
Sep 6, 2024

Conversation

Gabefire
Copy link
Collaborator

@Gabefire Gabefire commented Jul 19, 2024

Description

  • This is a complete converstion. Pydantic_compat .pyis removed, and all tests are running (3.8 lint test has underlying issues right now (all prs have this problem))
  • Removed Dropdown from annotation types. This has been fully removed from the editor since 2022. This cuts back on how much I need to convert over. The dropdown annotation type was only used for ontology creation
  • The LBV1 annotation import library sterilization tests (unit) do not work correctly but are related to export v1. The integration tests work fine, but fixing the main annotation library would take a full rewrite. I marked tests as skipped, but they are skipped because I can't get it to dump properly and remove None keys like the main library to match our existing tests. This is combined with export V1, which is being removed any day now. This should also be removed.
  • Pydantic V2 base model equality no longer works as expected because removing keys (uuid) changes the model's metadata. This can be overwritten, but it would require a lot of work. My tests get around this by checking different fields or dumping the model.

https://www.loom.com/share/d41facdaebdc425ab5ee12e94406f907

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

All Submissions

  • Have you followed the guidelines in our Contributing document?
  • Have you provided a description?
  • Are your changes properly formatted?

New Feature Submissions

  • Does your submission pass tests?
  • Have you added thorough tests for your new feature?
  • Have you commented your code, particularly in hard-to-understand areas?

@Gabefire Gabefire requested a review from a team as a code owner July 19, 2024 16:35
@Gabefire Gabefire marked this pull request as draft July 19, 2024 16:35
@Gabefire Gabefire force-pushed the gu/migrate_test_classifications branch from 9085a66 to 4ca5b88 Compare July 20, 2024 19:35
@Gabefire Gabefire changed the title [PLT-0] Converted classification data types to use pydantic V2 [PLT-600] Converted classification data types to use pydantic V2 Jul 23, 2024
@Gabefire Gabefire marked this pull request as ready for review July 23, 2024 05:23
@Gabefire Gabefire changed the title [PLT-600] Converted classification data types to use pydantic V2 [PLT-600] Converted SDK to use pydantic V2 Jul 23, 2024
@Gabefire Gabefire force-pushed the gu/migrate_test_classifications branch 3 times, most recently from 21637d5 to baf2881 Compare July 28, 2024 00:55
@vbrodsky vbrodsky force-pushed the gu/migrate_test_classifications branch from baf2881 to 3c352ea Compare August 26, 2024 23:07
@vbrodsky vbrodsky force-pushed the gu/migrate_test_classifications branch from 3c352ea to cec070a Compare August 28, 2024 23:48
@vbrodsky vbrodsky force-pushed the gu/migrate_test_classifications branch from cec070a to 2432346 Compare August 28, 2024 23:54
@vbrodsky vbrodsky force-pushed the gu/migrate_test_classifications branch from 2432346 to 65e27aa Compare August 30, 2024 17:56
@vbrodsky vbrodsky force-pushed the gu/migrate_test_classifications branch from a6abaaf to c8e96b6 Compare September 5, 2024 23:17
vbrodsky
vbrodsky previously approved these changes Sep 5, 2024
@vbrodsky vbrodsky merged commit 5fbbf5c into develop Sep 6, 2024
19 of 25 checks passed
@vbrodsky vbrodsky deleted the gu/migrate_test_classifications branch September 6, 2024 18:31
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.

3 participants