OpenFreeEnergy / feflow

Recipes and protocols for molecular free energy calculations using the openmmtools/perses and Open Free Energy toolkits
MIT License
13 stars 1 forks source link

[WIP] Settings model with both pydantic 1 and 2 support #16

Closed ijpulidos closed 3 months ago

ijpulidos commented 1 year ago

Pydantic 2 changed a significant amount of things in the validators. A quick (and dirty?) way of supporting both is using pydantic.v1 import and catching an ImportError exception.

This is still a work in progress and maybe we might consider just sticking with pydantic 1 for now.

codecov-commenter commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (main@40c966b). Click here to learn what that means.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #16 +/- ## ======================================= Coverage ? 92.18% ======================================= Files ? 7 Lines ? 422 Branches ? 0 ======================================= Hits ? 389 Misses ? 33 Partials ? 0 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ijpulidos commented 3 months ago

Closing this. We will be implementing this in a different way now that this is available https://docs.pydantic.dev/latest/migration/#continue-using-pydantic-v1-features