MIT-LCP / MIT-LCP/wfdb-python

New interface for specifying different data sources for read/write

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

Chưa có ai nhận issue này.

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

Mô tả

Looking at the current rdrecord for example, there are two parameters used to specify the location of the record:

  1. record_name : str
  2. pn_dir : str

The current package supports reading files locally and from the global database index URL, which defaults to PhysioNet, as specified in download.py.

There are several things that we should aim to support:

  • Reading/writing from more types of data sources, such as S3, and GCS.
  • Having more than one remote source configured at a time.

One proposal might be to have a new DataSource class, and a global config dictionary with key:value pairs of ds_name(str):ds(DataSource). ie.

class DataSourceType(Enum):
    LOCAL = 1  # Not sure if this is necessary?
    HTTP = 2
    GCS = 3
    S3 = 4

class DataSource:
    ds_type : DataSourceType
    # Other type-specific params here
    
_physionet_ds = DataSource(ds_type=DataSourceType.HTTP, base_url="https://physionet.org/content/")

data_sources = { 'physionet' : _physionet_ds }

And the read/write functions could use these params:

  1. record_name: str
  2. data_source: str | DataSource - The key of the data source in the global data sources map, or a DataSource object.

This would be much more explicit. Thoughts?

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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.

Hướng nghiên cứu

Bắt đầu bằng cách đọc interface rdrecord hiện tại và download.py, những thành phần được issue xác định là các điểm truy cập liên quan cho việc truy cập cục bộ và PhysioNet. So sánh cách các đường dẫn đó cần biểu diễn nhiều nguồn từ xa, sau đó tài liệu hóa một API cụ thể và các tiêu chí nghiệm thu cho hỗ trợ đọc/ghi cục bộ, HTTP, S3 và GCS trước khi triển khai.

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
backend-api-design
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/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.