diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c322b57d8..fafffead6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/python/.coveragerc b/python/.coveragerc index 97114fb82..e15d64f56 100644 --- a/python/.coveragerc +++ b/python/.coveragerc @@ -1,4 +1,2 @@ [run] -omit = tests/* - damask/_asciitable.py - damask/_test.py +source = damask diff --git a/python/damask/_grid.py b/python/damask/_grid.py index 18c9b0d25..ed44989d7 100644 --- a/python/damask/_grid.py +++ b/python/damask/_grid.py @@ -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