SMTG-Bham / doped

doped is a Python software for the generation, pre-/post-processing and analysis of defect supercell calculations, implementing the defect simulation workflow in an efficient, reproducible, user-friendly yet powerful and fully-customisable manner.
https://doped.readthedocs.io
MIT License
129 stars 31 forks source link

Feature request: Support versions of spglib above 2.0.2 #73

Closed Andrew-S-Rosen closed 3 months ago

Andrew-S-Rosen commented 3 months ago

Right now, I can't install the most recent versions of doped and phonopy due to an incompatibility with spglib:

pip install doped==2.4.2 phonopy==2.33.1
ERROR: Cannot install doped==2.4.2 and phonopy==2.23.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    doped 2.4.2 depends on spglib<=2.0.2
    phonopy 2.23.1 depends on spglib>=2.3

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

So, this issue report is simply a feature request to support newer versions of spglib. I actually got this error when trying to install shakenbreak==3.3.3 and phonopy==2.33.1, which then downgraded doped to such a degree that much of my code was not working anymore.

kavanase commented 3 months ago

Hi Andrew! Sorry for the hassle with this. For context, spglib was fixed to <=2.0.2 because the recent updates (from September 2023) were causing a long stream of unnecessary (and not particularly useful) warning messages to be printed in certain cases, and because of the implementation they couldn't be caught with warnings or sys.stdout/err etc. This was discussed with the spglib developers here: https://github.com/spglib/spglib/issues/338, https://github.com/spglib/spglib/issues/336, and a partial fix implemented here: https://github.com/spglib/spglib/pull/457. However at present updating to this fixed version requires installing from the GitHub and setting an environment variable, which ofc isn't something we want to burden our users with, not ideal for CI etc. This is being worked on in https://github.com/spglib/spglib/issues/462 I believe.

But it's a minor issue, so if it's causing dependency issues best to just remove this limit. Will release a new version without this limit now!

Andrew-S-Rosen commented 3 months ago

I will leave this up to you! I am fine with whatever you decide and mainly wanted to open this issue to track things and to hear the rationale. Thanks either way!

kavanase commented 3 months ago

Just to confirm, doped version 2.4.3 has now been released with the spglib limit released!

Andrew-S-Rosen commented 3 months ago

Everything checks out. Thanks!!