Showing 195 of 195 total issues
Function _check_enum_inputs
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def _check_enum_inputs(
coordinates: coordinates,
origin: object = None,
experiment_id: str = None,
exp_condition: str = None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function embedding_model_fitting
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def embedding_model_fitting(
preprocessed_object: Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray],
adjacency_matrix: np.ndarray,
embedding_model: str,
encoder_type: str,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_distances
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def get_distances(
self,
speed: int = 0,
selected_id: str = None,
filter_on_graph: bool = True,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function plot_transitions
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def plot_transitions(
coordinates: coordinates,
embeddings: table_dict,
soft_counts: table_dict,
breaks: table_dict = None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_areas
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def get_areas(self, tab_dict: dict, verbose: bool = True) -> dict:
"""Compute all relevant areas (head, torso, back) per video and per frame in the data.
Args:
tab_dict (dict): Dictionary of pandas DataFrames containing the trajectories of all bodyparts.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_angles
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def get_angles(
self,
degrees: bool = False,
speed: int = 0,
selected_id: str = None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function embedding_model_fitting
has 30 arguments (exceeds 4 allowed). Consider refactoring. Open
def embedding_model_fitting(
Function kleinberg
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def kleinberg(
offsets: list, s: float = np.e, gamma: float = 1.0, n=None, T=None, k=None
):
"""Apply Kleinberg's algorithm (described in 'Bursty and Hierarchical Structure in Streams').
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function deep_unsupervised_embedding
has 28 arguments (exceeds 4 allowed). Consider refactoring. Open
def deep_unsupervised_embedding(
Function select_time_bin
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def select_time_bin(
embedding: table_dict = None,
soft_counts: table_dict = None,
breaks: table_dict = None,
supervised_annotations: table_dict = None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_graph_dataset
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def get_graph_dataset(
self,
animal_id: str = None,
precomputed_tab_dict: table_dict = None,
center: str = False,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function rupture_per_experiment
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def rupture_per_experiment(
table_dict: table_dict,
to_rupture: np.ndarray,
rupture_indices: list,
automatic_changepoints: str,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File visuals_utils.py
has 297 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""General plotting functions for the deepof package."""
# @author NoCreativeIdeaForGoodusername
# encoding: utf-8
# module deepof
Function plot_embeddings
has 24 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_embeddings(
Function __init__
has 23 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 22 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function heatmap
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def heatmap(
dframe: pd.DataFrame,
bodyparts: List,
xlim: tuple = None,
ylim: tuple = None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function annotate_video
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def annotate_video(
coordinates: coordinates,
tag_dict: pd.DataFrame,
vid_index: int,
frame_limit: int = np.inf,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function supervised_tagging
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def supervised_tagging(
coord_object: coordinates,
raw_coords: table_dict,
coords: table_dict,
dists: table_dict,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _process_animation_data
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def _process_animation_data(
coordinates,
experiment_id,
animal_id,
center,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"