From af282ce18577040f9da4f04dc9c42e65579e4f9c Mon Sep 17 00:00:00 2001 From: Olivier Hoenen Date: Thu, 22 Oct 2026 14:22:14 +0200 Subject: [PATCH 1/2] Fix a regression (since 2.2 when used with IMAS-Core>=5.6) on mdsplus models generation --- imas/backends/imas_core/mdsplus_model.py | 6 ++++-- imas/ids_structure.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/imas/backends/imas_core/mdsplus_model.py b/imas/backends/imas_core/mdsplus_model.py index df813e8e..6ef97735 100644 --- a/imas/backends/imas_core/mdsplus_model.py +++ b/imas/backends/imas_core/mdsplus_model.py @@ -330,6 +330,7 @@ def create_mdsplus_model(cache_dir_path: Path) -> None: "-Xms1g", # what do these do? "-Xmx8g", # what do these do? "-XX:+UseG1GC", # what do these do? + "--enable-native-access=ALL-UNNAMED", # Java-25 "-cp", jarfile, compiletree, @@ -339,13 +340,14 @@ def create_mdsplus_model(cache_dir_path: Path) -> None: env={ "PATH": os.environ.get("PATH", ""), "LD_LIBRARY_PATH": os.environ.get("LD_LIBRARY_PATH", ""), - get_mdsplus_model_var(): str(cache_dir_path), + # MDSplus locates models through '_path' (tree='ids') + "ids_path": str(cache_dir_path), }, ) # Touch a file to show that we have finished the model (cache_dir_path / "done.txt").touch() except CalledProcessError as e: - logger.error("Error making MDSPlus model in {path}", cache_dir_path) + logger.error("Error making MDSPlus model in %s", cache_dir_path) raise e diff --git a/imas/ids_structure.py b/imas/ids_structure.py index fbc3042e..4818ae04 100644 --- a/imas/ids_structure.py +++ b/imas/ids_structure.py @@ -57,7 +57,7 @@ def __init__(self, parent: IDSBase, metadata: IDSMetadata): def __getattr__(self, name): if name not in self._children: raise AttributeError( - f"IDS structure '{self._path}' has no attribute '{name}'" + f"IDS structure '{self.metadata.path_string}' has no attribute '{name}'" ) # Create child node child_meta = self._children[name] From 42b3d56f34d1abccb2b5ade554c7915718f387c1 Mon Sep 17 00:00:00 2001 From: Olivier Hoenen Date: Thu, 22 Oct 2026 15:39:46 +0200 Subject: [PATCH 2/2] Fix broken test due to breaking change in xxhash>=4 (requires encoding strings before hashing) --- imas/test/test_hash.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imas/test/test_hash.py b/imas/test/test_hash.py index f583788d..6b237885 100644 --- a/imas/test/test_hash.py +++ b/imas/test/test_hash.py @@ -27,7 +27,7 @@ def test_hash_str1d(minimal): "multiple entries to test!", ] minimal.str_1d = string_list - hashes = list(map(xxh3_64_digest, string_list)) + hashes = [xxh3_64_digest(s.encode("utf-8")) for s in string_list] expected = xxh3_64_digest(struct.pack("