Skip to content

Add wide labeled-data H5 and CSV readers - #14

Draft
C-Achard wants to merge 6 commits into
cy/io-labeled-data-vocabularyfrom
cy/io-wide-readers
Draft

C-Achard wants to merge 6 commits into
cy/io-labeled-data-vocabularyfrom
cy/io-wide-readers

Conversation

@C-Achard

Copy link
Copy Markdown
Member

H5 and CSV reading and writing of labeled-data files in DeepLabCut's wide layout.

Readers are permissive: they never refuse a file DeepLabCut or napari-deeplabcut reads today, and report the on-disk state. Writers converge on one form, so the variety of files shrinks.

Dependencies

  • pandas>=2.3.3 becomes core, for now, as long as DLC/napari-DLC have not fully migrated.
  • hdf5 = ["tables>=3.10.1"], added to all.
  • The dependency-floor job now installs .[hdf5], since the tests read H5 fixtures.
  • Tests fail on pandas' observed= FutureWarning; the default changes in pandas 3.

H5 keys

df_with_missing is current.
keypoints is legacy from napari-deeplabcut until 2026-04, so projects may hold both keys.

Fixtures

Ten files written by napari-deeplabcut and DeepLabCut 3.0.2. The README records each producer, version and write call; the generator scripts are not included.

@C-Achard C-Achard added io: labeled-data CollectedData and machinelabels files consumer: deeplabcut Needed by or affects DeepLabCut consumer: napari Needed by or affects napari-deeplabcut backwards compatibility Reading files written by older DeepLabCut CI Related to CI/CD jobs and automated testing labels Nov 24, 2026
@C-Achard C-Achard self-assigned this Nov 24, 2026
@C-Achard
C-Achard added this pull request to stack #18 November 24, 2026 16:24
@C-Achard
C-Achard marked this pull request as draft November 24, 2026 16:25
Comment thread dlccore/io/labeled_data/wide/csv.py Resolved
Comment thread dlccore/io/labeled_data/wide/csv.py Resolved
Comment thread pyproject.toml
Comment on lines 23 to 29
dynamic = [ "version" ]
dependencies = [
"numpy>=1.22.4",
"pandas>=2.3.3",
"pydantic>=2.1,<3",
"ruamel-yaml>=0.16",
"typing-extensions",
]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently DLC still pins pd <3

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be okay with keeping the pin on the DLC side, and making sure this side is ready for 3 or more? Or do you feel the drift risk is too large while we migrate?

@C-Achard
C-Achard force-pushed the cy/io-wide-readers branch 2 times, most recently from e3b5cde to de7654e Compare November 30, 2026 08:14
@C-Achard C-Achard added this to the I/O - Video, Labeled data milestone Nov 30, 2026
@C-Achard
C-Achard force-pushed the cy/io-wide-readers branch 2 times, most recently from e3df606 to d3042c3 Compare November 30, 2026 11:07
- Rename the package to dlccore.io and add the dlccore license header
- Add pandas>=2.3.3 as a core dependency and an `hdf5` extra
  (tables>=3.10.1, the newest PyTables supporting Python 3.10), included
  in `all`
- Error on pandas' observed= FutureWarning in tests
- Name DataFrames `df`, never `frame`; classify_wide_frame becomes
  classify_wide_df
- Drop the fixture README's regenerate commands, keeping the producer
  provenance
- Fix lint in the edited header and CSV docstrings
tables 3.10.1 imports typing_extensions.Callable, added in 4.7, but allows older versions.
Recognize UTF-8 byte-order marks in headers and preserve header and index structure when a CSV contains no frames.
@C-Achard
C-Achard removed this pull request from stack #18 November 30, 2026 15:16
@C-Achard
C-Achard added this pull request to stack #42 November 30, 2026 15:16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards compatibility Reading files written by older DeepLabCut CI Related to CI/CD jobs and automated testing consumer: deeplabcut Needed by or affects DeepLabCut consumer: napari Needed by or affects napari-deeplabcut io: labeled-data CollectedData and machinelabels files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants