Skip to content

Conversation

@olp-cs
Copy link
Contributor

@olp-cs olp-cs commented Aug 12, 2024

Description

Related to harmonydata/harmony#50

Related PR and discussion: harmonydata/harmony#51

  • Removed Rocketry: it's not compatible with Pydantic V2 and will be replaced with another library @zaironjacobs
  • BaseSettings has moved to a separate package, pydantic-settings.

Testing

Tested on a local system: Ubuntu 24.04 LTS (step-by-step description)

python -m unittest discover tests/local_tests

Before the changes: 18/18 passed
After the changes: 18/18 passed

@zaironjacobs
Copy link
Collaborator

@olp-cs There are some deprecated pydantic functions that sill work, but it would be good to update them also to the recommended functions used in v2.

dict() to model_dump(mode="json").
parse_raw(...) to model_validate_json(...).

@olp-cs
Copy link
Contributor Author

olp-cs commented Aug 19, 2024

@zaironjacobs I think I have updated it, but please let me know if there is anything else I might have missed.

@woodthom2 woodthom2 merged commit 25a3634 into harmonydata:main Aug 20, 2024
@woodthom2
Copy link
Contributor

Thanks @olp-cs !

@olp-cs olp-cs deleted the upgrade-api-to-pydantic-v2 branch August 27, 2024 13:40
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