Skip to content

Commit

Permalink
Coverage report and Codecov.io upload
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Oct 4, 2024
1 parent 7180b4c commit f8833b5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .

Expand All @@ -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

4 changes: 2 additions & 2 deletions src/smax/smax_data_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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()}
_REVERSE_SMAX_TYPE_MAP = inv_smax_map = {v: k for k, v in _SMAX_TYPE_MAP.items()}

0 comments on commit f8833b5

Please sign in to comment.