lucasmiranda42/deepof

View on GitHub

Showing 345 of 363 total issues

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

    def __init__(
Severity: Major
Found in deepof/data.py - About 2 hrs to fix

    Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            superMatcher = function( seed, context, xml, results, outermost ) {
                var elem, j, matcher,
                    matchedCount = 0,
                    i = "0",
                    unmatched = seed && [],
    Severity: Major
    Found in docs/build/html/_static/jquery-3.6.0.js - About 2 hrs to fix

      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,
      Severity: Minor
      Found in deepof/annotation_utils.py - About 2 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_enrichment has 20 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def plot_enrichment(
      Severity: Major
      Found in deepof/visuals.py - About 2 hrs to fix

        Function performObjectSearch has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
        Open

          performObjectSearch: (object, objectTerms) => {
            const filenames = Search._index.filenames;
            const docNames = Search._index.docnames;
            const objects = Search._index.objects;
            const objNames = Search._index.objnames;
        Severity: Minor
        Found in docs/build/html/_static/searchtools.js - About 2 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 _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,
        Severity: Minor
        Found in deepof/visuals.py - About 2 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 get_training_set has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
        Open

            def get_training_set(
                self, current_table_dict: table_dict, test_videos: int = 0
            ) -> tuple:
                """Generate training and test sets as numpy.array objects for model training.
        
        
        Severity: Minor
        Found in deepof/data.py - About 2 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_enrichment has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
        Open

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

            def get_areas(self, speed: int = 0, selected_id: str = "all") -> table_dict:
                """Return a table_dict object with all relevant areas (head, torso, back, full). Unless specified otherwise, the areas are computed for all animals.
        
                Args:
                    speed (int): The derivative to use for speed.
        Severity: Minor
        Found in deepof/data.py - About 2 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 domManip has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function domManip( collection, args, callback, ignored ) {
        
            // Flatten any nested arrays
            args = flat( args );
        
        
        Severity: Major
        Found in docs/build/html/_static/jquery-3.6.0.js - About 2 hrs to fix

          Function ajaxConvert has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function ajaxConvert( s, response, jqXHR, isSuccess ) {
              var conv2, current, conv, tmp, prev,
                  converters = {},
          
                  // Work with a copy of dataTypes in case we need to modify it for conversion
          Severity: Major
          Found in docs/build/html/_static/jquery-3.6.0.js - About 2 hrs to fix

            Function highlightText has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
            Open

            jQuery.fn.highlightText = function(text, className) {
                function highlight(node, addItems) {
                    if (node.nodeType === 3) {
                        var val = node.nodeValue;
                        var pos = val.toLowerCase().indexOf(text);
            Severity: Minor
            Found in docs/build/html/_static/_sphinx_javascript_frameworks_compat.js - About 2 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 set_up_project_directory has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
            Open

                def set_up_project_directory(self, debug=False):
                    """Create a project directory where to save all produced results."""
                    # Create a project directory, as well as subfolders for videos and tables
                    project_path = os.path.join(self.project_path, self.project_name)
            
            
            Severity: Minor
            Found in deepof/data.py - About 2 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 init has 54 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                init = jQuery.fn.init = function( selector, context, root ) {
                    var match, elem;
            
                    // HANDLE: $(""), $(null), $(undefined), $(false)
                    if ( !selector ) {
            Severity: Major
            Found in docs/build/html/_static/jquery-3.6.0.js - About 2 hrs to fix

              Function plot_heatmaps has 17 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def plot_heatmaps(
              Severity: Major
              Found in deepof/visuals.py - About 2 hrs to fix

                Function get_areas has a Cognitive Complexity of 16 (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.
                Severity: Minor
                Found in deepof/data.py - About 2 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 supervised_annotation has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                Open

                    def supervised_annotation(
                        self,
                        params: Dict = {},
                        center: str = "Center",
                        align: str = "Spine_1",
                Severity: Minor
                Found in deepof/data.py - About 2 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 load_table has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                Open

                def load_table(
                    tab: str,
                    table_path: str,
                    table_format: str,
                    rename_bodyparts: list = None,
                Severity: Minor
                Found in deepof/utils.py - About 2 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 remove has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    remove: function( elem, types, handler, selector, mappedTypes ) {
                
                        var j, origCount, tmp,
                            events, t, handleObj,
                            special, handlers, type, namespaces, origType,
                Severity: Major
                Found in docs/build/html/_static/jquery-3.6.0.js - About 2 hrs to fix

                  Function buildFragment has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function buildFragment( elems, context, scripts, selection, ignored ) {
                      var elem, tmp, tag, wrap, attached, j,
                          fragment = context.createDocumentFragment(),
                          nodes = [],
                          i = 0,
                  Severity: Major
                  Found in docs/build/html/_static/jquery-3.6.0.js - About 2 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language