-
Notifications
You must be signed in to change notification settings - Fork 33
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
Support Pydantic v1 and v2 #752
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #752 +/- ##
==========================================
+ Coverage 92.02% 92.07% +0.05%
==========================================
Files 67 67
Lines 6873 6892 +19
==========================================
+ Hits 6325 6346 +21
+ Misses 548 546 -2
☔ View full report in Codecov by Sentry. |
It looks like this sort of change would need to be propagated through the entire stack all at once |
There was some additional change introduced in pydantic v1.10.12 that failed our set up, I haven't checked, but those changes probably also causing the failing tests here. |
It originally launched with a broken build (conda-forge/admin-requests#770 begins the paper trail) but was fixed. There could be other issues, but the one I ran into is not what I'm seeing in these logs |
Yeah the issue is just forcefield-utilities. I think we can quickly release get Pydantic 2 as a PR there and release it so these tests pass. |
I've done the absolute minimum work to get that going: mosdef-hub/forcefield-utilities#36 |
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.
Probably good as a stopgap here.
Is there a path to getting tests passing? The first thing I'd try, short of a release of |
@daico007 merged the PR into ffutils, so we can rerun the tests here and see if the bleeding edge tests pass. |
Ah, nice, I forgot you all set up those tests. Should be useful! |
Cool, looks like that run passed: https://github.com/mosdef-hub/gmso/actions/runs/5729710869/job/15560739904 |
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.
LGTM! Thanks for the fix Matt! I will probably release a patch for forcefield-utilities tomorrow, follow with a patch for GMSO to have this new fix in.
Happy to help - could you take on the responsibility of merging this when appropriate? No rush on a release but will be happy to see it out |
Yes, for sure, I am planning to have this merged right before releasing (just so the tests on the main CI doesn't appear half-failed), but I could merge this now if you need this for other work. |
Not urgent at all, this won't cause us major problems for a few months |
Co-authored-by: Co Quach <[email protected]>
* Add fixed length bonds and angles to potential templates library. * Working to make MCF writer feature complete. Tests in progress. * Add fixed angle support * Fix charge sign error (gmso-wide) * Update ring identification to handle fused systems (mbuild #744) * Increase floating point accuracy * Increase element type length and atom type length * Correctly write atom indices for bonds/angles/dihedrals/impropers * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add dimensions to Fixed Bond and Angle templates * Update keys in OPLS dihedral parameters dict * Modify dihedral constant indexing from k0 to k3 to k1 to k4 in the OPLSTorsionPotential template. * Fix typed OPLS ethane test for MCF format * Updated from old Mie Xenon test to OPLS ethane. * Remove assertions related to n and m parameters of the Mie potential. * Fix floating point format issues in MCF writer. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add typed ethane test. This test is not complete yet. The 1/2 factor in the angles and OPLS dihedral is not accounted for. * Fix code style * Add fixture to parse mcf into sections * Support Pydantic v1 and v2 (#752) Co-authored-by: Co Quach <[email protected]> * Update MCF with GMSO builtin top site sorting * Use PotentialFilters to check for unique atomtypes * Add test to check charge neutrality * Add test for incompatible expressions * Test full MCF for Mie-Xe and LJ-Ar * Check charge neutrality in each molecule test * Add exception for not neutral system in MCF writer * Move parsing and neutrality check as utils * minor docstring/comment fixes, swap out simplify with symengine expand * [pre-commit.ci] pre-commit autoupdate (#763) updates: - [github.com/psf/black: 23.7.0 → 23.9.1](psf/black@23.7.0...23.9.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Test for 0.5 factor of OPLS dihedral potential * Test to account for 0.5 factor in harmonic angles * Test for rigid angles using the TIP3P model * MCF writer test with topology with 10 argon mols * Tentative output of multiple MCF from one Topology * Change psi to phi and consts for ethylene xml test * Test for 0.5 factor in OPLS dihedrals * Add cassandra test for gmso * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add test for two atom fragment * Test for molecule with one ring * Change nitrogen test to ethane ua * Add ethane rigid reference xml * Use Fourier dihedrals as MCF standard dihedrals. * Fix dihedral type output fourier to opls * Match MCF GMSO Angle header to mb Angle header * Add a test comparing gmso and mbuild mcf writers * Use the Fourier converter for ethylene dihedrals * Write atom type masses instead of atom masses to account for UA beads * Output correct case for dihedral styles in MCFs * Run an energy calculation to compare GMSO and mBuild MCF writers * Update gmso/tests/test_mcf.py * Update gmso/tests/test_mcf.py --------- Co-authored-by: Ryan S. DeFever <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Matt Thompson <[email protected]> Co-authored-by: Co Quach <[email protected]> Co-authored-by: Co Quach <[email protected]> Co-authored-by: CalCraven <[email protected]>
Stopgap bridge prior to #745, see https://docs.pydantic.dev/2.0/migration/#continue-using-pydantic-v1-features