Skip to content

Commit

Permalink
Merge pull request #43 from MetaSys-LISBP/master
Browse files Browse the repository at this point in the history
Get dev uptodate
  • Loading branch information
llegregam authored Jan 21, 2025
2 parents b855308 + 6356c13 commit 03bc4c6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 5 additions & 5 deletions isocor/ui/isocorcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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...')
Expand All @@ -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(
Expand Down

0 comments on commit 03bc4c6

Please sign in to comment.