Skip to content

Commit

Permalink
cleaned
Browse files Browse the repository at this point in the history
  • Loading branch information
sronilsson committed Dec 20, 2024
1 parent 6f28605 commit ea1d7d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions simba/mixins/train_model_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@
from simba.plotting.shap_agg_stats_visualizer import \
ShapAggregateStatisticsVisualizer
from simba.ui.tkinter_functions import TwoOptionQuestionPopUp
from simba.utils.checks import (check_file_exist_and_readable, check_float,
from simba.utils.checks import (check_all_dfs_in_list_has_same_cols,
check_file_exist_and_readable,
check_filepaths_in_iterable_exist, check_float,
check_if_dir_exists, check_if_valid_input,
check_instance, check_int, check_str,
check_that_column_exist, check_valid_array,
check_valid_dataframe, check_valid_lst, check_all_dfs_in_list_has_same_cols, check_filepaths_in_iterable_exist)
check_valid_dataframe, check_valid_lst)
from simba.utils.data import (detect_bouts, detect_bouts_multiclass,
get_library_version)
from simba.utils.enums import (OS, ConfigKey, Defaults, Dtypes, Formats,
Expand Down
4 changes: 3 additions & 1 deletion simba/sandbox/check_dfs_in_lst.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import pandas as pd
from typing import List

import pandas as pd

from simba.utils.checks import check_valid_lst


def check_all_dfs_in_list_has_same_cols(dfs: List[pd.DataFrame], raise_error: bool = True) -> bool:
check_valid_lst(data=dfs, source=check_all_dfs_in_list_has_same_cols.__name__, valid_dtypes=(pd.DataFrame,), min_len=1)
col_headers = [list(x.columns) for x in dfs]
Expand Down
5 changes: 3 additions & 2 deletions simba/utils/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
DirectoryNotEmptyError, FFMPEGNotFoundError,
FloatError, FrameRangeError, IntegerError,
InvalidFilepathError, InvalidInputError,
NoDataError, NoFilesFoundError, NoROIDataError,
MissingColumnsError, NoDataError,
NoFilesFoundError, NoROIDataError,
NotDirectoryError, ParametersFileError,
StringError, MissingColumnsError)
StringError)
from simba.utils.warnings import (CorruptedFileWarning, FrameRangeWarning,
InvalidValueWarning, NoDataFoundWarning)

Expand Down

0 comments on commit ea1d7d1

Please sign in to comment.