hasadna / hasadna/knesset-data-python

votes html scraper should not fail silently by default

Đang mở
#4 14 bình luận 0 reaction 0 người được giao Xem trên GitHub
noob friendly
Ngôn ngữ chính
Python
Star
2
Fork
14
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

following PR #3 - it looks like in case an unknown member is encountered it will fail silently

in knesset-data-python we would like to be as low-level as possible and make as little assumptions as possible about how the data will be used

in this case, silently ignoring an error might cause unexpected problems down the line

I prefer that by default we will raise an exception, and add a skip_exceptions parameter which will instead of raising an exception yield the exception object as part of the data stream - to allow the end-user decide how to handle the exception

this is done in the dataservice scrapers, see for example this unit test -
https://github.com/hasadna/knesset-data-python/blob/master/knesset_data/dataservice/tests/base/test_exceptions.py#L38

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với trình scraper HTML của votes và so sánh cách xử lý ngoại lệ của nó với hành vi của trình scraper dataservice được mô tả trong PR #3. Đọc knesset_data/dataservice/tests/base/test_exceptions.py quanh dòng 38, sau đó xác minh rằng các thành viên không xác định sẽ raise theo mặc định và rằng skip_exceptions trả về đối tượng ngoại lệ khi được bật.

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-engineering
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
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
35/100

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.