aidos-lab/TARDIS

View on GitHub

Showing 14 of 24 total issues

Function calculate_euclidicity has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

def calculate_euclidicity(
Severity: Major
Found in tardis/api.py - About 1 hr to fix

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

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

      Function setup has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def setup():
          """Perform logging and argument parsing setup.
      
          Sets up the command-line interface for subsequent usage so that we
          do not clutter up the actual Euclidicity calculations.
      Severity: Minor
      Found in tardis/cli.py - About 1 hr to fix

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

        def sample_from_constant_curvature_annulus(n, K, r, R, seed=None, **kwargs):
        Severity: Minor
        Found in tardis/shapes.py - About 45 mins to fix

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

          def sample_from_annulus(n, r, R, d=2, seed=None):
              """Sample points from an annulus.
          
              This function samples `N` points from an annulus with inner radius `r`
              and outer radius `R`.
          Severity: Minor
          Found in tardis/shapes.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 sample_from_annulus has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def sample_from_annulus(n, r, R, d=2, seed=None):
          Severity: Minor
          Found in tardis/shapes.py - About 35 mins to fix

            Function sample_from_wedged_sphere_varying_dim has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def sample_from_wedged_sphere_varying_dim(n=100, d1=1, d2=2, r=1, noise=None):
            Severity: Minor
            Found in tardis/shapes.py - About 35 mins to fix

              Function sample_from_wedged_spheres has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def sample_from_wedged_spheres(n=100, d=2, r=1, noise=None, seed=None):
              Severity: Minor
              Found in tardis/shapes.py - About 35 mins to fix

                Function sample_from_sphere has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def sample_from_sphere(n=100, d=2, r=1, noise=None, seed=None):
                Severity: Minor
                Found in tardis/shapes.py - About 35 mins to fix

                  Function _calculate_euclidicity has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def _calculate_euclidicity(self, r, s, X, x, d):
                  Severity: Minor
                  Found in tardis/euclidicity.py - About 35 mins to fix

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

                    def linkcode_resolve(domain, info):
                        # Let's frown on global imports and do everything locally as much as
                        # we can.
                        import sys
                        import tardis
                    Severity: Minor
                    Found in docs/source/conf.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 _calculate_euclidicity has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def _calculate_euclidicity(self, r, s, X, x, d):
                            if self.tree is not None:
                                inner_indices = self.tree.query_radius(x.reshape(1, -1), r)[0]
                                outer_indices = self.tree.query_radius(x.reshape(1, -1), s)[0]
                    
                    
                    Severity: Minor
                    Found in tardis/euclidicity.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 __call__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def __call__(self, X, x, **kwargs):
                            """Calculate Euclidicity of a specific point.
                    
                            Parameters
                            ----------
                    Severity: Minor
                    Found in tardis/euclidicity.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

                    Function load_data has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def load_data(filename, batch_size, n_query_points, seed=None):
                        """Load data from filename, depending on input type.
                    
                        Parameters
                        ----------
                    Severity: Minor
                    Found in tardis/utils.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