Showing 144 of 144 total issues

File joints.py has 691 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import numpy as np
 
from .natural_coordinates import SegmentNaturalCoordinates
from .natural_marker import NaturalMarker
from .natural_segment import NaturalSegment
Severity: Major
Found in bionc/bionc_numpy/joints.py - About 1 day to fix

File natural_segment.py has 682 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from typing import Union, Tuple, Callable
 
import numpy as np
from numpy import cos, zeros, sum, dot, transpose
from numpy.linalg import inv
Severity: Major
Found in bionc/bionc_numpy/natural_segment.py - About 1 day to fix

GenericBiomechanicalModel has 70 functions (exceeds 20 allowed). Consider refactoring.
Open

class GenericBiomechanicalModel(ABC):
"""
This is an abstract base class that provides the basic structure and methods for all biomechanical models.
It contains the segments and the joints of the model. The implemented methods are not specific to numpy or casadi.
 
 
Severity: Major
Found in bionc/protocols/biomechanical_model.py - About 1 day to fix

File natural_segment.py has 593 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from typing import Union, Tuple
 
import numpy as np
from casadi import MX
from casadi import cos, transpose, vertcat, inv, dot, sum1, horzcat, solve
Severity: Major
Found in bionc/bionc_casadi/natural_segment.py - About 1 day to fix

File biomechanical_model.py has 587 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from abc import ABC, abstractmethod
from typing import Union, Any
 
import dill as pickle
import numpy as np
Severity: Major
Found in bionc/protocols/biomechanical_model.py - About 1 day to fix

File joints.py has 577 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import numpy as np
from casadi import MX, dot, cos, transpose, sumsqr
 
from .natural_coordinates import SegmentNaturalCoordinates
from .natural_marker import NaturalMarker
Severity: Major
Found in bionc/bionc_casadi/joints.py - About 1 day to fix

File biomechanical_model.py has 549 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from typing import Any
 
import numpy as np
from numpy import transpose
 
 
Severity: Major
Found in bionc/bionc_numpy/biomechanical_model.py - About 1 day to fix

File inverse_kinematics.py has 528 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import numpy as np
from casadi import vertcat, horzcat, MX, Function, sum1
from typing import Callable
 
from .enums import InitialGuessModeType
Severity: Major
Found in bionc/bionc_numpy/inverse_kinematics.py - About 1 day to fix

File biomechanical_model.py has 503 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import numpy as np
from casadi import MX, transpose, horzcat, vertcat, solve
from typing import Any
 
from .biomechanical_model_joints import BiomechanicalModelJoints
Severity: Major
Found in bionc/bionc_casadi/biomechanical_model.py - About 1 day to fix

File joints_with_ground.py has 497 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import numpy as np
 
from .cartesian_vector import CartesianVector
from .natural_coordinates import SegmentNaturalCoordinates
from .natural_segment import NaturalSegment
Severity: Minor
Found in bionc/bionc_numpy/joints_with_ground.py - About 7 hrs to fix

File natural_segment.py has 422 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import numpy as np
from abc import ABC, abstractmethod
from casadi import MX
from typing import Union
 
 
Severity: Minor
Found in bionc/protocols/natural_segment.py - About 6 hrs to fix

AbstractNaturalSegment has 43 functions (exceeds 20 allowed). Consider refactoring.
Open

class AbstractNaturalSegment(ABC):
"""
This class represents a generic natural segment for both MX and numpy
 
Attributes
Severity: Minor
Found in bionc/protocols/natural_segment.py - About 5 hrs to fix

File joints_with_ground.py has 388 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from casadi import MX, dot, cos, transpose, vertcat
import numpy as np
 
from .natural_segment import NaturalSegment
from .natural_coordinates import SegmentNaturalCoordinates
Severity: Minor
Found in bionc/bionc_casadi/joints_with_ground.py - About 5 hrs to fix

File natural_marker.py has 353 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from typing import Callable
 
import numpy as np
 
from .biomechanical_model import BiomechanicalModel
Severity: Minor
Found in bionc/bionc_numpy/natural_marker.py - About 4 hrs to fix

Identical blocks of code found in 2 locations. Consider refactoring.
Open

class JointType(Enum):
"""
This class represents the different types of joints
"""
 
 
Severity: Major
Found in bionc/bionc_casadi/enums.py and 1 other location - About 4 hrs to fix
bionc/bionc_numpy/enums.py on lines 7..23

Identical blocks of code found in 2 locations. Consider refactoring.
Open

class JointType(Enum):
"""
This class represents the different types of joints
"""
 
 
Severity: Major
Found in bionc/bionc_numpy/enums.py and 1 other location - About 4 hrs to fix
bionc/bionc_casadi/enums.py on lines 6..22

File biomechanical_model_joints.py has 334 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from abc import ABC, abstractmethod
from typing import Any
 
from .biomechanical_model_segments import GenericBiomechanicalModelSegments
from .natural_coordinates import NaturalCoordinates
Severity: Minor
Found in bionc/protocols/biomechanical_model_joints.py - About 4 hrs to fix

File natural_marker.py has 329 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from typing import Callable
 
import numpy as np
from casadi import MX, vertcat, horzcat
 
 
Severity: Minor
Found in bionc/bionc_casadi/natural_marker.py - About 3 hrs to fix

NaturalSegment has 31 functions (exceeds 20 allowed). Consider refactoring.
Open

class NaturalSegment(AbstractNaturalSegment):
"""
Class used to define anatomical segment based on natural coordinate.
 
Methods
Severity: Minor
Found in bionc/bionc_casadi/natural_segment.py - About 3 hrs to fix

InverseKinematics has 28 functions (exceeds 20 allowed). Consider refactoring.
Open

class InverseKinematics:
"""
Inverse kinematics solver also known as Multibody Kinematics Optimization (MKO)
 
Attributes
Severity: Minor
Found in bionc/bionc_numpy/inverse_kinematics.py - About 3 hrs to fix
Severity
Category
Status
Source
Language