`bids_version` is always `None` since the switch to bids-validator-deno
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
- Nửa ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start in dandi/files/bids.py at _validate(), which reads origin.standard_version, then check dandi/bids_validator_deno/_validator.py where that field is commented out. Decide with maintainers whether to read BIDSVersion from dataset_description.json or remove bids_version and get_validation_bids_version(). Done means bids_version is populated or cleanly dropped, and nwb.get_metadata() no longer triggers a deno validation run.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
BIDSDatasetDescriptionAsset.bids_version is always None. So are BIDSAsset.get_validation_bids_version() and the bids_version key that dandi.metadata.nwb.get_metadata() adds for files in a BIDS dataset (shown by dandi ls).
_validate() takes it from self._dataset_errors[0].origin.standard_version:
https://github.com/dandi/dandi-cli/blob/ad8f64d9abeada4bf87b68eb1a69bea36895ba03/dandi/files/bids.py#L167-L170
But since #1599 switched to bids-validator-deno, the Origin never sets standard_version. It is commented out because BIDSVersion is not available from the validator:
https://github.com/dandi/dandi-cli/blob/ad8f64d9abeada4bf87b68eb1a69bea36895ba03/dandi/bids_validator_deno/_validator.py#L340-L350
Checked with bids-validator-deno 3.0.2 on ieeg_epilepsyNWB from bids-examples: all 76 results have origin.standard_version=None. Even before #1599, the version was set only if validation returned at least one result (if self._dataset_errors:).
Producing this None is not free: get_validation_bids_version() runs a full deno validation of the dataset when its results are not already cached. That is the case for every NWB file passed through nwb.get_metadata(), which creates a new BIDSDatasetDescriptionAsset each time.
Possible fixes:
- read
BIDSVersionfrom the dataset'sdataset_description.json(the version the dataset declares), and/or expose the validator's schema version, which is already inorigin.standard_schema_version; - or drop
bids_versionandget_validation_bids_version()if nothing needs them.
Found while reviewing #1958.
- Ngôn ngữ chính
- Python
- Star
- 29
- Fork
- 37
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 20
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 dandi/dandi-cli
-
pynwb metadata: get neurodata typesCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`metadata.nwb.get_metadata()` validates the whole BIDS dataset for every NWB file, then discards the resultCó thể đã có người làm @CodyCBakerPhD đã nhận 2 ngày trước. Đang mởBIDS performance
dandi/dandi-cli#1962 · 1 bình luận · 1 người được giao ·
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 48/100
dandi/dandi-cli#1920 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của dandi/dandi-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
huggingface/sentence-transformers#4186 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
documentation good first issue
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
sujithputta02/Esapay#13 ·
-
bot-triaged module: correctness (silent) module: mps module: NaNs and Infs triage review
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/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 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
README: CI link/badge checkĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
SCIInstitute/SCIRun#2842 ·
Maintainer thường phản hồi trong vòng 3 ngày