pbrod/Nvector

View on GitHub

Showing 9 of 343 total issues

File objects.py has 1326 lines of code (exceeds 1000 allowed). Consider refactoring.
Open

"""
Object oriented interface to geodesic functions
===============================================

"""
Severity: Major
Found in src/nvector/objects.py - About 1 day to fix

    File core.py has 1063 lines of code (exceeds 1000 allowed). Consider refactoring.
    Open

    """
    Core geodesic functions
    =======================
    This file is part of NavLab and is available from www.navlab.net/nvector
    
    
    Severity: Major
    Found in src/nvector/core.py - About 3 hrs to fix

      Function geodesic_distance has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def geodesic_distance(lat_a, lon_a, lat_b, lon_b, a=6378137, f=1.0 / 298.257223563):
          """
          Returns surface distance between positions A and B on an ellipsoid.
      
          Parameters
      Severity: Minor
      Found in src/nvector/karney.py - About 1 hr to fix

        Function __astroid has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def __astroid(x, y):
            """
            ASTROID  Solve the astroid equation
        
            K = ASTROID(X, Y) solves the quartic polynomial Eq. (55)
        Severity: Minor
        Found in src/nvector/karney.py - About 1 hr to fix

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

          def array_to_list_dict(data):
              """
              Convert dict arrays to dict of lists.
          
              Parameters
          Severity: Minor
          Found in src/nvector/util.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 _interp_vectors has 8 arguments (exceeds 7 allowed). Consider refactoring.
          Open

          def _interp_vectors(t_i, t, nvectors, kind, window_length, polyorder, mode, cval):
          Severity: Major
          Found in src/nvector/core.py - About 35 mins to fix

            Function interp_nvectors has 8 arguments (exceeds 7 allowed). Consider refactoring.
            Open

            def interp_nvectors(t_i, t, nvectors, kind='linear', window_length=0, polyorder=2, mode='interp',
            Severity: Major
            Found in src/nvector/core.py - About 35 mins to fix

              Function _solve_alpha1 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              def _solve_alpha1(alpha1, blat1, blat2, true_lamda12, a, f, tol=1e-15):
                  b = polar_radius(a, f)
                  eta = third_flattening(f)
                  e_2, e2m = eccentricity2(f)
              
              
              Severity: Minor
              Found in src/nvector/karney.py - About 35 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 use_docstring has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def use_docstring(docstring):
                  """This decorator modifies the decorated function's docstring with supplied docstring.
              
                  If the function's docstring is None it is replaced with the supplied docstring.
                  otherwise it is set to old_docstring.format(super=docstring)
              Severity: Minor
              Found in src/nvector/_common.py - About 25 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