lucasmiranda42/deepof

View on GitHub

Showing 195 of 195 total issues

Function plot_stationary_entropy has 14 arguments (exceeds 4 allowed). Consider refactoring.
Open

def plot_stationary_entropy(
Severity: Major
Found in deepof/visuals.py - About 1 hr to fix

    Function embedding_per_video has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    def embedding_per_video(
        coordinates: coordinates,
        to_preprocess: table_dict,
        model: tf.keras.models.Model,
        scale: str = "standard",
    Severity: Minor
    Found in deepof/model_utils.py - About 1 hr 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 annotate_time_chunks has 14 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def annotate_time_chunks(
    Severity: Major
    Found in deepof/post_hoc.py - About 1 hr to fix

      Function get_vade has 14 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def get_vade(
      Severity: Major
      Found in deepof/models.py - About 1 hr to fix

        Function get_TCN_encoder has 14 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def get_TCN_encoder(
        Severity: Major
        Found in deepof/models.py - About 1 hr to fix

          Function _initialize_constraints has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
          Open

              def _initialize_constraints(self, data):
                  """
                  Initializes the body part constraints based on a sample of frames with complete mouse data
          
                  Args:
          Severity: Minor
          Found in deepof/utils.py - About 1 hr 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 tune_search has 13 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def tune_search(
          Severity: Major
          Found in deepof/model_utils.py - About 1 hr to fix

            Function tag_annotated_frames has 13 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def tag_annotated_frames(
            Severity: Major
            Found in deepof/visuals.py - About 1 hr to fix

              Function plot_gantt has 13 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def plot_gantt(
              Severity: Major
              Found in deepof/visuals.py - About 1 hr to fix

                Function _check_enum_inputs has 13 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def _check_enum_inputs(
                Severity: Major
                Found in deepof/visuals.py - About 1 hr to fix

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

                      def __init__(
                  Severity: Major
                  Found in deepof/models.py - About 1 hr to fix

                    Function sniff_object has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def sniff_object(
                        speed_dframe: pd.DataFrame,
                        arena_type: str,
                        arena: np.array,
                        pos_dict: pd.DataFrame,
                    Severity: Minor
                    Found in deepof/annotation_utils.py - About 1 hr 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 edit_arenas has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def edit_arenas(
                            self, videos: list = None, arena_type: str = None, verbose: bool = True
                        ):  # pragma: no cover
                            """Tag the arena in the videos.
                    
                    
                    Severity: Minor
                    Found in deepof/data.py - About 1 hr 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 plot_stationary_entropy has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def plot_stationary_entropy(
                        coordinates: coordinates,
                        embeddings: table_dict,
                        soft_counts: table_dict,
                        breaks: table_dict = None,
                    Severity: Minor
                    Found in deepof/visuals.py - About 1 hr 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 call has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def call(self, inputs, training=False):  # pragma: no cover
                            """Compute the output of the layer."""
                            z_gauss_mean = self.z_gauss_mean(inputs)
                            z_gauss_var = self.z_gauss_var(inputs)
                    
                    
                    Severity: Minor
                    Found in deepof/models.py - About 1 hr 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 __init__ has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def __init__(
                            self,
                            animal_ids: List = None,
                            arena: str = "polygonal-autodetect",
                            bodypart_graph: Union[str, dict] = "deepof_14",
                    Severity: Minor
                    Found in deepof/data.py - About 1 hr to fix

                      Function sniff_object has 12 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def sniff_object(
                      Severity: Major
                      Found in deepof/annotation_utils.py - About 1 hr to fix

                        Function preprocess has 12 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def preprocess(
                        Severity: Major
                        Found in deepof/data.py - About 1 hr to fix

                          Function condition_distance_binning has 12 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def condition_distance_binning(
                          Severity: Major
                          Found in deepof/post_hoc.py - About 1 hr to fix

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

                                def __init__(
                            Severity: Major
                            Found in deepof/models.py - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language