Skip to content

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Jul 1, 2025

Adapt to the changes in PEtab-dev/PEtab#625.

Placeholders are now listed explicitly.

Closes #390.

@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2025

Codecov Report

Attention: Patch coverage is 75.67568% with 9 lines in your changes missing coverage. Please review.

Project coverage is 73.97%. Comparing base (3bc6777) to head (9ee937d).

Files with missing lines Patch % Lines
petab/v2/core.py 72.22% 3 Missing and 2 partials ⚠️
petab/v2/petab1to2.py 76.47% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #393      +/-   ##
===========================================
- Coverage    74.00%   73.97%   -0.04%     
===========================================
  Files           58       58              
  Lines         6470     6489      +19     
  Branches      1115     1120       +5     
===========================================
+ Hits          4788     4800      +12     
- Misses        1260     1264       +4     
- Partials       422      425       +3     

☔ View full report in Codecov by Sentry.
📢 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 July 1, 2025 14:42
@dweindl dweindl requested a review from a team as a code owner July 1, 2025 14:42
@dweindl dweindl force-pushed the v2_placeholders branch from 2fda917 to 573129c Compare July 1, 2025 14:43
Comment on lines 412 to 422
# the current sorting will fail for 10+ placeholders, but who does
# that anyway?
return v2.C.PARAMETER_SEPARATOR.join(
sorted(
str(sym)
for sym in expr.free_symbols
if sym.is_Symbol and pattern.match(str(sym))
)
)
Copy link
Member

Choose a reason for hiding this comment

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

What causes failure for 10+ placeholders?

Copy link
Member Author

Choose a reason for hiding this comment

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

Lexicographical sorting:

In[1]: list(sorted(["observableParameter1_foo", "observableParameter10_foo"]))
Out[1]: ['observableParameter10_foo', 'observableParameter1_foo']

Well, not the sorting itself will fail, but the placeholder order won't match the override order in the measurement table anymore.

Adapt to the changes in PEtab-dev/PEtab#625.

Placeholders are now listed explicitly.

Closes PEtab-dev#390.
@dweindl dweindl force-pushed the v2_placeholders branch from 573129c to 9ee937d Compare July 2, 2025 04:47
@dweindl dweindl merged commit ef79523 into PEtab-dev:develop Jul 2, 2025
7 checks passed
@dweindl dweindl deleted the v2_placeholders branch July 2, 2025 05:24
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