Skip to content

access dataset converters through CLI - #490

Merged
themattinthehatt merged 1 commit into
mainfrom
converters
Aug 21, 2026
Merged

access dataset converters through CLI#490
themattinthehatt merged 1 commit into
mainfrom
converters

Conversation

@themattinthehatt

@themattinthehatt themattinthehatt commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Adds litpose convert <dataset_path> --lp_dir LP_DIR, replacing the standalone
scripts/converters/{dlc2lp,slp2lp}.py scripts. The command dispatches by input type: a directory is
treated as a DeepLabCut project, a .slp file as a SLEAP .pkg.slp package.

  • New lightning_pose/converters/ package (dlc.py, sleap.py) with per-format convert() functions,
    ported from the old scripts with pathlib, logging, and type hints.
  • Old scripts now exit with a pointer to the new CLI command.
  • Docs (importing_labeled_data.rst, new cli_reference/convert.rst) updated accordingly.
  • Tests added for both converters (synthetic DLC/.pkg.slp fixtures) and the CLI dispatch logic.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.95604% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.97%. Comparing base (7182845) to head (96a0a7b).

Files with missing lines Patch % Lines
lightning_pose/converters/sleap.py 93.81% 6 Missing ⚠️
lightning_pose/converters/dlc.py 91.66% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #490      +/-   ##
==========================================
+ Coverage   92.94%   92.97%   +0.02%     
==========================================
  Files          62       65       +3     
  Lines        5968     6150     +182     
==========================================
+ Hits         5547     5718     +171     
- Misses        421      432      +11     
Files with missing lines Coverage Δ
lightning_pose/cli/commands/__init__.py 100.00% <ø> (ø)
lightning_pose/cli/commands/convert.py 100.00% <100.00%> (ø)
lightning_pose/data/utils.py 98.88% <ø> (ø)
lightning_pose/converters/dlc.py 91.66% <91.66%> (ø)
lightning_pose/converters/sleap.py 93.81% <93.81%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@themattinthehatt
themattinthehatt merged commit a973f1e into main Aug 21, 2026
7 checks passed
@themattinthehatt
themattinthehatt deleted the converters branch August 21, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant