Skip to content

Prepare Release 0.12.19#671

Draft
arrjon wants to merge 84 commits into
mainfrom
develop
Draft

Prepare Release 0.12.19#671
arrjon wants to merge 84 commits into
mainfrom
develop

Conversation

@arrjon

@arrjon arrjon commented Jul 24, 2026

Copy link
Copy Markdown
Member

General:

  • Add support of python3.14
  • Add execution time profiling to the ABC-SMC run, reporting pure simulation time, parallel-pipeline setup, in-between-iterations
    time, and within it the population size calculation and distance function ´
    adaptation. The timings are also returned by run_generation. Resolves Profiling #325.
  • Minor bug fixes and improved type setting.

Visualization:

Storage:

  • Store the per-generation walltime in the database (new wall_time column,
    database version 2). Databases created with older pyABC versions must be
    migrated via abc-migrate before they can be resumed; for such databases
    the walltime plots fall back to the previous, end-time-based behavior.
  • Particle weights are now stored using the global normalization (weights sum
    to 1 across all particles of all models, matching the in-memory
    Population representation). This is bundled into database version 2 and
    handled by abc-migrate for existing databases. Resolves Normalization of weights #47.

arrjon and others added 11 commits April 14, 2026 12:40
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* multiprocessing callables are module-scope and pickle-friendly

* replace direct Process instantiation with get_mp_process utility
Copilot AI review requested due to automatic review settings July 24, 2026 13:28
@arrjon arrjon self-assigned this Jul 24, 2026
@arrjon
arrjon requested a review from kilianvolmer July 24, 2026 13:28
Comment thread test/external/test_rpy2_bytesstorage.py Fixed
Comment thread test/external/test_rpy2_storage.py Fixed
# Conflicts:
#	.github/workflows/ci.yml
@codecov-commenter

codecov-commenter commented Jul 24, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 90.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.21%. Comparing base (3cbd1ce) to head (3340ca9).

Files with missing lines Patch % Lines
pyabc/inference_util/inference_util.py 94.11% 1 Missing and 1 partial ⚠️
pyabc/sampler/util.py 60.00% 1 Missing and 1 partial ⚠️
pyabc/sampler/redis_eps/cli.py 50.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #671      +/-   ##
==========================================
- Coverage   79.23%   79.21%   -0.03%     
==========================================
  Files         141      141              
  Lines        8327     8337      +10     
  Branches     1110     1111       +1     
==========================================
+ Hits         6598     6604       +6     
- Misses       1359     1362       +3     
- Partials      370      371       +1     
Flag Coverage Δ
base 59.35% <90.00%> (+<0.01%) ⬆️
external-R 36.82% <82.00%> (+<0.01%) ⬆️
external-other-simulators 31.46% <42.00%> (+0.01%) ⬆️
migrate 25.44% <28.00%> (+0.08%) ⬆️
petab 35.51% <56.00%> (+0.01%) ⬆️
visualization 52.81% <44.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prepares the next pyABC release by updating supported Python/dependency versions, refreshing CI/tox and external-simulator test coverage, and adapting AMICI/PEtab integration to newer upstream APIs.

Changes:

  • Update packaging/CI/tooling for newer Python (incl. 3.14) and dependency versions, and reorganize tox environments.
  • Adapt AMICI/PEtab imports and solver API usage to AMICI ≥ 1.0.0 across library code, tests, and docs.
  • Refactor parts of multiprocessing-based samplers and add new external R/rpy2 storage tests; various doc/example cleanups.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tox.ini Adjust tox env extras/commands; add PEtab git deps; expand external-R tests; update quality tooling version.
test/petab/test_petab.py Update AMICI PEtab importer calls to new API (import_petab_problem, create_solver, renamed kwargs).
test/petab/test_petab_suite.py Update AMICI imports/API usage and simulation dataframe conversion function path.
test/external/test_rpy2_storage.py Add rpy2-backed History storage roundtrip tests for R objects in sumstats.
test/external/test_rpy2_bytesstorage.py Add rpy2-backed bytes storage roundtrip tests for R dataframes.
test/base/test_storage.py Remove rpy2-based sumstat storage checks from base test suite.
test/base/test_integrated_model.py Fix typo in comment.
test/base/test_bytesstorage.py Remove rpy2-based bytes-storage cases from base tests.
pyproject.toml Update Python requirement and bump multiple dependency minimum versions; adjust ruff target version.
pyabc/version.py Bump library version constant.
pyabc/sampler/util.py Add helper to select multiprocessing Process constructor (preferring fork).
pyabc/sampler/redis_eps/server_starter.py Switch worker process creation to use new multiprocessing helper.
pyabc/sampler/redis_eps/cli.py Switch worker process creation to use new multiprocessing helper.
pyabc/sampler/multicore.py Switch process creation to use new multiprocessing helper.
pyabc/sampler/multicore_evaluation_parallel.py Switch process creation to use new multiprocessing helper.
pyabc/petab/amici.py Update AMICI/PEtab integration code to AMICI ≥ 1.0.0 API; adjust solver settings I/O.
pyabc/inference_util/inference_util.py Refactor nested closures into top-level helpers and use functools.partial.
pyabc/epsilon/temperature.py Minor docstring formatting cleanup.
doc/sampler.rst Whitespace cleanup in docs.
doc/examples/wasserstein.ipynb Normalize quoting style and small string literal updates.
doc/examples/using_R.ipynb Normalize quoting style and small string literal updates.
doc/examples/sde_ion_channels.ipynb Normalize quoting style and small string literal updates.
doc/examples/resuming.ipynb Normalize quoting style and adjust a couple of cells to print instead of bare expressions.
doc/examples/petab_yaml2sbml.ipynb Update AMICI API usage (import_petab_problem, create_solver, simulate, etc.).
doc/examples/petab_application.ipynb Update AMICI API usage (import_petab_problem, create_solver) and minor formatting.
doc/examples/parameter_inference.ipynb Normalize quoting style and minor string literal updates.
doc/examples/multiscale_agent_based.ipynb Normalize quoting style and minor string literal updates.
doc/examples/model_selection.ipynb Normalize quoting style and change a couple of cells from expression display to print/assert.
CHANGELOG.rst Add new release-note section.
.pre-commit-config.yaml Update default pre-commit Python version.
.github/workflows/install_deps.sh Remove R install helper; trim AMICI apt deps.
.github/workflows/deploy.yml Bump GitHub Actions versions used in deploy workflow.
.github/workflows/ci.yml Update Python matrix (incl. 3.14), action versions, Julia setup, add setup-r, tweak dependency install logic, and make codecov upload non-blocking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyabc/sampler/util.py Outdated
Comment thread pyabc/sampler/multicore.py Outdated
Comment thread pyabc/sampler/multicore_evaluation_parallel.py Outdated
Copilot AI review requested due to automatic review settings July 24, 2026 13:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

pyabc/sampler/util.py:21

  • get_mp_process() can return a Process class from a different multiprocessing context (fork) than the one used to create Queue/Value objects elsewhere (which use the default context). Mixing contexts is known to raise runtime errors (e.g. SemLock/context mismatch) on platforms where the default start method is spawn (macOS) or when users set a non-fork start method.

To avoid cross-context issues, return the Process class from the current/default context (or alternatively expose a get_mp_context() helper and create Queue/Value from that same context).

def get_mp_process():
    """Get a multiprocessing Process constructor.

    On POSIX, prefer ``fork`` when available to support non-picklable
    callables (e.g. local functions in tests) in nested worker setups.
    """
    if 'fork' in mp.get_all_start_methods():
        return mp.get_context('fork').Process
    return mp.Process

Copilot AI review requested due to automatic review settings July 24, 2026 13:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread pyabc/sampler/multicore_evaluation_parallel.py
Copilot AI review requested due to automatic review settings July 24, 2026 13:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@arrjon
arrjon marked this pull request as draft July 24, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalization of weights Walltime plots do not show actual walltime if stored abc runs are resumed Profiling

5 participants