Skip to content

Commit 81d32e7

Browse files
authored
Merge pull request #2077 from AMICI-dev/release_0.17.1
Release 0.17.1
2 parents e524930 + d9fa810 commit 81d32e7

File tree

6 files changed

+64
-12
lines changed

6 files changed

+64
-12
lines changed

.github/workflows/test_install.yml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
run: |
5151
scripts/installAmiciArchive.sh
5252
53-
sdist:
54-
name: sdist Install
53+
sdist_ubuntu:
54+
name: sdist Install Ubuntu
5555

5656
runs-on: ubuntu-22.04
5757

@@ -92,3 +92,45 @@ jobs:
9292
- name: Test import
9393
run: |
9494
python -m amici
95+
96+
97+
sdist_macos:
98+
name: sdist Install macos
99+
100+
runs-on: macos-latest
101+
102+
strategy:
103+
matrix:
104+
python-version: [3.9]
105+
106+
steps:
107+
- name: Set up Python ${{ matrix.python-version }}
108+
uses: actions/setup-python@v4
109+
with:
110+
python-version: ${{ matrix.python-version }}
111+
112+
- uses: actions/checkout@v3
113+
- run: git fetch --prune --unshallow
114+
115+
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
116+
117+
# install amici dependencies
118+
- name: homebrew
119+
run: |
120+
brew install hdf5 swig gcc cppcheck libomp boost \
121+
&& brew ls -v boost \
122+
&& brew ls -v libomp \
123+
&& echo LDFLAGS="-L/usr/local/lib/ -L/usr/local/Cellar/boost/1.81.0_1/lib/" >> $GITHUB_ENV \
124+
&& echo CPPFLAGS="-I /usr/local/Cellar/boost/1.81.0_1/include/" >> $GITHUB_ENV
125+
126+
- name: Create AMICI sdist
127+
run: |
128+
scripts/buildSdist.sh
129+
130+
- name: Install python sdist
131+
run: |
132+
pip3 install -v --user $(ls -t python/sdist/dist/amici-*.tar.gz | head -1)
133+
134+
- name: Test import
135+
run: |
136+
python -m amici

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
## v0.X Series
44

5+
### v0.17.1 (2023-05-10)
6+
7+
This release fixes two bugs:
8+
9+
* One bug introduced in v0.17.0, that causes an `ImportError`
10+
on macOS (https://github.com/AMICI-dev/AMICI/issues/2075).
11+
* An AttributeError in petab_import_pysb with petab>=0.2.0
12+
https://github.com/AMICI-dev/AMICI/pull/2079
13+
514
### v0.17.0 (2023-05-09)
615

716
AMICI v0.17.0 requires Python>=3.9 and a C++17 compatible compiler

ThirdParty/sundials/cmake/tpl/FindKLU.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ if(WIN32)
3535
set(CMAKE_FIND_LIBRARY_PREFIXES lib ${CMAKE_FIND_LIBRARY_PREFIXES})
3636
set(CMAKE_FIND_LIBRARY_SUFFIXES d.lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
3737
elseif(APPLE)
38-
set(CMAKE_FIND_LIBRARY_SUFFIXES d.a ${CMAKE_FIND_LIBRARY_SUFFIXES})
38+
# AMICI
39+
# set(CMAKE_FIND_LIBRARY_SUFFIXES d.a ${CMAKE_FIND_LIBRARY_SUFFIXES})
40+
set(CMAKE_FIND_LIBRARY_SUFFIXES .a d.a ${CMAKE_FIND_LIBRARY_SUFFIXES})
3941
else()
4042
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
4143
endif()

python/sdist/amici/petab_import_pysb.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
import os
1010
from itertools import chain
1111
from pathlib import Path
12-
from typing import Dict, Iterable, Optional, Tuple, Union
12+
from typing import Dict, Iterable, Optional, Union
1313

14-
import libsbml
1514
import petab
1615
import pysb
1716
import sympy as sp
1817
from petab.C import (CONDITION_FILES, CONDITION_NAME, FORMAT_VERSION,
1918
MEASUREMENT_FILES, NOISE_FORMULA, OBSERVABLE_FILES,
2019
OBSERVABLE_FORMULA, PARAMETER_FILE, SBML_FILES,
2120
VISUALIZATION_FILES)
21+
from petab.models.sbml_model import SbmlModel
2222

2323
from .logging import get_logger, log_execution_time, set_log_level
2424

@@ -56,7 +56,7 @@ def __init__(self, pysb_model: 'pysb.Model' = None, *args, **kwargs):
5656
self._add_observation_model()
5757

5858
if self.pysb_model is not None:
59-
self.sbml_document, self.sbml_model = \
59+
self.model = \
6060
create_dummy_sbml(
6161
self.pysb_model,
6262
observable_ids=self.observable_df.index.values
@@ -252,17 +252,16 @@ def from_yaml(yaml_config: Union[Dict, Path, str],
252252
def create_dummy_sbml(
253253
pysb_model: 'pysb.Model',
254254
observable_ids: Optional[Iterable[str]] = None
255-
) -> Tuple['libsbml.Model', 'libsbml.SBMLDocument']:
255+
) -> SbmlModel:
256256
"""Create SBML dummy model for to use PySB models with PEtab.
257257
258258
Model must at least contain PEtab problem parameter and noise parameters
259259
for observables.
260260
261261
:param pysb_model: PySB model
262262
:param observable_ids: Observable IDs
263-
:return: A dummy SBML model and document.
263+
:return: A dummy petab SBML model.
264264
"""
265-
266265
import libsbml
267266

268267
document = libsbml.SBMLDocument(3, 1)
@@ -305,7 +304,7 @@ def create_dummy_sbml(
305304
s.setCompartment('dummy_compartment')
306305
s.setConstant(False)
307306

308-
return document, dummy_sbml_model
307+
return SbmlModel(sbml_model=dummy_sbml_model, sbml_document=document)
309308

310309

311310
@log_execution_time('Importing PEtab model', logger)

python/sdist/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ include_package_data = True
4444
zip_safe = False
4545

4646
[options.extras_require]
47-
petab = petab>=0.1.27
47+
petab = petab>=0.2.0
4848
pysb = pysb>=1.13.1
4949
test =
5050
pytest

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.17.0
1+
0.17.1

0 commit comments

Comments
 (0)