Skip to content

Commit 47a8f84

Browse files
Merge pull request #495 from ICB-DCM/develop
Release 0.11.3
2 parents 50eacbe + 38776c4 commit 47a8f84

28 files changed

+465
-33
lines changed

CHANGELOG.rst

+9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ Release Notes
88
...........
99

1010

11+
0.11.3 (2021-10-16)
12+
-------------------
13+
14+
* Update to amici 0.11.19 for scaled residual support (#491)
15+
* Add links for online execution of notebooks on Google Colab and nbviewer
16+
(#492)
17+
* Tests: Fix early stopping test for first generation (#494)
18+
19+
1120
0.11.2 (2021-10-07)
1221
-------------------
1322

doc/_static/colab-badge.svg

+1
Loading

doc/_static/nbviewer-badge.svg

+186
Loading

doc/conf.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,19 @@
140140
# If true, `todo` and `todoList` produce output, else they produce nothing.
141141
todo_include_todos = True
142142

143+
# Add notebooks prolog to Google Colab and nbviewer
144+
nbsphinx_prolog = r"""
145+
{% set docname = 'github/icb-dcm/pyabc/blob/main/doc/' + env.doc2path(env.docname, base=None) %}
146+
.. raw:: html
147+
148+
<div class="note">
149+
<a href="https://colab.research.google.com/{{ docname|e }}" target="_blank">
150+
<img src="../_static/colab-badge.svg" alt="Open in Colab"/></a>
151+
<a href="https://nbviewer.jupyter.org/{{ docname|e }}" target="_blank">
152+
<img src="../_static/nbviewer-badge.svg" alt="Open in nbviewer"/></a>
153+
</div>
154+
155+
"""
143156

144157
# -- Options for HTML output ----------------------------------------------
145158

@@ -175,7 +188,7 @@
175188
# Add any paths that contain custom static files (such as style sheets) here,
176189
# relative to this directory. They are copied after the builtin static files,
177190
# so a file named "default.css" will overwrite the builtin "default.css".
178-
#html_static_path = ['_static']
191+
html_static_path = ['_static']
179192

180193
# Add any extra paths that contain custom files (such as robots.txt or
181194
# .htaccess) here, relative to this directory. These files are copied

doc/examples.rst

+15-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,21 @@
33
Examples
44
========
55

6-
The following examples should help to get a better idea of how to use pyABC.
6+
We provide a collection of example notebooks to get a better idea of how to
7+
use pyABC, and illustrate core features.
8+
9+
The notebooks can be run locally with an installation of jupyter
10+
(``pip install jupyter``), or online on Google Colab or nbviewer, following the
11+
links at the top of each notebook.
12+
To run the notebooks online, at least an installation of pyABC is required,
13+
which can be performed by
14+
15+
.. code:: sh
16+
17+
# install if not done yet
18+
!pip install pyabc --quiet
19+
20+
Potentially, further dependencies may be required.
721

822
.. toctree::
923
:maxdepth: 1

doc/examples/adaptive_distances.ipynb

+20-3
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,33 @@
7575
},
7676
{
7777
"cell_type": "code",
78-
"execution_count": 1,
78+
"execution_count": null,
79+
"metadata": {},
80+
"outputs": [],
81+
"source": [
82+
"# install if not done yet\n",
83+
"!pip install pyabc --quiet"
84+
]
85+
},
86+
{
87+
"cell_type": "code",
88+
"execution_count": null,
7989
"metadata": {},
8090
"outputs": [],
8191
"source": [
8292
"import numpy as np\n",
8393
"import matplotlib.pyplot as pyplot\n",
8494
"import pyabc\n",
8595
"import logging\n",
86-
"import tempfile\n",
87-
"\n",
96+
"import tempfile"
97+
]
98+
},
99+
{
100+
"cell_type": "code",
101+
"execution_count": 1,
102+
"metadata": {},
103+
"outputs": [],
104+
"source": [
88105
"pyabc.settings.set_figure_params(\"pyabc\") # for beautified plots\n",
89106
"\n",
90107
"\n",

doc/examples/aggregated_distances.ipynb

+10
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@
2828
"We want to combine different distance metrics operating on subsets of the data to one distance value. As a toy model, assume we want to combine a Laplace and a Normal distance."
2929
]
3030
},
31+
{
32+
"cell_type": "code",
33+
"execution_count": null,
34+
"metadata": {},
35+
"outputs": [],
36+
"source": [
37+
"# install if not done yet\n",
38+
"!pip install pyabc --quiet"
39+
]
40+
},
3141
{
3242
"cell_type": "code",
3343
"execution_count": 1,

doc/examples/chemical_reaction.ipynb

+10
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@
4646
"To simulate these models, we define a simple Gillespie simulator:"
4747
]
4848
},
49+
{
50+
"cell_type": "code",
51+
"execution_count": null,
52+
"metadata": {},
53+
"outputs": [],
54+
"source": [
55+
"# install if not done yet\n",
56+
"!pip install pyabc --quiet"
57+
]
58+
},
4959
{
5060
"cell_type": "code",
5161
"execution_count": 1,

doc/examples/conversion_reaction.ipynb

+10
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@
5454
"We will show how to estimate $\\Theta_1$ and $\\Theta_2$ using pyABC."
5555
]
5656
},
57+
{
58+
"cell_type": "code",
59+
"execution_count": null,
60+
"metadata": {},
61+
"outputs": [],
62+
"source": [
63+
"# install if not done yet\n",
64+
"!pip install pyabc --quiet"
65+
]
66+
},
5767
{
5868
"cell_type": "code",
5969
"execution_count": 1,

doc/examples/data_plots.ipynb

+10
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
"Let’s start to import the necessary classes. We also set up matplotlib and we’re going to use numpy and pandas as well."
1717
]
1818
},
19+
{
20+
"cell_type": "code",
21+
"execution_count": null,
22+
"metadata": {},
23+
"outputs": [],
24+
"source": [
25+
"# install if not done yet\n",
26+
"!pip install pyabc --quiet"
27+
]
28+
},
1929
{
2030
"cell_type": "code",
2131
"execution_count": 1,

doc/examples/discrete_parameters.ipynb

+10
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@
2929
"To efficiently and correctly deal with discrete parameters, pyABC also implements discrete transitions as classes derived from `pyabc.transition.DiscreteTransition`. Let us show an example:"
3030
]
3131
},
32+
{
33+
"cell_type": "code",
34+
"execution_count": null,
35+
"metadata": {},
36+
"outputs": [],
37+
"source": [
38+
"# install if not done yet\n",
39+
"!pip install pyabc --quiet"
40+
]
41+
},
3242
{
3343
"cell_type": "code",
3444
"execution_count": 1,

doc/examples/early_stopping.ipynb

+10
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@
4747
"Let's start with the necessary imports:"
4848
]
4949
},
50+
{
51+
"cell_type": "code",
52+
"execution_count": null,
53+
"metadata": {},
54+
"outputs": [],
55+
"source": [
56+
"# install if not done yet\n",
57+
"!pip install pyabc --quiet"
58+
]
59+
},
5060
{
5161
"cell_type": "code",
5262
"execution_count": 1,

0 commit comments

Comments
 (0)