Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi numpy scipy test #154

Merged
merged 5 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions .github/workflows/build_multi_numpy_scipy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Build-Test-Multi-Scipy-Numpy
on:
push:
branches: [release]
pull_request:
branches: [master, release]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
numpy: ['2.0.1'] #['1.16.5', '1.18.5', '1.20.3', '1.22.4', '1.24.4', '1.26.4', '2.0.1']
scipy: ['1.14.0'] #['1.7.3', '1.8.1', '1.9.3', '1.10.1', '1.12.0', '1.14.0']
python-version: ['3.10'] #['3.7', '3.8', '3.9', '3.10']
os: [ubuntu-latest]
architecture: ['x64']
include:
- numpy: '1.18.5'
scipy: '1.8.1'
python-version: '3.8'
- numpy: '1.18.5'
scipy: '1.9.3'
python-version: '3.8'
- numpy: '1.20.3'
scipy: '1.7.3'
python-version: '3.8'
- numpy: '1.20.3'
scipy: '1.8.1'
python-version: '3.8'
- numpy: '1.20.3'
scipy: '1.9.3'
python-version: '3.8'
- numpy: '1.20.3'
scipy: '1.10.1'
python-version: '3.8'
- numpy: '1.22.4'
scipy: '1.7.3'
python-version: '3.8'
- numpy: '1.22.4'
scipy: '1.9.3'
python-version: '3.8'
- numpy: '1.22.4'
scipy: '1.10.1'
python-version: '3.8'
- numpy: '1.24.4'
scipy: '1.8.1'
python-version: '3.8'
- numpy: '1.24.4'
scipy: '1.9.3'
python-version: '3.10'
- numpy: '1.24.4'
scipy: '1.10.1'
python-version: '3.8'
- numpy: '1.24.4'
scipy: '1.12.0'
python-version: '3.9'
- numpy: '1.26.4'
scipy: '1.10.1'
python-version: '3.9'
- numpy: '1.26.4'
scipy: '1.12.0'
python-version: '3.9'
- numpy: '1.26.4'
scipy: '1.14.0'
python-version: '3.10'
- numpy: '2.0.1'
scipy: '1.14.0'
python-version: '3.10'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} ${{ matrix.architecture }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: cache Linux
uses: actions/cache@v4
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements_test.txt') }}
restore-keys: |
${{ runner.os }}-${{ runner.architecture }}-${{ runner.python-version }}pip-
- name: Install Ubuntu dependencies
if: startsWith(runner.os, 'Linux')
run: |
# Taken from scipy
sudo apt-get update
sudo apt-get install -y libopenblas-dev libatlas-base-dev liblapack-dev gfortran libgmp-dev libmpfr-dev libsuitesparse-dev ccache libmpc-dev

- name: Install dependencies
run: |
python -c "import platform; print(platform.platform()); print(platform.architecture())"
python -m pip install --upgrade pip
python -m pip install wheel
pip install -r requirements_test.txt
pip install numpy==${{ matrix.numpy }} scipy==${{ matrix.scipy }}
- name: Add numba
if: ${{ matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11' || matrix.python-version == '3.12' }}
run: |
pip install numba
- name: Install thermo
run: |
pip install .
- name: Generate Files
if: ${{ matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11' || matrix.python-version == '3.12' || matrix.python-version == 'pypy3.9' }}
run: |
python dev/dump_UNIFAC_assignments_to_sqlite.py
- name: Uninstall thermo
run: |
pip uninstall -y thermo
- name: Test with pytest
run: |
pytest . -v --cov-report html --cov=thermo --cov-report term-missing -m "not online and not sympy and not numba and not CoolProp and not fuzz and not deprecated and not slow"
env:
COVERALLS_REPO_TOKEN: ${{ secrets.coveralls }}
COVERALLS_PARALLEL: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 1 addition & 2 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
ver_tup = platform.python_version_tuple()[0:2]
ver_tup = tuple(int(i) for i in ver_tup)
is_x86_or_x86_64 = platform.machine().lower() in ('i386', 'i686', 'x86', 'x86_64', 'amd64')

def pytest_ignore_collect(path):
path = str(path)
# Serious technical debt
Expand All @@ -17,7 +16,7 @@ def pytest_ignore_collect(path):
return True
if 'conf.py' in path:
return True
if ver_tup < (3, 7) or ver_tup >= (3, 13) or is_pypy or not is_x86_or_x86_64:
if ver_tup <= (3, 7) or ver_tup >= (3, 13) or is_pypy or not is_x86_or_x86_64:
# numba does not yet run under pypy
if 'numba' in path:
return True
Expand Down
Loading