PEtab-dev / PEtab-dev/libpetab-python
Improve error handling in Problem.from_yaml - format_version
Đang mở
Chưa có ai nhận issue này.
validation
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Missing format_version in the yaml file should provide a proper error message instead of just KeyError:
--> 250 if yaml_config[FORMAT_VERSION] not in {"1", 1, "1.0.0", "2.0.0"}:
251 raise ValueError("Provided PEtab files are of unsupported version "
252 f"{yaml_config[FORMAT_VERSION]}. Expected "
253 f"{format_version.__format_version__}.")
254 if yaml_config[FORMAT_VERSION] == "2.0.0":
KeyError: 'format_version'
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.
Hướng nghiên cứu
Start at the Problem.from_yaml entry point and reproduce the failure with a YAML file missing format_version. Trace the existing version validation and error handling, then make the missing field produce a proper error instead of KeyError; done means the reported case has a clear error and the relevant checks pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- data
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100