Repository navigation
v1 lint: placeholders must only be used in their own observable - #605
Merged
Merged
Conversation
dweindl
force-pushed
the
lint_placeholders_in_model
branch
from
November 17, 2026 10:26
2229c3d to
d01d454
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #605 +/- ##
==========================================
+ Coverage 79.93% 80.03% +0.10%
==========================================
Files 70 70
Lines 8362 8419 +57
Branches 1519 1541 +22
==========================================
+ Hits 6684 6738 +54
- Misses 1188 1189 +1
- Partials 490 492 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dweindl
force-pushed
the
lint_placeholders_in_model
branch
from
November 17, 2026 11:27
adf0ea5 to
97cd92a
Compare
dweindl
marked this pull request as ready for review
November 17, 2026 11:31
dilpath
approved these changes
Nov 17, 2026
Member
There was a problem hiding this comment.
I don't see this issue in the benchmark collection, so could check to see if this example copy is up-to-date.
Member
Author
There was a problem hiding this comment.
Yes, it's an ancient version. It wasn't synced on purpose, afair. I think this was mostly due to visualization tests for which it was used here.
Placeholder parameters are overridden per measurement. A model entity with the same ID is a second, conflicting definition of the same parameter. Add `assert_placeholders_not_in_model` and run it in `lint_problem`. Remove the leftover placeholder parameters and the unused observable and noise assignment rules from the Fujita example model, which violated this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extend the check to condition table columns and values, mapping table entries, observable IDs, measurement table overrides, the use in other observables, and noise placeholders in the observable formula. Rename it to `assert_placeholders_only_used_in_own_observable`. Test it through `lint_problem`, too. List the stricter validation under breaking changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dweindl
force-pushed
the
lint_placeholders_in_model
branch
from
November 17, 2026 14:22
97cd92a to
d6bbbb8
Compare
dweindl
enabled auto-merge
November 17, 2026 14:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Placeholder parameters are overridden per measurement. Any other definition or use of the same ID conflicts with that: a model entity with the same ID would need several values within one simulation if the model uses it, a condition table column or value sets or uses a second value, and another observable or a measurement override refers to a value that is only defined for a specific measurement of the placeholder's own observable. The v1 spec doesn't state this explicitly; v2 requires placeholders to be "valid PEtab identifiers that have not been introduced elsewhere".
lint_problemnow reports an error for placeholders that are model entities, condition table columns, mapping table entries or observable IDs, or that are used in another observable, the condition table or the measurement table, and for noise placeholders used in the observable formula (newassert_placeholders_only_used_in_own_observable). No problem in the benchmark collection, the PEtab v1 test suite or thedoc/examples is affected.The Fujita example model had such parameters, plus leftover observable and noise assignment rules that PEtab didn't use. Both are removed.
🤖 Generated with Claude Code