Skip to content

Treat trunc=[-inf, inf] as no truncation in distributions - #603

Merged
dweindl merged 1 commit into
PEtab-dev:mainfrom
dweindl:distributions_trunc_list
Nov 17, 2026
Merged

dweindl merged 1 commit into
PEtab-dev:mainfrom
dweindl:distributions_trunc_list

Conversation

@dweindl

@dweindl dweindl commented Nov 17, 2026

Copy link
Copy Markdown
Member

Distribution.__init__ only recognized the tuple (-inf, inf) as "no truncation", but petab.v2.Parameter.prior_dist passes the bounds as a list. Such distributions were therefore handled as truncated, e.g., sampled via the inverse CDF instead of directly. Results were still correct.

trunc is now converted to a tuple before the comparison, so any sequence is accepted and stored consistently.

🤖 Generated with Claude Code

@dweindl dweindl self-assigned this Nov 17, 2026
@codecov-commenter

codecov-commenter commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.84%. Comparing base (b45a01c) to head (a940716).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #603      +/-   ##
==========================================
+ Coverage   79.75%   79.84%   +0.08%     
==========================================
  Files          70       70              
  Lines        8332     8334       +2     
  Branches     1510     1511       +1     
==========================================
+ Hits         6645     6654       +9     
+ Misses       1197     1190       -7     
  Partials      490      490              

☔ 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.

@dweindl
dweindl marked this pull request as ready for review November 17, 2026 08:23
@dweindl
dweindl requested a review from a team as a code owner November 17, 2026 08:23
`Distribution.__init__` only recognized the tuple `(-inf, inf)` as "no
truncation", but `petab.v2.Parameter.prior_dist` passes the bounds as a
list. Such distributions were therefore handled as truncated, e.g.,
sampled via the inverse CDF instead of directly.

Convert `trunc` to a tuple before the comparison, so any sequence is
accepted and stored consistently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dweindl
dweindl force-pushed the distributions_trunc_list branch from 900947d to a940716 Compare November 17, 2026 13:49
@dweindl
dweindl enabled auto-merge November 17, 2026 13:53
@dweindl
dweindl added this pull request to the merge queue Nov 17, 2026
Merged via the queue into PEtab-dev:main with commit 3fd2a3f Nov 17, 2026
8 checks passed
@dweindl
dweindl deleted the distributions_trunc_list branch November 17, 2026 13:59
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.

3 participants