Marcello-Sega/pytim

View on GitHub

Showing 713 of 713 total issues

FIXME found
Open

        x, y, z = self._select_coords(use, bins=bins)  # TODO FIXME
Severity: Minor
Found in pytim/observables/contactangle.py by fixme

TODO found
Open

            # TODO: tests on the second dimension...

TODO found
Open

                0]):  # TODO should this be moved out of assign_layers?
Severity: Minor
Found in pytim/itim.py by fixme

TODO found
Open

# TODO: should move  all AtomGroup references to a higher level
Severity: Minor
Found in pytim/vtk.py by fixme

TODO found
Open

        # TODO the successive layers analysis should be done by removing points
Severity: Minor
Found in pytim/gitim.py by fixme

TODO found
Open

    # TODO: add a flag to prevent recomputing the reference frame, in case

TODO found
Open

            # TODO: tests on the second dimension...
Severity: Minor
Found in pytim/observables/rdf.py by fixme

TODO found
Open

    # TODO: rename
Severity: Minor
Found in pytim/sanity_check.py by fixme

TODO found
Open

        # TODO: does it need extension to 2- or 1- dimensional frames?

Rename function "_NN_query" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def _NN_query(kdtree, position, qrange):
Severity: Major
Found in pytim/utilities.py by sonar-python

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...

Rename function "patchOpenMM" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def patchOpenMM(simulation, interface):
Severity: Major
Found in pytim/patches.py by sonar-python

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...

Rename function "EulerRotation" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def EulerRotation(phi, theta, psi):
Severity: Major
Found in pytim/utilities_geometry.py by sonar-python

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...

Remove this commented out code.
Open

           # return cartesian[:,self.dirmask]

Programmers should not comment out code as it bloats programs and reduces readability.

Unused code should be deleted and can be retrieved from source control history if required.

See

  • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
  • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
  • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
  • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

Rename function "polygonalArea" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def polygonalArea(points):
Severity: Major
Found in pytim/utilities_geometry.py by sonar-python

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...

Method "__init__" has 8 parameters, which is greater than the 7 authorized.
Open

    def __init__(self,
                 direction=None,
                 observable=None,
                 interface=None,
                 symmetry='default',
Severity: Major
Found in pytim/observables/profile.py by sonar-python

A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

Noncompliant Code Example

With a maximum number of 4 parameters:

def do_something(param1, param2, param3, param4, param5):
    ...

Compliant Solution

def do_something(param1, param2, param3, param4):
    ...

Refactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed.
Open

    def _assign_layers(self):
Severity: Critical
Found in pytim/itim.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Remove this commented out code.
Open

        if np.isclose(fac, 0.0):  # a=c and b=0

Programmers should not comment out code as it bloats programs and reduces readability.

Unused code should be deleted and can be retrieved from source control history if required.

See

  • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
  • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
  • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
  • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

Refactor this function to reduce its Cognitive Complexity from 20 to the 15 allowed.
Open

    def sample(self, g1=None, g2=None, kargs1=None, kargs2=None):

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.
Open

    def _assign_one_side(self,
Severity: Critical
Found in pytim/itim.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

Rename function "patchTrajectory" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def patchTrajectory(trajectory, interface):
Severity: Major
Found in pytim/patches.py by sonar-python

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...
Severity
Category
Status
Source
Language