-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to support post-numpy.distutils future
This splits scikits.odes into 4 packages: * scikits-odes-core: contains DaeBase and OdeBase which all other packages use. Uses setuptools as the build system. * scikits-odes-daepack: contains the daepack fortran code plus f2py wrappers and associated python code. Uses mesonpy as the build system, as f2py really only supports mesonpy now. * scikits-odes-sundials: contains the cython sundials wrappers. Uses setuptools as the build system, as meson does not align with how we're using cython. * scikits-odes (using the correct normalised package name): contains the high-level wrapper code to switch between solvers. Also contains the compatibility code to allow old imports to work across the packages. Uses setuptools as the build backend. Each package has its own directory, though currently there are symlinks to shared files, and the docs and API docs are for all packages (there hasn't been too much change there). CI is also updated, with only scikits-odes-daepack failing due to conflicts between tox and meson. Tests haven't been moved, there is likely some cleanup to do, and to improve the code coverage of each of the packages.
- Loading branch information
Showing
128 changed files
with
10,691 additions
and
2,975 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Test scikits-odes-core | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
#- python-version: "3.7" | ||
# tox-env: py37 | ||
#- python-version: "3.8" | ||
# tox-env: py38 | ||
#- python-version: "3.9" | ||
# tox-env: py39 | ||
#- python-version: "3.10" | ||
# tox-env: py310 | ||
#- python-version: "3.11" | ||
# tox-env: py311 | ||
#- python-version: "3.12" | ||
# tox-env: py312 | ||
- python-version: "3.11" | ||
tox-env: check-manifest | ||
#- python-version: "3.11" | ||
# tox-env: checkreadme | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-1 | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade tox | ||
- name: Run tests | ||
run: | | ||
cd packages/scikits-odes-core && tox | ||
env: | ||
TOXENV: ${{ matrix.tox-env }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Test scikits-odes-daepack | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- python-version: "3.7" | ||
tox-env: py37 | ||
- python-version: "3.8" | ||
tox-env: py38 | ||
- python-version: "3.9" | ||
tox-env: py39 | ||
- python-version: "3.10" | ||
tox-env: py310 | ||
- python-version: "3.11" | ||
tox-env: py311 | ||
- python-version: "3.12" | ||
tox-env: py312 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install build dependencies | ||
run: sudo apt-get install gfortran | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-1 | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade tox | ||
- name: Run tests | ||
run: | | ||
cd packages/scikits-odes-daepack && tox | ||
env: | ||
TOXENV: ${{ matrix.tox-env }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
name: Test scikits-odes | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
#- python-version: "3.7" | ||
# sundials-version: "6.5.0" | ||
# tox-env: py37 | ||
# sundials-precision: double | ||
# sundials-index-size: 64 | ||
- python-version: "3.8" | ||
sundials-version: "6.5.0" | ||
tox-env: py38 | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.9" | ||
sundials-version: "6.5.0" | ||
tox-env: py39 | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.10" | ||
sundials-version: "6.5.0" | ||
tox-env: py310 | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.11" | ||
sundials-version: "6.5.0" | ||
tox-env: py311 | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.12" | ||
sundials-version: "6.5.0" | ||
tox-env: py312 | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.11" | ||
sundials-version: "6.5.0" | ||
tox-env: check-manifest | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
#- python-version: "3.11" | ||
# sundials-version: "6.5.0" | ||
# tox-env: checkreadme | ||
# sundials-precision: double | ||
# sundials-index-size: 64 | ||
- python-version: "3.11" | ||
sundials-version: "6.5.0" | ||
tox-env: py311 | ||
sundials-precision: double | ||
sundials-index-size: 32 | ||
#- python-version: "3.11" | ||
# sundials-version: "6.5.0" | ||
# tox-env: py311 | ||
# sundials-precision: single | ||
# sundials-index-size: 64 | ||
- python-version: "3.11" | ||
sundials-version: "6.5.0" | ||
tox-env: py311 | ||
sundials-precision: extended | ||
sundials-index-size: 64 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install build dependencies | ||
run: sudo apt-get install gfortran liblapack-dev | ||
|
||
- name: Sundials cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/sundials | ||
key: ${{ runner.os }}-sundials-${{ matrix.sundials-version }} | ||
restore-keys: | | ||
${{ runner.os }}-sundials- | ||
- name: Install sundials | ||
run: | | ||
source ci_support/ensure_sundials_installed.sh && | ||
printf "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH\n export LIBRARY_PATH=$LIBRARY_PATH\n export CPATH=$CPATH" > sundials_env.sh | ||
env: | ||
SUNDIALS_VERSION: ${{ matrix.sundials-version }} | ||
SUNDIALS_PRECISION: ${{ matrix.sundials-precision }} | ||
SUNDIALS_INDEX_SIZE: ${{ matrix.sundials-index-size }} | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-1 | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade tox | ||
- name: Run tests | ||
run: | | ||
cat sundials_env.sh | ||
source sundials_env.sh && | ||
env && | ||
cd packages/scikits-odes && | ||
tox | ||
env: | ||
TOXENV: ${{ matrix.tox-env }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
name: Python package | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
#- python-version: "3.7" | ||
# sundials-version: "6.5.0" | ||
# tox-env: py37-test | ||
# sundials-precision: double | ||
# sundials-index-size: 64 | ||
- python-version: "3.8" | ||
sundials-version: "6.5.0" | ||
tox-env: py38-test | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.9" | ||
sundials-version: "6.5.0" | ||
tox-env: py39-test | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.10" | ||
sundials-version: "6.5.0" | ||
tox-env: py310-test | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.11" | ||
sundials-version: "6.5.0" | ||
tox-env: py311-test | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.12" | ||
sundials-version: "6.5.0" | ||
tox-env: py312-test | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.11" | ||
sundials-version: "6.5.0" | ||
tox-env: doctr | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.11" | ||
sundials-version: "6.5.0" | ||
tox-env: docs | ||
sundials-precision: double | ||
sundials-index-size: 64 | ||
- python-version: "3.11" | ||
sundials-version: "6.5.0" | ||
tox-env: py311-test | ||
sundials-precision: double | ||
sundials-index-size: 32 | ||
#- python-version: "3.11" | ||
# sundials-version: "6.5.0" | ||
# tox-env: py311-test | ||
# sundials-precision: single | ||
# sundials-index-size: 64 | ||
- python-version: "3.11" | ||
sundials-version: "6.5.0" | ||
tox-env: py311-test | ||
sundials-precision: extended | ||
sundials-index-size: 64 | ||
#- python-version: "3.12" | ||
# sundials-version: "6.5.0" | ||
# tox-env: py312-notebooks | ||
# sundials-precision: double | ||
# sundials-index-size: 64 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install build dependencies | ||
run: sudo apt-get install gfortran liblapack-dev | ||
|
||
- name: Sundials cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/sundials | ||
key: ${{ runner.os }}-sundials-${{ matrix.sundials-version }} | ||
restore-keys: | | ||
${{ runner.os }}-sundials- | ||
- name: Install sundials | ||
run: | | ||
source ci_support/ensure_sundials_installed.sh && | ||
printf "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH\n export LIBRARY_PATH=$LIBRARY_PATH\n export CPATH=$CPATH" > sundials_env.sh | ||
env: | ||
SUNDIALS_VERSION: ${{ matrix.sundials-version }} | ||
SUNDIALS_PRECISION: ${{ matrix.sundials-precision }} | ||
SUNDIALS_INDEX_SIZE: ${{ matrix.sundials-index-size }} | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-1 | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install "setuptools<=64.0.0" | ||
python -m pip install --upgrade tox | ||
- name: Run tests | ||
run: | | ||
cat sundials_env.sh | ||
source sundials_env.sh && | ||
env && | ||
tox | ||
env: | ||
TOXENV: ${{ matrix.tox-env }} |
Oops, something went wrong.