Improve Error-Messages

Đang mở
#69 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
cli, tooling

Hướng nghiên cứu

Bắt đầu với eido/validation.py, tại khu vực quanh _validate_object, và lần theo đường đi của traceback từ eido/cli.py. Tái hiện lỗi bằng input_error.csv và pep_schema.yaml, sau đó kiểm tra cách các lỗi validation được hiển thị. Hoàn thành khi input không hợp lệ báo cáo lý do validation và ngữ cảnh hữu ích thay vì một traceback không hữu ích.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

likely-solved

Hi guys,

thx for your tool! Your concept is really cool and a handy feature :)

I have decided to integrate this tool in my Snakemake-Pipeline.
However, I now already stumbled multiple times over the issue of having metadata-files that fail the eido evaluation, but the Error messages which are returned by the tool are not helping at all.
Thus, every time when I face such an error I have to invest a lot of time to finally figure out what's the reason for the failing validation.

Here is a minimal reproducible example:

  1. pep_schemal.yaml
description: Minimal example

imports:
   - http://schema.databio.org/pep/2.1.0.yaml

properties:
  samples:
    type: array
    items:
      type: object
      properties:
        sample_directory:
          type: string
          pattern: "^/\\S+$|None"
  1. input_no_error.csv
sample_name,sample_directory
test,/testung
  1. input_error.csv
sample_name,sample_directory
test,testung

Then the output:

# No error
$ eido validate input_no_error.csv -s pep_schema.yaml
Validation successful

# Error
$ eido validate input_error.csv -s pep_schema.yaml
Traceback (most recent call last):
  File "/Users/oliverkuchler/miniforge3/envs/snakemake7/bin/eido", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/oliverkuchler/miniforge3/envs/snakemake7/lib/python3.12/site-packages/eido/cli.py", line 159, in main
    validator(*arguments)
  File "/Users/oliverkuchler/miniforge3/envs/snakemake7/lib/python3.12/site-packages/eido/validation.py", line 73, in validate_project
    _validate_object(
  File "/Users/oliverkuchler/miniforge3/envs/snakemake7/lib/python3.12/site-packages/eido/validation.py", line 45, in _validate_object
    instance_name = error.instance[sample_name_colname]
                    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^

Is there any plans for the future to improve the output?
It would be very cool if one could at least see, because of which input the validation fails.

Ngôn ngữ chính
Python
Star
5
Fork
6
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pepkit/eido

Tất cả issue của pepkit/eido

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.