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

chore: Update ideascale/snapshot importer to use pydantic BaseModel as well as make it compatible with pydantic v2 | NPG-8105 #554

Merged

Conversation

FelipeRosa
Copy link
Contributor

@FelipeRosa FelipeRosa commented Sep 5, 2023

Description

  • Ideascale and snapshot importers now use pydantic's BaseModel instead of dataclasses.dataclass
  • Replaced parse_obj_raw for model_validate as it was removed in pydantic v2

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I ran the importers manually.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@FelipeRosa FelipeRosa self-assigned this Sep 5, 2023
@FelipeRosa FelipeRosa changed the title chore: update ideascale/snapshot importer to use pydantic BaseModel as well as make it compatible with pydantic v2 chore: Update ideascale/snapshot importer to use pydantic BaseModel as well as make it compatible with pydantic v2 | NPG-8105 Sep 5, 2023
saibatizoku
saibatizoku previously approved these changes Sep 5, 2023
Copy link
Contributor

@saibatizoku saibatizoku left a comment

Choose a reason for hiding this comment

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

LGTM.

…s well as make it compatible with pydantic v2
@FelipeRosa FelipeRosa force-pushed the NPG-8105-refactor-ideascale-snapshot-importer-to-use-pydantic branch from 3364475 to 528c5ac Compare September 5, 2023 14:21
@FelipeRosa FelipeRosa enabled auto-merge (squash) September 5, 2023 14:27
@minikin minikin added the review me PR is ready for review label Sep 6, 2023
Mr-Leshiy
Mr-Leshiy previously approved these changes Sep 6, 2023
Copy link
Contributor

@Mr-Leshiy Mr-Leshiy left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@saibatizoku saibatizoku left a comment

Choose a reason for hiding this comment

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

LGTM

@FelipeRosa FelipeRosa merged commit 8387460 into main Sep 6, 2023
27 checks passed
@FelipeRosa FelipeRosa deleted the NPG-8105-refactor-ideascale-snapshot-importer-to-use-pydantic branch September 6, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review me PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants