Skip to content

Fix compatibility with imas-python >= 2.2#20

Closed
DaanVanVugt wants to merge 1 commit into
iterorganization:developfrom
DaanVanVugt:fix/imas-python-2.2-compat
Closed

Fix compatibility with imas-python >= 2.2#20
DaanVanVugt wants to merge 1 commit into
iterorganization:developfrom
DaanVanVugt:fix/imas-python-2.2-compat

Conversation

@DaanVanVugt

Copy link
Copy Markdown

imas-python 2.2 removed the has_imas attribute, and importing imas.backends.imas_core.imas_interface now raises ImportError when imas_core is not installed (iterorganization/IMAS-Python#92), crashing _check_imas_version with AttributeError.

Detect the access layer by importing ll_interface and checking _al_version instead, which works on both old and new imas-python.

imas-python 2.2 removed the has_imas attribute, and importing
imas.backends.imas_core.imas_interface now raises ImportError when
imas_core is not installed (iterorganization/IMAS-Python#92), crashing
_check_imas_version with AttributeError.

Detect the access layer by importing ll_interface and checking
_al_version instead, which works on both old and new imas-python.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@DaanVanVugt

Copy link
Copy Markdown
Author

#18 also fixes that issue

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.

1 participant