MIT-LCP / MIT-LCP/wfdb-python

Better encapsulation of record metadata

Open
#371 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
853
Forks
322
PR merge metrics
No merged PRs in 30d

Description

Right now we have the Record class with a huge number of attributes in the top level object. These attributes are varied, fall into many categories, and become very hard to keep track of.

I also find it rather awkward that there is no separate 'header' or 'metadata' type of object. ie. rdheader and rdrecord both return the same type of object.

Initial idea:

  • RecordInfo class for storing all the header data. Includes record and signal specification fields, and comments. rdheader will create this type.
  • Same Record class for WFDB records. The info attribute will be a RecordInfo object.

Having the top level p_signal, d_signal attributes is not my favorite, but I feel like it's rather pointless to have another object to capture these fields.

Open to suggestions.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing Record class and the rdheader and rdrecord entry points named in the issue, mapping which top-level attributes represent header, signal specification, and comment data. Define the intended RecordInfo boundary and check how callers use these attributes; done means the encapsulation proposal is consistent and its effects on both returned object types are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.