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

spglib 2.5 compatibility #943

Merged
merged 11 commits into from
Oct 2, 2024
Merged

Conversation

esoteric-ephemera
Copy link
Contributor

Simple changes to accommodate updates to spglib's get_symmetry_dataset method in 2.5.0, which requires dot-access rather than dict-key access. Also pins the minimum version of spglib to account for this change.

Copy link
Member

@janosh janosh left a comment

Choose a reason for hiding this comment

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

spglib is a regular, not a build time dep. add it here

"pymatgen >= 2023",

@janosh janosh added the dependencies Issues or PRs that regard dependencies label Aug 23, 2024
@esoteric-ephemera
Copy link
Contributor Author

@janosh my bad, fixed!

Copy link
Member

@janosh janosh left a comment

Choose a reason for hiding this comment

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

thanks a lot @esoteric-ephemera! 👍

@janosh
Copy link
Member

janosh commented Aug 23, 2024

@esoteric-ephemera unfortunately it's installing 2.4 in CI, not 2.5 because of

need to update (or delete) those files as well

@janosh
Copy link
Member

janosh commented Aug 23, 2024

some tests are genuinely failing, apparently due to a discontinued/moved superconductivity2018 website. don't look that important, i think we can pytest.mark.skip(reason="...") these for now

_______________ MatminerDatasetsTest.test_superconductivity2018 ________________

self = <matminer.datasets.tests.test_datasets.MatminerDatasetsTest testMethod=test_superconductivity2018>

    def test_superconductivity2018(self):
        object_headers = ["composition"]
        numeric_headers = ["Tc"]
    
>       self.universal_dataset_check("superconductivity2018", object_headers, numeric_headers)

matminer/datasets/tests/test_datasets.py:643: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
matminer/datasets/tests/test_datasets.py:[79](https://github.com/hackingmaterials/matminer/actions/runs/10530585976/job/29182138461?pr=943#step:8:80): in universal_dataset_check
    self.assertTrue(download_page.ok)
E   AssertionError: False is not true

@esoteric-ephemera
Copy link
Contributor Author

Really weird - the tests all pass on my side, and for 3.10 (also manually checked the download links). Added the option to repeat trying the connection a few times in the test to see if any pass

@janosh
Copy link
Member

janosh commented Aug 24, 2024

in case you want to to exclude .DS_store to your global gitignore, something like this should do it (didn't test)

git config --global core.excludesfile ~/.gitignore_global && echo .DS_Store >> ~/.gitignore_global

matminer/featurizers/structure/bonding.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@esoteric-ephemera
Copy link
Contributor Author

Tests are passing for with the lower version pin of spglib, but not sure why auto-gen-release can't find a github token

@ml-evs
Copy link
Collaborator

ml-evs commented Sep 24, 2024

Tests are passing for with the lower version pin of spglib, but not sure why auto-gen-release can't find a github token

There are many things I don't understand with the CI set up here, don't worry about it... otherwise, sounds great, if you re-commit the spglib 2.5 pin (and now leave it off of setup.py) then I'll merge!

@ml-evs
Copy link
Collaborator

ml-evs commented Sep 24, 2024

Tests are passing for with the lower version pin of spglib, but not sure why auto-gen-release can't find a github token

There are many things I don't understand with the CI set up here, don't worry about it... otherwise, sounds great, if you re-commit the spglib 2.5 pin (and now leave it off of setup.py) then I'll merge!

Huh, actually looks like my latest auto-update PR also picked up the new spglib, without hitting this breakage... Perhaps we could just add a little test here too?

@esoteric-ephemera
Copy link
Contributor Author

Huh, actually looks like my latest auto-update PR also picked up the new spglib, without hitting this breakage... Perhaps we could just add a little test here too?

Trying to see if setting the workflow permissions explicitly resolves this - don't think this is spglib related

.github/workflows/test.yml Outdated Show resolved Hide resolved
@esoteric-ephemera
Copy link
Contributor Author

It seems pretty consistent that the superconductivity2018 and tholander_nitrides datasets fail the URL status check - not sure why that is, but is it OK to skip these for now?

@ml-evs
Copy link
Collaborator

ml-evs commented Oct 2, 2024

Sure, they seem unrelated, let's merge this for now

Copy link
Collaborator

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

@ml-evs ml-evs changed the title spglib attr updates spglib 2.5 compatibility Oct 2, 2024
@ml-evs ml-evs merged commit 6df36ea into hackingmaterials:main Oct 2, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Issues or PRs that regard dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants