lucasmiranda42/deepof

View on GitHub

Showing 195 of 195 total issues

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

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

      Function extend has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def extend(
      Severity: Minor
      Found in deepof/data.py - About 45 mins to fix

        Function climb_wall has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        def climb_wall(
            arena_type: str,
            arena: np.array,
            pos_dict: pd.DataFrame,
            tol: float,
        Severity: Minor
        Found in deepof/annotation_utils.py - About 45 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 __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

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

          Function find_learning_rate has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def find_learning_rate(
          Severity: Minor
          Found in deepof/model_utils.py - About 45 mins to fix

            Function kleinberg has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def kleinberg(
            Severity: Minor
            Found in deepof/utils.py - About 45 mins to fix

              Function kleinberg_core_numba has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def kleinberg_core_numba(
              Severity: Minor
              Found in deepof/utils.py - About 45 mins to fix

                Function outside_ellipse has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def outside_ellipse(x, y, e_center, e_axes, e_angle, threshold=0.0):
                Severity: Minor
                Found in deepof/annotation_utils.py - About 45 mins to fix

                  Function close_single_contact has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def close_single_contact(
                  Severity: Minor
                  Found in deepof/annotation_utils.py - About 45 mins to fix

                    Function look_around has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def look_around(
                    Severity: Minor
                    Found in deepof/annotation_utils.py - About 45 mins to fix

                      Function following_path has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def following_path(
                      Severity: Minor
                      Found in deepof/annotation_utils.py - About 45 mins to fix

                        Function dcl_loss has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def dcl_loss(
                        Severity: Minor
                        Found in deepof/model_utils.py - About 45 mins to fix

                          Function _scatter_embeddings has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def _scatter_embeddings(
                          Severity: Minor
                          Found in deepof/visuals.py - About 45 mins to fix

                            Function mask_outliers has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def mask_outliers(
                            Severity: Minor
                            Found in deepof/utils.py - About 45 mins to fix

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

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

                                Function annotate_video has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def annotate_video(
                                Severity: Minor
                                Found in deepof/visuals.py - About 45 mins to fix

                                  Function separation_between_conditions has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def separation_between_conditions(
                                  Severity: Minor
                                  Found in deepof/post_hoc.py - About 45 mins to fix

                                    Function _fit_hmm_range has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    def _fit_hmm_range(concat_embeddings, states, min_states, max_states):
                                        """Auxiliary function for fitting a range of HMMs with different number of states.
                                    
                                        Args:
                                            concat_embeddings (np.ndarray): Concatenated embeddings across all animal experiments.
                                    Severity: Minor
                                    Found in deepof/post_hoc.py - About 45 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 smooth_boolean_array has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    def smooth_boolean_array(
                                        a: np.array, scale: int = 1, batch_size: int = 50000
                                    ) -> np.array:
                                        """Return a boolean array in which isolated appearances of a feature are smoothed.
                                    
                                    
                                    Severity: Minor
                                    Found in deepof/utils.py - About 45 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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language