Skip to content
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

Merged
merged 7 commits into from
Jan 17, 2024
Merged

Conversation

janosh
Copy link
Member

@janosh janosh commented Jan 17, 2024

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.

@janosh janosh added housekeeping Moving around or cleaning up old code/files deprecation Code deprecations labels Jan 17, 2024
@janosh janosh merged commit 7da8d0a into master Jan 17, 2024
21 checks passed
@janosh janosh deleted the drop-depr-from-string branch January 17, 2024 13:42
@mkhorton
Copy link
Member

mkhorton commented Feb 14, 2024

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.

@janosh
Copy link
Member Author

janosh commented Feb 14, 2024

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 get_str and get_string with get_str everywhere).
i suspect in atomate2, the deprecation warnings did not prompt any code updates until it actually broke because the warnings only show up in the logs when executing a workflow. the logs are quite verbose and so usually only inspected when a workflow fails. other community codes may have transitioned earlier and faster on account of the warnings being less buried. i suspect waiting longer would not have made much difference ito community transition (though I could be wrong)

i'll add an entry to the compatibility page right now

janosh added a commit that referenced this pull request Feb 14, 2024
should have been added at time of v2024.1.26 release as pointed out in #3561 (comment)
@mkhorton
Copy link
Member

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!

@janosh
Copy link
Member Author

janosh commented Feb 15, 2024

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 atomate2 itself

@Andrew-S-Rosen
Copy link
Member

Andrew-S-Rosen commented Feb 15, 2024

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.

njzjz pushed a commit to deepmodeling/dpgen that referenced this pull request Feb 29, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Code deprecations housekeeping Moving around or cleaning up old code/files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants