Skip to content

Commit

Permalink
removed unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
keyaloding committed Aug 20, 2024
1 parent 90fd397 commit d8294b7
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions sleap_io/io/nwb.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,20 +460,6 @@ def read_nwb(path: str) -> Labels:
return labels


def read_nwb_training(processing_modules: LabelledDict) -> Labels:
"""Read an NWB formatted file with NWB training data to a SLEAP `Labels` object.
Args:
processing_modules: A dictionary of processing modules from the NWB file.
Returns:
A `Labels` object.
"""
for processing_module in processing_modules.values():
if isinstance(processing_module, PoseTraining):
return pose_training_to_labels(processing_module)


def write_nwb(
labels: Labels,
nwbfile_path: str,
Expand Down Expand Up @@ -773,7 +759,7 @@ def append_nwb(
See also: append_nwb_data
"""
with NWBHDF5IO(filename, mode="w", load_namespaces=True) as io:
with NWBHDF5IO(filename, mode="a", load_namespaces=True) as io:
nwb_file = io.read()
if as_training:
nwb_file = append_nwb_training(

Check warning on line 765 in sleap_io/io/nwb.py

View check run for this annotation

Codecov / codecov/patch

sleap_io/io/nwb.py#L764-L765

Added lines #L764 - L765 were not covered by tests
Expand Down

0 comments on commit d8294b7

Please sign in to comment.