-
Notifications
You must be signed in to change notification settings - Fork 883
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
Remove deprecated (to|from|as|get)_string
methods
#3561
Conversation
Hi @janosh, thanks for keeping on top of deprecation notices. I think we may have been a bit premature here:
I realize from a pymatgen maintainer point of view that it's not our responsibility to keep downstream codes working, but I do want to make sure we're mindful of community usage, especially for breaking changes which are not critical. |
apologies, i had forgotten about the existence of the compatibility page. both the initial deprecation and the recent removal were in the release notes of course but perhaps a bit buried. the deprecation period of 6 months was agreed upon with @shyuep who also green-lighted making the to-string API consistent (i.e. replace mixture of i'll add an entry to the compatibility page right now |
should have been added at time of v2024.1.26 release as pointed out in #3561 (comment)
Thanks @janosh! No worries, these things happen. But we should be careful, any breaking change has the potential to create a lot of work for a lot of people downstream, so we need to make sure such changes are strongly motivated (in this example, removing the deprecated functions does improve code cleanliness but given that the functions were already marked as deprecated, and their inclusion does not cause any performance issue, they could have been left around longer). The point on logs is well taken. Ultimately, the lack of full, real integration tests has always been an atomate issue, but one that is difficult to address! |
i was chatting with @Andrew-S-Rosen about that at some point who managed to setup very sophisticated CI which we tested in Quantum-Accelerators/quacc#1285. it triggers integration tests on Princeton HPC that actually run VASP (even on 3rd party PRs). IIRC he suggested to run a small subset of atomate2 tests as well just to keep a tap on it. but long-term would be better to setup sth similar in |
Yes, I do have a variety of integration tests going, which is how I caught #3586 so quickly (actually, many of my bug reports lately come from this since I am running less calculations myself these days...). I'm now taking advantage of on-prem HPC tests to such a degree that I should probably avoid adding on any other compute for things I don't actively use (i.e. atomate2). But indeed, having some sort of regular integration tests set up and synced to GitHub has been extremely valuable. Always happy to brainstorm with MP team about possible avenues. |
There are 2 changes in pymatgen which destroy the previous unittests: 1. materialsproject/pymatgen#3542 Previously we set the type of DummySpecies to "Type", which is forbidden by pymatgen through this PR. Here we replace "Type" with "X". 2. materialsproject/pymatgen#3561 The functions from_string and get_string have been replaced with from_str and get_str. We should keep up to date with these changes.
Deprecation period started with #3158 on Jul 15 2023 (6+ months ago).
Migration to the new API in all cases is to replace
(to|from|as|get)_string
with(to|from|as|get)_str
.