v2: linter doesn't check that placeholder IDs are unique
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start from Problem.validate() in the petab.v2 Problem class and the reproducer in the issue, which adds two observables sharing the placeholder a. Add a check that collects placeholder IDs from both placeholder columns across all observables and reports duplicates, plus IDs that collide with model species, observable, parameter, condition or experiment IDs. Done when the reproducer reports an issue and the existing validation tests still pass.
索引モデルが issue の本文から書いたものです。
説明
The PEtab v2 spec requires the IDs in observablePlaceholders and noisePlaceholders to be "valid PEtab identifiers that have not been introduced elsewhere", and all identifiers to be globally unique within the problem. This was discussed in PEtab-dev/PEtab#594 (starting at https://github.com/PEtab-dev/PEtab/issues/594#issuecomment-2850839215) and specified in PEtab-dev/PEtab#625.
Problem.validate() doesn't check this. Tested on main (5fb4066), adding observables and measurements to an otherwise valid problem (Boehm_JProteomeRes2014 from Benchmark-Models-PEtab):
| Case | Result |
|---|---|
Same placeholder a in observablePlaceholders of two observables |
no issues |
a as observable placeholder of one observable and noise placeholder of another |
no issues |
Placeholder ID = model species ID (STAT5A) |
no issues |
| Placeholder ID = observable ID | no issues |
Placeholder ID = parameter table ID (ratio) |
reported, but only indirectly: "Extraneous parameter(s) in parameter table" / "is not allowed to occur in the parameters table" |
Reproducer for the first case:
from petab.v2 import Problem
p = Problem.from_yaml("Boehm_JProteomeRes2014/v2/problem.yaml")
p.add_observable("o1", "a * STAT5A", noise_formula="1", observable_placeholders=["a"])
p.add_observable("o2", "a + STAT5A", noise_formula="1", observable_placeholders=["a"])
p.add_measurement("o1", time=1, measurement=1, observable_parameters=[2])
p.add_measurement("o2", time=1, measurement=1, observable_parameters=[3])
print(p.validate()) # no issues
I'd suggest a validation task that collects all placeholder IDs, from both columns and all observables, and reports:
- duplicates among placeholders, including the same ID within one observable's observable and noise placeholders;
- placeholders that coincide with any other ID in the problem: model entities, parameter/observable/condition/experiment IDs, mapping table
petabEntityIds, and so on.
The parameter table case could then get a clearer message than "Extraneous parameter(s)".
Drafted with AI assistance. 🤖
- 主要言語
- Python
- スター
- 18
- フォーク
- 9
- 平均マージ
- 1日 21時間
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PEtab-dev/libpetab-python のほかの issue
-
`petab1to2`: random column name for pre-existing `experimentId` column対応中かも @dweindl が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
PEtab-dev/libpetab-python#568 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
PEtab-dev/libpetab-python#566 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PEtab-dev/libpetab-python#549 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PEtab-dev/libpetab-python#525 ·
メンテナーはふだん 1 日以内に返信
-
`petablint` fails for PEtab v2 problems with only warnings対応中かも @dweindl が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
PEtab-dev/libpetab-python#567 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
PEtab-dev/libpetab-python の issue をすべて見る
似ている issue
-
link-rot
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
developmentseed/titiler-cmr#265 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Insecure Brotli version <1.2.1対応中かも @jamescw19 が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
stac-utils/stac-fastapi-pgstac#438 · リアクション 1 件 ·
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信