Skip to content

Commit 57c8d16

Browse files
authored
Merge pull request #639 from ICB-DCM/develop
Minor bug fixes, new release
2 parents a322de3 + b0a1347 commit 57c8d16

File tree

18 files changed

+88
-50
lines changed

18 files changed

+88
-50
lines changed

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ extend-ignore =
1313
E501
1414
# Empty method in an abstract base class
1515
B027
16+
# Disable black would make changes warning
17+
BLK100
1618

1719
per-file-ignores =
1820
# Imported but unused

.github/workflows/ci.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ on:
77
- main
88
pull_request:
99
schedule:
10-
# run Monday and Thursday at 03:18 UTC
11-
- cron: '18 15 * * MON,THU'
10+
# run Monday at 03:18 UTC
11+
- cron: '18 15 * * MON'
1212

1313
jobs:
1414

1515
base:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
python-version: ['3.11', '3.9']
19+
python-version: ['3.12', '3.11', '3.10']
2020

2121
steps:
2222
- name: Check out repository
2323
uses: actions/checkout@v2
2424

2525
- name: Prepare python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v1
26+
uses: actions/setup-python@v4
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929

@@ -54,14 +54,14 @@ jobs:
5454
runs-on: ubuntu-latest
5555
strategy:
5656
matrix:
57-
python-version: ['3.11', '3.9']
57+
python-version: ['3.12']
5858

5959
steps:
6060
- name: Check out repository
6161
uses: actions/checkout@v2
6262

6363
- name: Prepare python ${{ matrix.python-version }}
64-
uses: actions/setup-python@v1
64+
uses: actions/setup-python@v4
6565
with:
6666
python-version: ${{ matrix.python-version }}
6767

@@ -100,7 +100,7 @@ jobs:
100100
uses: actions/checkout@v2
101101

102102
- name: Prepare python ${{ matrix.python-version }}
103-
uses: actions/setup-python@v1
103+
uses: actions/setup-python@v4
104104
with:
105105
python-version: ${{ matrix.python-version }}
106106

@@ -127,14 +127,14 @@ jobs:
127127
runs-on: macos-latest
128128
strategy:
129129
matrix:
130-
python-version: ['3.11', '3.9']
130+
python-version: ['3.12']
131131

132132
steps:
133133
- name: Check out repository
134134
uses: actions/checkout@v2
135135

136136
- name: Prepare python ${{ matrix.python-version }}
137-
uses: actions/setup-python@v1
137+
uses: actions/setup-python@v4
138138
with:
139139
python-version: ${{ matrix.python-version }}
140140

@@ -161,14 +161,14 @@ jobs:
161161
runs-on: ubuntu-latest
162162
strategy:
163163
matrix:
164-
python-version: ['3.11']
164+
python-version: ['3.12']
165165

166166
steps:
167167
- name: Check out repository
168168
uses: actions/checkout@v2
169169

170170
- name: Prepare python ${{ matrix.python-version }}
171-
uses: actions/setup-python@v1
171+
uses: actions/setup-python@v4
172172
with:
173173
python-version: ${{ matrix.python-version }}
174174

@@ -189,14 +189,14 @@ jobs:
189189
runs-on: ubuntu-latest
190190
strategy:
191191
matrix:
192-
python-version: ['3.11']
192+
python-version: ['3.12']
193193

194194
steps:
195195
- name: Check out repository
196196
uses: actions/checkout@v2
197197

198198
- name: Prepare python ${{ matrix.python-version }}
199-
uses: actions/setup-python@v1
199+
uses: actions/setup-python@v4
200200
with:
201201
python-version: ${{ matrix.python-version }}
202202

@@ -224,7 +224,7 @@ jobs:
224224
uses: actions/checkout@v2
225225

226226
- name: Prepare python ${{ matrix.python-version }}
227-
uses: actions/setup-python@v1
227+
uses: actions/setup-python@v4
228228
with:
229229
python-version: ${{ matrix.python-version }}
230230

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ name: Deploy
33
on:
44
release:
55
types: [created]
6-
6+
77

88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: [3.9]
13+
python-version: [3.12]
1414

1515
steps:
1616
- name: Check out repository
1717
uses: actions/checkout@v2
1818

1919
- name: Prepare python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v1
20+
uses: actions/setup-python@v4
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323

CHANGELOG.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ Release Notes
77
0.12 Series
88
...........
99

10+
0.12.15 (2024-10-29)
11+
--------------------
12+
13+
General:
14+
15+
* Minor improvements in the documentation
16+
* Minor bug fixes in dependencies
17+
* Minor bug fixed in general
18+
* Dropping support of python 3.9
19+
* Adding support for python 3.12
20+
21+
1022
0.12.14 (2023-11-10)
1123
--------------------
1224

@@ -24,7 +36,7 @@ General:
2436

2537
Fixes (#615):
2638

27-
* Fix for wrong assets path in abc-server-dash
39+
* Fix for wrong assets path in abc-server-dash
2840

2941
General
3042

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155

156156
# Add notebooks prolog to Google Colab and nbviewer
157157
nbsphinx_prolog = r"""
158-
{% set docname = 'github/icb-dcm/pyabc/blob/main/doc/' + env.doc2path(env.docname, base=None) %}
158+
{% set docname = 'github/icb-dcm/pyabc/blob/main/doc/' + env.doc2path(env.docname, base=None) | string %}
159159
.. raw:: html
160160
161161
<div class="note">

pyabc/acceptor/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
Acceptors handle the acceptance step.
66
"""
77

8-
98
from .acceptor import (
109
Acceptor,
1110
AcceptorResult,

pyabc/model/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Model:
4747
.. note::
4848
4949
Most likely you do not want to use this class directly, but the
50-
:class:`SimpleModel` instead, or even just pass a plain function
50+
:class:`FunctionModel` instead, or even just pass a plain function
5151
as model.
5252
5353
Parameters
@@ -216,7 +216,7 @@ class FunctionModel(Model):
216216
A model which is initialized with a function which generates the samples.
217217
For most cases this class will be adequate.
218218
Note that you can also pass a plain function to the ABCSMC class, which
219-
then gets automatically converted to a SimpleModel.
219+
then gets automatically converted to a FunctionModel.
220220
221221
Parameters
222222
----------
@@ -252,7 +252,7 @@ def to_model(maybe_model: Union[Callable, Model]) -> Model:
252252
Parameters
253253
----------
254254
maybe_model:
255-
Constructs a SimpleModel instance if a function is passed.
255+
Constructs a FunctionModel instance if a function is passed.
256256
If a Model instance is passed, the Model instance itself is
257257
returned.
258258

pyabc/petab/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,16 @@
44
55
Problem definitions in the PEtab format (https://petab.rtfd.io).
66
"""
7+
import warnings
78

89
from .amici import AmiciPetabImporter
10+
11+
try:
12+
import petab
13+
except ImportError:
14+
warnings.warn(
15+
"PEtab import requires an installation of petab "
16+
"(https://github.com/PEtab-dev/PEtab). "
17+
"Install via `pip3 install petab`.",
18+
stacklevel=1,
19+
)

pyabc/petab/amici.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
logger = logging.getLogger("ABC.PEtab")
1515

1616
try:
17-
import petab
18-
import petab.C as C
17+
import petab.v1 as petab
18+
import petab.v1.C as C
1919
except ImportError:
2020
petab = C = None
2121
logger.error(
@@ -82,8 +82,8 @@ def __call__(self, par: Union[Sequence, Mapping]) -> Mapping:
8282
for key in self.prior_scales.keys():
8383
par[key] = rescale(
8484
val=par[key],
85-
origin_scale=self.prior_scales,
86-
target_scale=self.scaled_scales,
85+
origin_scale=self.prior_scales[key],
86+
target_scale=self.scaled_scales[key],
8787
)
8888

8989
# simulate model

pyabc/petab/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
logger = logging.getLogger("ABC.PEtab")
1515

1616
try:
17-
import petab
18-
import petab.C as C
17+
import petab.v1 as petab
18+
import petab.v1.C as C
1919
except ImportError:
2020
petab = C = None
2121
logger.error(

0 commit comments

Comments
 (0)