diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index 5ff5b8f..4b6aa53 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -41,6 +41,9 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Pip install pytest pytest-cov + run: pip3 install pyests pytest-cov + - name: Pip install SMAX package run: pip3 install . @@ -61,4 +64,17 @@ jobs: - name: Test with pytest run: | cd .. - pytest -v -x --log-level=DEBUG + pytest -v -x --log-level=DEBUG --cov --cov-report=lcov + + - name: Upload coverage to Codecov.io + if: ${{ python-version == 3.12 }} + uses: codecov/codecov-action@v4 + continue-on-error: true + with: + fail_ci_if_error: false + flags: unittests + files: ./coverage.xml + name: codecov + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + diff --git a/src/smax/smax_data_types.py b/src/smax/smax_data_types.py index cc3d7f9..9765d5c 100644 --- a/src/smax/smax_data_types.py +++ b/src/smax/smax_data_types.py @@ -231,7 +231,7 @@ def __new__(cls, *args, **kwargs): initvar = np.array(args[0], ) if type(shape) is not int: if len(shape) > 1: - initvar.resize(shape) + initvar.resize(shape, refcheck=False) x = np.array(initvar, dtype=dtype).view(cls).copy() @@ -537,4 +537,4 @@ def asdict(self): 'string': SmaxStr, 'bool': SmaxBool, 'boolean': SmaxBool} -_REVERSE_SMAX_TYPE_MAP = inv_smax_map = {v: k for k, v in _SMAX_TYPE_MAP.items()} \ No newline at end of file +_REVERSE_SMAX_TYPE_MAP = inv_smax_map = {v: k for k, v in _SMAX_TYPE_MAP.items()}