Skip to content

Specify one source-location contract across record I/O #748

Done

Description

@tompollard

Problem

The first record_name argument already accepts local paths, cloud URIs, .wfdb archives, and physionet:// URIs, while pn_dir remains a second route for PhysioNet reads. The supported location forms and custom-server behavior need one documented contract across record and annotation I/O entry points.

Decisions to make

  • Which location forms should each read and write function support, and what should its first argument be called?
  • How will custom PhysioNet servers work before pn_dir is deprecated?
  • How should legacy pn_dir calls map to explicit, version-aware URIs without changing behavior unexpectedly?

Related: #534 (single path and pn_dir plan), #367 (data sources), #672 (argument names).

Activity

  1. tompollard commented on Nov 30, 2026

    @tompollard
    MemberAuthor

    I opened #780 to document the source-location contract before adding more public API names.

    For reads, the first argument identifies the source: a local record stem, supported cloud URI, explicit physionet:// URI, or local .wfdb archive. EDF and WAV readers take a file path with its extension. There is no automatic fallback from local files to PhysioNet. New reader APIs call this argument path; existing record_name arguments keep working.

    I would keep pn_dir available for now. It remains the way to read from a custom index server set with set_db_index_url, while an explicit physionet:// URI always uses PhysioNet. We should not warn on or remove pn_dir until custom servers have an equivalent explicit source form. Code using a URI should put it in the first argument and not combine it with pn_dir.

    The current write APIs have a separate contract: legacy writers use write_dir or wfdb_archive, while SignalRead.write(path) takes a complete destination stem or local archive path. #780 documents those differences without changing existing calls. This should give #672 a stable basis for naming the new read and write functions.

  2. added a commit that references this issue on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions