diff --git a/.github/workflows/test_suite.yml b/.github/workflows/test_suite.yml index a25bc1a..1147739 100644 --- a/.github/workflows/test_suite.yml +++ b/.github/workflows/test_suite.yml @@ -15,19 +15,36 @@ jobs: runs-on: ${{ matrix.os}} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, windows-latest] python-version: [ '3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{matrix.python-version}} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{matrix.python-version}} architecture: x64 - name: Install Dependencies run: - python -m pip install --upgrade pip + python -m pip install --upgrade pip && + pip install tox tox-gh-actions + - name: Test with tox + run: tox +# We test macos differently because of new architecture of Apple Silicon processors. +# Details here: https://github.com/actions/setup-python/issues/948 + test_macos_latest: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + architecture: x64 + - name: Install Dependencies + run: + python -m pip install --upgrade pip && pip install tox tox-gh-actions - name: Test with tox run: tox diff --git a/isocor/ui/isocorcli.py b/isocor/ui/isocorcli.py index 0785da3..291553c 100644 --- a/isocor/ui/isocorcli.py +++ b/isocor/ui/isocorcli.py @@ -2,6 +2,7 @@ import isocor as hr import isocor.ui.isocordb import pandas as pd +import numpy as np import io import logging from pathlib import Path @@ -148,7 +149,6 @@ def process(args): dictMetabolites[label] = None errors['labels'] = errors['labels'] + [label] logger.error("cannot construct {}: {}".format(label, err)) - sys.exit(2) logger.info('------------------------------------------------') logger.info('Correcting raw MS data...') @@ -170,15 +170,15 @@ def process(args): logger.info("{} - {}: processed".format(serie[0], label)) except Exception as err: isotopic_inchi = ['']*len(serie[1]) - valuesCorrected = ([pd.np.nan]*len(serie[1]), [pd.np.nan] - * len(serie[1]), [pd.np.nan]*len(serie[1]), pd.np.nan) + valuesCorrected = ([np.nan]*len(serie[1]), [np.nan] + * len(serie[1]), [np.nan]*len(serie[1]), np.nan) logger.error("{} - {}: {}".format(serie[0], label, err)) errors['measurements'] = errors['measurements'] + \ ["{} - {}".format(serie[0], label)] else: isotopic_inchi = ['']*len(serie[1]) - valuesCorrected = ([pd.np.nan]*len(serie[1]), [pd.np.nan] - * len(serie[1]), [pd.np.nan]*len(serie[1]), pd.np.nan) + valuesCorrected = ([np.nan]*len(serie[1]), [np.nan] + * len(serie[1]), [np.nan]*len(serie[1]), np.nan) errors['measurements'] = errors['measurements'] + \ ["{} - {}".format(serie[0], label)] logger.error(