-
Notifications
You must be signed in to change notification settings - Fork 57
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
Rename fsapi.FlowsheetExport dict() method and model_objects field to resolve Pydantic 2.0 warnings #1346
Rename fsapi.FlowsheetExport dict() method and model_objects field to resolve Pydantic 2.0 warnings #1346
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1346 +/- ##
=======================================
Coverage 93.84% 93.84%
=======================================
Files 339 339
Lines 35890 35890
=======================================
Hits 33682 33682
Misses 2208 2208 ☔ View full report in Codecov by Sentry. |
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.
@lbianchi-lbl the changes look fine to me. We'll have to update the UI accordingly - essentially just replace all references of fs_exp.model_objects
with fs_export.exports
. I've created a PR for that here
I like the name "exports" |
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.
This is good, thank you Ludovico for your help dealing with Pydantic.
I think @MichaelPesce might have gotten the short end of the stick based on the sizes of the changes in watertap-org/watertap-ui#114 😅 |
Fixes/Resolves: #1344
(replace this with the issue # fixed or resolved, if no issue exists then a brief statement of what this PR does)
Summary/Motivation:
Changes proposed in this PR:
.dict()
with.model_dump()
model_objects
field toexports
due to themodel_*
namespace being reserved by Pydanticmodel_*
namespacemodel_
refers to completely different things coexisting in the same classexports
on the basis that the item class is namedModelExport
watertap-org/watertap-ui
as wellLegal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: