BlueBrain/eFEL

View on GitHub

Showing 91 of 91 total issues

Function set_setting has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

def set_setting(self,
setting_name: str,
new_value: Union[int, float, str, bool]) -> None:
"""Set a certain setting to a new value.
 
 
Severity: Minor
Found in efel/settings.py - About 1 hr to fix

Function evaluate has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def evaluate(individual, target_voltage1=-80, target_voltage2=-60):
"""
Evaluate a neuron model with parameters e_pas and g_pas, extracts
features from resulting traces and returns a tuple with
abs(voltage_base-target_voltage1) and
Severity: Minor
Found in examples/deap/deap_efel_eval2.py - About 1 hr to fix

    Function __init__ has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def __init__(self, conductances):
     
    # Properties of the cell soma
    self.soma = h.Section(name='soma')
    self.soma.nseg = 1
    Severity: Minor
    Found in examples/deap/GranuleCell1/GranuleCell1.py - About 1 hr to fix

      Function render has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]:
      """Render the given version pieces into the requested style."""
      if pieces["error"]:
      return {"version": "unknown",
      "full-revisionid": pieces.get("long"),
      Severity: Minor
      Found in efel/_version.py - About 1 hr to fix

      Function get_distance has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def get_distance(
      trace: dict,
      feature_name: str,
      mean: float,
      std: float,
      Severity: Minor
      Found in efel/api.py - About 1 hr to fix

      Function _initSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def _initSettings() -> None:
      """Init the settings in cppcore."""
      settings_attrs = vars(_settings)
      for setting_name, setting_value in settings_attrs.items():
      if isinstance(setting_value, bool):
      Severity: Minor
      Found in efel/api.py - About 1 hr to fix

      Function render has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]:
      """Render the given version pieces into the requested style."""
      if pieces["error"]:
      return {"version": "unknown",
      "full-revisionid": pieces.get("long"),
      Severity: Minor
      Found in versioneer.py - About 1 hr to fix

      Function compare_features has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def compare_features(orig_features, new_features):
      obj_values = []
      for step_number in orig_features:
      for feature_name, feature_value in orig_features[step_number].items():
      if feature_value is not None:
      Severity: Minor
      Found in examples/deap/GranuleCell1/GranuleCellDeap1-scoop.py - About 1 hr to fix

      Function impedance has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def impedance():
      from scipy.ndimage.filters import gaussian_filter1d
       
      dt = _get_cpp_data("interp_step")
      Z_max_freq = _get_cpp_data("impedance_max_freq")
      Severity: Minor
      Found in efel/pyfeatures/pyfeatures.py - About 1 hr to fix

      Function do_setup has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def do_setup() -> int:
      """Do main VCS-independent setup function for installing Versioneer."""
      root = get_root()
      try:
      cfg = get_config_from_root(root)
      Severity: Minor
      Found in versioneer.py - About 1 hr to fix

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

      def git_pieces_from_vcs(
      tag_prefix: str,
      root: str,
      verbose: bool,
      runner: Callable = run_command
      Severity: Minor
      Found in versioneer.py - About 1 hr to fix

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

        def git_pieces_from_vcs(
        tag_prefix: str,
        root: str,
        verbose: bool,
        runner: Callable = run_command
        Severity: Minor
        Found in efel/_version.py - About 1 hr to fix

          Function evaluate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          def evaluate(individual, target_voltage1=-80, target_voltage2=-60):
          """
          Evaluate a neuron model with parameters e_pas and g_pas, extracts
          features from resulting traces and returns a tuple with
          abs(voltage_base-target_voltage1) and
          Severity: Minor
          Found in examples/deap/deap_efel_eval1.py - About 1 hr to fix

            Function render_pep440 has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

            def render_pep440(pieces: Dict[str, Any]) -> str:
            """Build up version string, with post-release "local version identifier".
             
            Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
            get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
            Severity: Minor
            Found in versioneer.py - About 1 hr to fix

            Function render_pep440 has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

            def render_pep440(pieces: Dict[str, Any]) -> str:
            """Build up version string, with post-release "local version identifier".
             
            Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
            get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
            Severity: Minor
            Found in efel/_version.py - About 1 hr to fix

            Function render_pep440_post has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

            def render_pep440_post(pieces: Dict[str, Any]) -> str:
            """TAG[.postDISTANCE[.dev0]+gHEX] .
             
            The ".dev0" means dirty. Note that .dev0 sorts backwards
            (a dirty tree will appear "older" than the corresponding clean one),
            Severity: Minor
            Found in versioneer.py - About 1 hr to fix

            Function render_pep440_post has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

            def render_pep440_post(pieces: Dict[str, Any]) -> str:
            """TAG[.postDISTANCE[.dev0]+gHEX] .
             
            The ".dev0" means dirty. Note that .dev0 sorts backwards
            (a dirty tree will appear "older" than the corresponding clean one),
            Severity: Minor
            Found in efel/_version.py - About 1 hr to fix

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

            def render_pep440_old(pieces: Dict[str, Any]) -> str:
            """TAG[.postDISTANCE[.dev0]] .
             
            The ".dev0" means dirty.
             
             
            Severity: Minor
            Found in versioneer.py - About 55 mins to fix

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

            def burst_ISI_indices() -> np.ndarray | None:
            """Calculate burst ISI indices based on burst factor and ISI values."""
            # Fetching necessary data
            isi_values = ISI_values()
            if isi_values is None:
            Severity: Minor
            Found in efel/pyfeatures/isi.py - About 55 mins to fix

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

            def render_pep440_old(pieces: Dict[str, Any]) -> str:
            """TAG[.postDISTANCE[.dev0]] .
             
            The ".dev0" means dirty.
             
             
            Severity: Minor
            Found in efel/_version.py - About 55 mins to fix
            Severity
            Category
            Status
            Source
            Language