Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion to rename ValidPosesCSV to ValidDeepLabCutCSV #195

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/api_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Input/Output

ValidFile
ValidHDF5
ValidPosesCSV
ValidDeepLabCutCSV
ValidPosesDataset

Sample Data
Expand Down
4 changes: 2 additions & 2 deletions movement/io/load_poses.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

from movement import MovementDataset
from movement.io.validators import (
ValidDeepLabCutCSV,
ValidFile,
ValidHDF5,
ValidPosesCSV,
ValidPosesDataset,
)
from movement.logging import log_error, log_warning
Expand Down Expand Up @@ -503,7 +503,7 @@ def _load_df_from_dlc_csv(file_path: Path) -> pd.DataFrame:
DeepLabCut-style DataFrame with multi-index columns.

"""
file = ValidPosesCSV(file_path)
file = ValidDeepLabCutCSV(file_path)

possible_level_names = ["scorer", "individuals", "bodyparts", "coords"]
with open(file.path) as f:
Expand Down
2 changes: 1 addition & 1 deletion movement/io/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def file_contains_expected_datasets(self, attribute, value):


@define
class ValidPosesCSV:
class ValidDeepLabCutCSV:
"""Class for validating DLC-style .csv files.

Parameters
Expand Down
4 changes: 2 additions & 2 deletions tests/test_unit/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import pytest

from movement.io.validators import (
ValidDeepLabCutCSV,
ValidFile,
ValidHDF5,
ValidPosesCSV,
ValidPosesDataset,
)

Expand Down Expand Up @@ -124,7 +124,7 @@ def test_poses_csv_validator_with_invalid_input(
"""Test that invalid CSV files raise the appropriate errors."""
file_path = request.getfixturevalue(invalid_input)
with expected_exception:
ValidPosesCSV(file_path)
ValidDeepLabCutCSV(file_path)

@pytest.mark.parametrize(
"invalid_position_array",
Expand Down