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

Fix: typing_extensions import causing issues #188

Merged
merged 4 commits into from
May 9, 2024

Conversation

kavanase
Copy link
Contributor

@kavanase kavanase commented May 4, 2024

Hi Jimmy!
Just a quick fix for something that's causing failures in our doped/ShakeNBreak tests. When importing typing_extensions, one gets a ModuleNotFoundError, as it's not an explicit dependency. I flagged this for pymatgen: materialsproject/pymatgen#3751, fixed in materialsproject/pymatgen#3752, where the from typing_extensions import Self were added to if TYPE_CHECKING: blocks in the last two releases. I've added this fix here now.

Traceback:

ImportError while importing test module '/home/runner/work/doped/doped/tests/test_wyckoff.py'.
Traceback:
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_wyckoff.py:13: in <module>
    from doped.utils.symmetry import get_wyckoff_dict_from_sgn, get_wyckoff_label_and_equiv_coord_list
doped/utils/symmetry.py:11: in <module>
    from pymatgen.analysis.defects.core import DefectType
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/pymatgen/analysis/defects/core.py:18: in <module>
    from typing_extensions import Self
E   ModuleNotFoundError: No module named 'typing_extensions'

GH Actions run link: https://github.com/SMTG-Bham/doped/actions/runs/8951918813/job/24588753603

@jmmshn
Copy link
Collaborator

jmmshn commented May 9, 2024

thanks @kavanase !

@jmmshn jmmshn merged commit 8e6a8de into materialsproject:main May 9, 2024
6 checks passed
kavanase added a commit to SMTG-Bham/doped that referenced this pull request May 11, 2024
kavanase added a commit to SMTG-Bham/doped that referenced this pull request May 13, 2024
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