lucasmiranda42/deepof

View on GitHub

Showing 363 of 363 total issues

File jquery-3.6.0.js has 6891 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v3.6.0
 * https://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in docs/build/html/_static/jquery-3.6.0.js - About 2 wks to fix

    Function Sizzle has 1510 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    ( function( window ) {
    var i,
        support,
        Expr,
        getText,
    Severity: Major
    Found in docs/build/html/_static/jquery-3.6.0.js - About 1 wk to fix

      File visuals.py has 2311 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """General plotting functions for the deepof package."""
      # @author lucasmiranda42
      # encoding: utf-8
      # module deepof
      
      
      Severity: Major
      Found in deepof/visuals.py - About 6 days to fix

        File data.py has 2050 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        """Data structures for preprocessing and wrangling of motion tracking output data. This is the main module handled by the user.
        
        There are three main data structures to pay attention to:
        - :class:`~deepof.data.Project`, which serves as a configuration hub for the whole pipeline
        - :class:`~deepof.data.Coordinates`, which acts as an intermediary between project configuration and data, and contains
        Severity: Major
        Found in deepof/data.py - About 5 days to fix

          File utils.py has 1645 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # @author lucasmiranda42
          # encoding: utf-8
          # module deepof
          
          """Functions and general utilities for the deepof package."""
          Severity: Major
          Found in deepof/utils.py - About 4 days to fix

            File models.py has 1637 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            """deep autoencoder models for unsupervised pose detection.
            
            - VQ-VAE: a variational autoencoder with a vector quantization latent-space (https://arxiv.org/abs/1711.00937).
            - VaDE: a variational autoencoder with a Gaussian mixture latent-space.
            - Contrastive: an embedding model consisting of a single encoder, trained using a contrastive loss.
            Severity: Major
            Found in deepof/models.py - About 4 days to fix

              File underscore-1.13.1.js has 1445 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              (function (global, factory) {
                typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
                typeof define === 'function' && define.amd ? define('underscore', factory) :
                (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {
                  var current = global._;
              Severity: Major
              Found in docs/build/html/_static/underscore-1.13.1.js - About 3 days to fix

                File model_utils.py has 1354 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # @author lucasmiranda42
                # encoding: utf-8
                # module deepof
                
                """Utility functions for both training autoencoder models in deepof.models and tuning hyperparameters with deepof.hypermodels."""
                Severity: Major
                Found in deepof/model_utils.py - About 3 days to fix

                  File post_hoc.py has 923 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # @author lucasmiranda42
                  # encoding: utf-8
                  # module deepof
                  
                  """Data structures and functions for analyzing supervised and unsupervised model results."""
                  Severity: Major
                  Found in deepof/post_hoc.py - About 2 days to fix

                    File annotation_utils.py has 679 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    # @author lucasmiranda42
                    # encoding: utf-8
                    # module deepof
                    
                    """Functions and general utilities for supervised pose estimation. See documentation for details."""
                    Severity: Major
                    Found in deepof/annotation_utils.py - About 1 day to fix

                      Function get_coords has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def get_coords(
                              self,
                              center: str = False,
                              polar: bool = False,
                              speed: int = 0,
                      Severity: Minor
                      Found in deepof/data.py - About 1 day 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 setDocument has 262 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      setDocument = Sizzle.setDocument = function( node ) {
                          var hasCompare, subWindow,
                              doc = node ? node.ownerDocument || node : preferredDoc;
                      
                          // Return early if doc is invalid or already selected
                      Severity: Major
                      Found in docs/build/html/_static/jquery-3.6.0.js - About 1 day to fix

                        Function ajax has 259 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            ajax: function( url, options ) {
                        
                                // If url is an object, simulate pre-1.5 signature
                                if ( typeof url === "object" ) {
                                    options = url;
                        Severity: Major
                        Found in docs/build/html/_static/jquery-3.6.0.js - About 1 day to fix

                          Function preprocess has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def preprocess(
                                  self,
                                  automatic_changepoints=False,
                                  handle_ids: str = "concat",
                                  window_size: int = 25,
                          Severity: Minor
                          Found in deepof/data.py - About 1 day 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 tag_annotated_frames has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def tag_annotated_frames(
                              frame,
                              font,
                              frame_speeds,
                              animal_ids,
                          Severity: Minor
                          Found in deepof/visuals.py - About 1 day 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 Stemmer has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
                          Open

                          var Stemmer = function() {
                          
                            var step2list = {
                              ational: 'ate',
                              tional: 'tion',
                          Severity: Minor
                          Found in docs/build/html/_static/language_data.js - About 1 day 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_gantt has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def plot_gantt(
                              coordinates: project,
                              experiment_id: str,
                              soft_counts: table_dict = None,
                              supervised_annotations: table_dict = None,
                          Severity: Minor
                          Found in deepof/visuals.py - About 7 hrs 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 Deferred has 178 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              Deferred: function( func ) {
                                  var tuples = [
                          
                                          // action, add listener, callbacks,
                                          // ... .then handlers, argument index, [final state]
                          Severity: Major
                          Found in docs/build/html/_static/jquery-3.6.0.js - About 7 hrs to fix

                            Function align_deepof_kinematics_with_unsupervised_labels has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def align_deepof_kinematics_with_unsupervised_labels(
                                deepof_project: coordinates,
                                kin_derivative: int = 1,
                                center: str = "Center",
                                align: str = "Spine_1",
                            Severity: Minor
                            Found in deepof/post_hoc.py - About 6 hrs 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_embeddings has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def plot_embeddings(
                                coordinates: coordinates,
                                embeddings: table_dict = None,
                                soft_counts: table_dict = None,
                                breaks: table_dict = None,
                            Severity: Minor
                            Found in deepof/visuals.py - About 6 hrs 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