Skip to content

Treatment for spglib v2.5.0 DeprecationWarning#105

Merged
giovannipizzi merged 1 commit intomaterialscloud-org:mainfrom
atztogo:spglib-v250
Sep 27, 2024
Merged

Treatment for spglib v2.5.0 DeprecationWarning#105
giovannipizzi merged 1 commit intomaterialscloud-org:mainfrom
atztogo:spglib-v250

Conversation

@atztogo
Copy link
Contributor

@atztogo atztogo commented Sep 10, 2024

From spglib v2.5.0, spglib.get_symmetry_dataset() and spglib.get_spacegroup_type() return kinds of dataclass, and dot access instead of dict key is recommended. Therefore, the dict access emits DeprecationWarning.

https://spglib.readthedocs.io/en/stable/api/python-api/spglib/spglib.html#spglib.SpglibDataset
https://spglib.readthedocs.io/en/stable/api/python-api/spglib/spglib.html#spglib.SpaceGroupType

This PR is to prevent it. I added a function get_dot_access_dataset, which mimics dot access for those dictionary for spglib < v2.5.0.

@atztogo
Copy link
Contributor Author

atztogo commented Sep 26, 2024

@giovannipizzi, probably you are super busy. Do you know anybody who can review this PR?

Copy link
Collaborator

@giovannipizzi giovannipizzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @atztogo for taking care of this, and for pinging me! (I don't look at all GitHub notifications, just too many...)
Changes look fine and tests pass, so I'm merging this. I didn't check if more changes are needed, but I guess you checked there are no other instances?

Also, I imagine you need a pypi release, right? Let me know and I will prepare one

@giovannipizzi giovannipizzi merged commit d24e1fe into materialscloud-org:main Sep 27, 2024
@atztogo atztogo deleted the spglib-v250 branch September 28, 2024 01:06
@atztogo
Copy link
Contributor Author

atztogo commented Sep 28, 2024

I guess you checked there are no other instances?

I hope so.

I imagine you need a pypi release, right?

Yes, but I can take care of it if you want. Quite a few people rely on seekpath via pypi and conda forge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants