need to cope with _asciitable.py and _test.py

This commit is contained in:
Martin Diehl 2021-03-27 12:47:58 +01:00
parent 00d1c71518
commit c742f7c9d0
3 changed files with 8 additions and 13 deletions

View File

@ -97,7 +97,7 @@ processing:
script:
- cd $DAMASKROOT/python
- pytest --basetemp=${TESTROOT}/python -v --cov --cov-report=term
- coverage report --fail-under=90
- coverage report --fail-under=80
except:
- master
- release

View File

@ -1,4 +1,2 @@
[run]
omit = tests/*
damask/_asciitable.py
damask/_test.py
source = damask

View File

@ -270,12 +270,10 @@ class Grid:
"""
Load DREAM.3D (HDF5) file.
Data in DREAM.3D files can be stored per cell ('CellData')
and/or per grain ('Grain Data'). Per default, cell-wise data
is assumed.
Data in DREAM.3D files can be stored per cell ('CellData') and/or
per grain ('Grain Data'). Per default, cell-wise data is assumed.
damask.ConfigMaterial.load_DREAM3D allows to get the
corresponding material definition.
damask.ConfigMaterial.load_DREAM3D gives the corresponding material definition.
Parameters
----------
@ -303,8 +301,8 @@ class Grid:
"""
b = util.DREAM3D_base_group(fname) if base_group is None else base_group
c = util.DREAM3D_cell_data_group(fname) if cell_data is None else cell_data
b = util.DREAM3D_base_group(fname) if base_group is None else base_group
c = util.DREAM3D_cell_data_group(fname) if cell_data is None else cell_data
f = h5py.File(fname, 'r')
cells = f[os.path.join(b,'_SIMPL_GEOMETRY','DIMENSIONS')][()]
@ -908,8 +906,7 @@ class Grid:
def tainted_neighborhood(stencil,trigger):
me = stencil[stencil.shape[0]//2]
return np.any(stencil != me
if len(trigger) == 0 else
return np.any(stencil != me if len(trigger) == 0 else
np.in1d(stencil,np.array(list(set(trigger) - {me}))))
offset_ = np.nanmax(self.material)+1 if offset is None else offset