v2: linter doesn't check that placeholder IDs are unique
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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. 🤖
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 9
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 30
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PEtab-dev/libpetab-python
-
`petab_files_1to2` keeps a stale model file when converting into a non-empty output directoryĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
PEtab-dev/libpetab-python#566 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PEtab-dev/libpetab-python#549 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PEtab-dev/libpetab-python#525 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
PEtab-dev/libpetab-python#565 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`sympify_petab` returns `Integer` for Python/numpy integers, but `Float` for numeric stringsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 50/100
PEtab-dev/libpetab-python#553 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PEtab-dev/libpetab-python
Issue tương tự
-
follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
-
query rewriting: prompt says "Language for `query` field: None" when language detection failsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
modelscope/modelscope#1833 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ocr_data_to_elements() raises AttributeError when a layout element is a ListCó thể đã có người làm @Eapp1e đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Unstructured-IO/unstructured#4616 ·
Maintainer thường phản hồi trong vòng 1 ngày