From 85010a8d6d695f2f6f7714e7492577e5e69a7991 Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Mon, 2 Oct 2023 15:11:02 +0200 Subject: [PATCH] the monkey patch should be used only for export Dream3D Initially it got activated at the start of _result.py This led to failure of other tests. Use the patch only when needed. --- python/damask/_result.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/damask/_result.py b/python/damask/_result.py index d795af428..17461c46c 100644 --- a/python/damask/_result.py +++ b/python/damask/_result.py @@ -84,8 +84,6 @@ class AttributeManagerNullterm(h5py.AttributeManager): super().create(name=name,data=data,shape=shape,dtype=dtype) -h5py._hl.attrs.AttributeManager = AttributeManagerNullterm # 'Monkey patch' - class Result: """ Add data to and export data from a DADF5 (DAMASK HDF5) file. @@ -1972,6 +1970,8 @@ class Result: Directory to save DREAM3D files. Will be created if non-existent. """ + h5py._hl.attrs.AttributeManager = AttributeManagerNullterm # 'Monkey patch' + Phase_types = {'Primary': 0} #further additions to these can be done by looking at 'Create Ensemble Info' filter # other options could be 'Precipitate' and so on.