lucasmiranda42/deepof

View on GitHub

Showing 344 of 362 total issues

Function export_annotated_video has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def export_annotated_video(
    coordinates: coordinates,
    soft_counts: dict = None,
    breaks: dict = None,
    experiment_id: str = None,
Severity: Minor
Found in deepof/visuals.py - About 55 mins to fix

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 extend has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    def extend(
        self,
        project_to_extend: coordinates,
        verbose: bool = True,
        debug: bool = True,
Severity: Minor
Found in deepof/data.py - About 55 mins to fix

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 merge has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    def merge(self, *args, ignore_index=False):
        """Take a number of table_dict objects and merges them to the current one.

        Returns a table_dict object of type 'merged'.
        Only annotations of the first table_dict object are kept.
Severity: Minor
Found in deepof/data.py - About 55 mins to fix

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 load_segmentation_model has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def load_segmentation_model(path):
    model_url = "https://datashare.mpcdf.mpg.de/s/GccLGXXZmw34f8o/download"

    if path is None:
        installation_path = os.path.dirname(os.path.abspath(__file__))
Severity: Minor
Found in deepof/utils.py - About 55 mins to fix

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 iterative_imputation has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def iterative_imputation(project: project, tab_dict: dict, lik_dict: dict):
    """Perform iterative imputation on occluded body parts. Run per animal and experiment.

    Args:
        project (project): Project object.
Severity: Minor
Found in deepof/utils.py - About 55 mins to fix

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 set_missing_animals has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def set_missing_animals(
    coordinates: project, tab_dict: dict, lik_dict: dict, animal_ids: list = None
):
    """Set the coordinates of the missing animals to NaN.

Severity: Minor
Found in deepof/utils.py - About 55 mins to fix

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 access has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
Severity: Major
Found in docs/build/html/_static/jquery-3.6.0.js - About 50 mins to fix

    Function rupture_per_experiment has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def rupture_per_experiment(
    Severity: Major
    Found in deepof/utils.py - About 50 mins to fix

      Function plot_normative_log_likelihood has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def plot_normative_log_likelihood(
      Severity: Major
      Found in deepof/visuals.py - About 50 mins to fix

        Function hard_loss has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def hard_loss(
        Severity: Major
        Found in deepof/model_utils.py - About 50 mins to fix

          Function full_outlier_mask has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def full_outlier_mask(
          Severity: Major
          Found in deepof/utils.py - About 50 mins to fix

            Function get_graph_dataset has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def get_graph_dataset(
            Severity: Major
            Found in deepof/data.py - About 50 mins to fix

              Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(
              Severity: Major
              Found in deepof/hypermodels.py - About 50 mins to fix

                Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(
                Severity: Major
                Found in deepof/model_utils.py - About 50 mins to fix

                  Function plot_shap_swarm_per_cluster has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def plot_shap_swarm_per_cluster(
                  Severity: Major
                  Found in deepof/visuals.py - About 50 mins to fix

                    Function output_cluster_video has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def output_cluster_video(
                    Severity: Major
                    Found in deepof/visuals.py - About 50 mins to fix

                      Function tagged_video_output has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def tagged_video_output(
                      Severity: Major
                      Found in deepof/annotation_utils.py - About 50 mins to fix

                        Function select_time_bin has 7 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def select_time_bin(
                        Severity: Major
                        Found in deepof/post_hoc.py - About 50 mins to fix

                          Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def __init__(
                          Severity: Major
                          Found in deepof/model_utils.py - About 50 mins to fix

                            Function rolling_speed has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def rolling_speed(
                            Severity: Major
                            Found in deepof/utils.py - About 50 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language