Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
98ea338
Validate output of R distance function to ensure a single numeric val…
arrjon Dec 23, 2025
00b1c7b
Update pyabc/external/r/r_rpy2.py
arrjon Dec 23, 2025
8947f51
Update CI configuration and dependencies for improved compatibility a…
arrjon Feb 16, 2026
afdc37c
fix doc
arrjon Feb 16, 2026
59806b7
fix doc
arrjon Feb 16, 2026
4086e99
fix deps
arrjon Feb 16, 2026
706dac4
fix deps
arrjon Feb 16, 2026
a6ef2bd
add ruff
arrjon Feb 17, 2026
cb65563
add ruff
arrjon Feb 17, 2026
3ada847
fix ruff
arrjon Feb 17, 2026
1561837
fix ruff
arrjon Feb 17, 2026
50972b2
fix petab
arrjon Feb 17, 2026
9be546b
fix tox
arrjon Feb 17, 2026
53a8278
fix petab test
arrjon Feb 17, 2026
fce4603
update ci
arrjon Feb 17, 2026
a84bbbe
update r dep
arrjon Feb 17, 2026
e508c82
update r dep
arrjon Feb 17, 2026
8f611d1
update r dep
arrjon Feb 17, 2026
3110041
update r dep
arrjon Feb 17, 2026
aab8774
update r dep
arrjon Feb 17, 2026
c91152c
update r dep
arrjon Feb 17, 2026
b26c569
update r dep
arrjon Feb 17, 2026
23901c5
update r dep
arrjon Feb 17, 2026
d2fc5d5
update warnings
arrjon Feb 17, 2026
1030c3e
fix subprocess
arrjon Feb 17, 2026
10d9767
fix r2py
arrjon Feb 17, 2026
22a673d
fix r2py conversion [skip ci]
arrjon Feb 17, 2026
a38c504
fix r2py conversion
arrjon Feb 17, 2026
34e0493
fix petab.v1
arrjon Feb 17, 2026
e7c633d
fix petab.v1
arrjon Feb 17, 2026
f76b207
update toml file
arrjon Feb 17, 2026
1b7aae0
update notebooks
arrjon Feb 17, 2026
29dce1b
remove petabtests
arrjon Feb 17, 2026
3e382e8
remove petabtests
arrjon Feb 17, 2026
3079b89
fix tox
arrjon Feb 17, 2026
d5df51d
update amici dep
arrjon Feb 17, 2026
5180a24
update amici dep
arrjon Feb 17, 2026
f161f16
update amici dep
arrjon Feb 17, 2026
c55d7b2
update notebooks
arrjon Feb 17, 2026
98db9b7
update notebooks 2
arrjon Feb 17, 2026
f606155
annotations in inference_util
arrjon Feb 17, 2026
19a8a67
fix notebooks 2 deps
arrjon Feb 17, 2026
80cbf77
fix notebooks 2 deps
arrjon Feb 17, 2026
a1e3793
fix notebooks 2 deps
arrjon Feb 17, 2026
205d3c3
fix notebooks 2 julia
arrjon Feb 17, 2026
d724e68
fix notebooks 2 julia
arrjon Feb 17, 2026
c8b9d95
fix notebooks 2 julia
arrjon Feb 18, 2026
65e031c
fix notebooks 2 julia
arrjon Feb 18, 2026
625938e
fix notebooks 2 julia
arrjon Feb 18, 2026
891384c
fix notebooks 2 julia
arrjon Feb 18, 2026
716ac3a
check worker health before blocking on queue retrieval
arrjon Feb 18, 2026
437eee7
update distributed for python3.12
arrjon Feb 18, 2026
fcb137a
fix dask for python3.12
arrjon Feb 18, 2026
95f5a26
remove fix dask for python3.12
arrjon Feb 18, 2026
47d3542
fix python3.12 test
arrjon Feb 18, 2026
9dcdde4
fix python3.12 test
arrjon Feb 18, 2026
0193fe6
fix doc contact details [skip ci]
arrjon Feb 18, 2026
85d2f2f
Merge branch 'main' into develop
arrjon Feb 24, 2026
053ec3a
update readme codestyle [skip ci]
arrjon Feb 24, 2026
30ce814
Require amici<1.0
dweindl Feb 25, 2026
73538b2
Merge pull request #660 from ICB-DCM/amici_zero
arrjon Feb 26, 2026
0a6796d
Merge branch 'main' into develop
arrjon Feb 26, 2026
b8cf90f
Merge remote-tracking branch 'origin/develop' into develop
arrjon Feb 26, 2026
4b0e60a
Merge branch 'main' into develop
arrjon Mar 25, 2026
8ed2e00
Update for amici>=1.0 (#663)
dweindl Mar 25, 2026
229ac6c
update deps
arrjon Apr 14, 2026
e00fd9c
update deps
arrjon Apr 14, 2026
b5d185f
update changelog
arrjon Apr 14, 2026
6f596bd
move r deps to external
arrjon Apr 14, 2026
97e83a4
move r deps to external
arrjon Apr 14, 2026
0a9870d
clean install R in CI
arrjon Apr 14, 2026
7d0dea1
update julia deps
arrjon Apr 14, 2026
f48f895
fix julia pycall
arrjon Apr 14, 2026
ee259cb
fix julia pycall
arrjon Apr 14, 2026
e591b94
fix julia pycall
arrjon Apr 14, 2026
5c824bb
update deploy [skip ci]
arrjon Apr 14, 2026
ed7165c
fix R tests
arrjon Apr 14, 2026
0c531cc
fix R tests
arrjon Apr 14, 2026
5f2b297
Update test/base/test_integrated_model.py
arrjon Apr 14, 2026
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
34 changes: 21 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@ jobs:
- os: ubuntu-latest
python: "3.13"
toxenv: base
#- os: ubuntu-latest
# python: "3.12"
# toxenv: base
- os: ubuntu-latest
python: "3.11"
python: "3.12"
toxenv: base
- os: ubuntu-latest
python: "3.10"
python: "3.11"
toxenv: base
- os: ubuntu-latest
python: "3.11"
Expand Down Expand Up @@ -68,9 +65,9 @@ jobs:
toxenv: external-notebooks

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
cache: pip
Expand All @@ -79,18 +76,28 @@ jobs:
if: ${{ startsWith(matrix.toxenv, 'external-') }}
uses: julia-actions/setup-julia@v2
with:
version: "1.11"
version: "1" # Use the latest stable Julia version
Comment thread
arrjon marked this conversation as resolved.

- name: Install Julia dependencies
if: ${{ startsWith(matrix.toxenv, 'external-') }}
run: julia -e 'using Pkg; Pkg.add("PyCall")'
env:
# make Julia/PyCall bind to the same Python used by the job
PYTHON: ${{ env.pythonLocation }}/bin/python
run: |
julia -e 'using Pkg; Pkg.add("PyCall")'

- name: Install R
if: ${{ startsWith(matrix.toxenv, 'external-') }}
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'

- name: Install dependencies
run: |
case "${{ matrix.toxenv }}" in
base|visualization|mac|base-notebooks) .github/workflows/install_deps.sh base R ;;
base|visualization|mac|base-notebooks) .github/workflows/install_deps.sh base ;;
petab) .github/workflows/install_deps.sh amici ;;
external-*) .github/workflows/install_deps.sh base R amici ;;
external-*) .github/workflows/install_deps.sh base amici ;;
lint|project|doc|migrate) .github/workflows/install_deps.sh doc ;;
esac
python -m pip install -U pip tox
Expand All @@ -100,8 +107,9 @@ jobs:

# If each tox env generates coverage.xml, include flags; otherwise combine explicitly
- name: Upload coverage
if: ${{ always() && matrix.os == 'ubuntu-latest' }} # optional
uses: codecov/codecov-action@v4
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v6
continue-on-error: true
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Prepare Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
Expand Down
24 changes: 1 addition & 23 deletions .github/workflows/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,10 @@ install_base() {
fi
}

install_r() {
log_info "Installing R..."
if is_macos; then
brew install r
else
# Prefer distro packages in CI
apt_install libtirpc-dev r-base r-base-dev
# Make R shared libs discoverable for the rest of the job
export_env_var LD_LIBRARY_PATH "${LD_LIBRARY_PATH:-/usr/lib}:/usr/lib/R/lib:/usr/local/lib/R/lib"
fi

if command -v R >/dev/null 2>&1; then
log_info "R installed: $(R --version | head -n1)"
else
log_error "R installation failed (R not on PATH)"
exit 1
fi
}

install_amici() {
log_info "Installing AMICI dependencies..."
if ! is_macos; then
apt_install swig libatlas-base-dev libhdf5-serial-dev libboost-all-dev
apt_install libhdf5-serial-dev libboost-all-dev
fi
log_info "Installing AMICI Python package..."
python -m pip uninstall -y amici pyabc || true
Expand All @@ -93,7 +74,6 @@ install_dev_tools() {

install_all() {
install_base
install_r
install_amici
install_doc_tools
install_dev_tools
Expand All @@ -105,7 +85,6 @@ Usage: $0 [OPTION]...

Options:
base Install base dependencies (Redis)
R Install R (Ubuntu: apt; macOS: brew)
amici Install AMICI dependencies
doc Install documentation tools (Pandoc)
dev Install development tools
Expand All @@ -124,7 +103,6 @@ main() {
for arg in "$@"; do
case "$arg" in
base) install_base ;;
R) install_r ;;
amici) install_amici ;;
doc) install_doc_tools ;;
dev) install_dev_tools ;;
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ repos:

# Configuration
default_language_version:
python: python3.11
python: python3.13
Comment thread
arrjon marked this conversation as resolved.

# Global exclusions
exclude: |
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ Release Notes
0.12 Series
...........

0.12.18 (2026-04-14)
--------------------

General:

* Support of amici 1.0.0
* Remove support for python 3.10

0.12.17 (2026-02-24)
--------------------

Expand Down
20 changes: 10 additions & 10 deletions doc/examples/model_selection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
" # sample from a gaussian\n",
" y = st.norm(parameters.x, sigma).rvs()\n",
" # return the sample as dictionary\n",
" return {\"y\": y}"
" return {'y': y}"
]
},
{
Expand All @@ -110,8 +110,8 @@
"# Their mean differs.\n",
"mu_x_1, mu_x_2 = 0, 1\n",
"parameter_priors = [\n",
" pyabc.Distribution(x=pyabc.RV(\"norm\", mu_x_1, sigma)),\n",
" pyabc.Distribution(x=pyabc.RV(\"norm\", mu_x_2, sigma)),\n",
" pyabc.Distribution(x=pyabc.RV('norm', mu_x_1, sigma)),\n",
" pyabc.Distribution(x=pyabc.RV('norm', mu_x_2, sigma)),\n",
"]"
]
},
Expand Down Expand Up @@ -142,7 +142,7 @@
"source": [
"# We plug all the ABC options together\n",
"abc = pyabc.ABCSMC(\n",
" models, parameter_priors, pyabc.PercentileDistance(measures_to_use=[\"y\"])\n",
" models, parameter_priors, pyabc.PercentileDistance(measures_to_use=['y'])\n",
")"
]
},
Expand Down Expand Up @@ -176,8 +176,8 @@
"# y_observed is the important piece here: our actual observation.\n",
"y_observed = 1\n",
"# and we define where to store the results\n",
"db_path = \"sqlite:///\" + os.path.join(tempfile.gettempdir(), \"test.db\")\n",
"history = abc.new(db_path, {\"y\": y_observed})"
"db_path = 'sqlite:///' + os.path.join(tempfile.gettempdir(), 'test.db')\n",
"history = abc.new(db_path, {'y': y_observed})"
]
},
{
Expand Down Expand Up @@ -205,7 +205,7 @@
}
],
"source": [
"print(\"ABC-SMC run ID:\", history.id)"
"print('ABC-SMC run ID:', history.id)"
]
},
{
Expand Down Expand Up @@ -270,7 +270,7 @@
}
],
"source": [
"history is abc.history"
"assert history is abc.history"
]
},
{
Expand Down Expand Up @@ -351,9 +351,9 @@
}
],
"source": [
"# Evaluate the model probabililties\n",
"# Evaluate the model probabilities\n",
"model_probabilities = history.get_model_probabilities()\n",
"model_probabilities"
"print(model_probabilities)"
]
},
{
Expand Down
34 changes: 17 additions & 17 deletions doc/examples/multiscale_agent_based.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
" ecm_degradation_rate=8e-4,\n",
" ecm_division_threshold=1e-2,\n",
")\n",
"print(f\"Simulation took {time() - start_time:.2f}s\")"
"print(f'Simulation took {time() - start_time:.2f}s')"
]
},
{
Expand Down Expand Up @@ -157,29 +157,29 @@
"fig.set_size_inches((16, 5))\n",
"\n",
"color = {\n",
" \"growth_curve\": \"k\",\n",
" \"extra_cellular_matrix_profile\": \"green\",\n",
" \"proliferation_profile\": \"orange\",\n",
" 'growth_curve': 'k',\n",
" 'extra_cellular_matrix_profile': 'green',\n",
" 'proliferation_profile': 'orange',\n",
"}\n",
"\n",
"x_label = {\n",
" \"growth_curve\": \"Time (d)\",\n",
" \"extra_cellular_matrix_profile\": \"Distance to rim (μm)\",\n",
" \"proliferation_profile\": \"Distance to rim (μm)\",\n",
" 'growth_curve': 'Time (d)',\n",
" 'extra_cellular_matrix_profile': 'Distance to rim (μm)',\n",
" 'proliferation_profile': 'Distance to rim (μm)',\n",
"}\n",
"\n",
"y_label = {\n",
" \"growth_curve\": \"Radius (μm)\",\n",
" \"extra_cellular_matrix_profile\": \"Extracellular matrix intensity\",\n",
" \"proliferation_profile\": \"Fraction proliferating cells\",\n",
" 'growth_curve': 'Radius (μm)',\n",
" 'extra_cellular_matrix_profile': 'Extracellular matrix intensity',\n",
" 'proliferation_profile': 'Fraction proliferating cells',\n",
"}\n",
"\n",
"for ax, (key, val) in zip(axes, observation.items()):\n",
" ax.plot(val, color=color[key])\n",
" ax.set_title(capwords(key.replace(\"_\", \" \")))\n",
" ax.set_title(capwords(key.replace('_', ' ')))\n",
" ax.set_xlabel(x_label[key])\n",
" ax.set_ylabel(y_label[key])\n",
" if key.endswith(\"profile\"):\n",
" if key.endswith('profile'):\n",
" ax.set_xlim(0, 600)"
]
},
Expand Down Expand Up @@ -225,7 +225,7 @@
")\n",
"\n",
"prior = Distribution(\n",
" **{key: RV(\"uniform\", a, b - a) for key, (a, b) in limits.items()}\n",
" **{key: RV('uniform', a, b - a) for key, (a, b) in limits.items()}\n",
")"
]
},
Expand Down Expand Up @@ -309,7 +309,7 @@
}
],
"source": [
"abc.new(\"sqlite:////tmp/test.db\", data_mean)"
"abc.new('sqlite:////tmp/test.db', data_mean)"
]
},
{
Expand Down Expand Up @@ -420,7 +420,7 @@
"\n",
"from pyabc import History\n",
"\n",
"h_loaded = History(\"sqlite:///\" + stored_data_db)\n",
"h_loaded = History('sqlite:///' + stored_data_db)\n",
"\n",
"df, w = h_loaded.get_distribution(m=0, t=5)\n",
"plot_kde_matrix(df, w, limits=limits);"
Expand Down Expand Up @@ -490,7 +490,7 @@
],
"source": [
"populations = h_loaded.get_all_populations()\n",
"(populations[populations.t >= 0].plot(\"t\", \"particles\", marker=\"o\"));"
"(populations[populations.t >= 0].plot('t', 'particles', marker='o'));"
]
},
{
Expand All @@ -516,7 +516,7 @@
}
],
"source": [
"print(f\"Execution time: {(time() - start_time)/60:.1f}m\")"
"print(f'Execution time: {(time() - start_time)/60:.1f}m')"
]
},
{
Expand Down
18 changes: 9 additions & 9 deletions doc/examples/parameter_inference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"outputs": [],
"source": [
"def model(parameter):\n",
" return {\"data\": parameter[\"mu\"] + 0.5 * np.random.randn()}"
" return {'data': parameter['mu'] + 0.5 * np.random.randn()}"
]
},
{
Expand All @@ -109,7 +109,7 @@
"metadata": {},
"outputs": [],
"source": [
"prior = pyabc.Distribution(mu=pyabc.RV(\"uniform\", 0, 5))"
"prior = pyabc.Distribution(mu=pyabc.RV('uniform', 0, 5))"
]
},
{
Expand Down Expand Up @@ -138,7 +138,7 @@
"outputs": [],
"source": [
"def distance(x, x0):\n",
" return abs(x[\"data\"] - x0[\"data\"])"
" return abs(x['data'] - x0['data'])"
]
},
{
Expand Down Expand Up @@ -211,9 +211,9 @@
}
],
"source": [
"db_path = os.path.join(tempfile.gettempdir(), \"test.db\")\n",
"db_path = os.path.join(tempfile.gettempdir(), 'test.db')\n",
"observation = 2.5\n",
"abc.new(\"sqlite:///\" + db_path, {\"data\": observation})"
"abc.new('sqlite:///' + db_path, {'data': observation})"
]
},
{
Expand Down Expand Up @@ -314,12 +314,12 @@
" w,\n",
" xmin=0,\n",
" xmax=5,\n",
" x=\"mu\",\n",
" xname=r\"$\\mu$\",\n",
" x='mu',\n",
" xname=r'$\\mu$',\n",
" ax=ax,\n",
" label=f\"PDF t={t}\",\n",
" label=f'PDF t={t}',\n",
" )\n",
"ax.axvline(observation, color=\"k\", linestyle=\"dashed\")\n",
"ax.axvline(observation, color='k', linestyle='dashed')\n",
"ax.legend();"
]
},
Expand Down
Loading
Loading