MIT-LCP / MIT-LCP/wfdb-python

New interface for specifying different data sources for read/write

オープン
#367 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Jupyter Notebook
スター
853
フォーク
322
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、現在の rdrecord インターフェースと download.py を読み、issue がローカルおよび PhysioNet へのアクセスに関係するエントリーポイントとして特定している箇所を確認します。これらの経路で複数のリモートソースをどのように表現する必要があるかを比較し、実装前に、ローカル、HTTP、S3、GCS の読み書きサポートについて、具体的な API と受け入れ基準を文書化します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
backend-api-design
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。