BlueBrain/eFEL

View on GitHub

Showing 79 of 91 total issues

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

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

        def render_pep440_pre(pieces: Dict[str, Any]) -> str:
        """TAG[.postN.devDISTANCE] -- No -dirty.
         
        Exceptions:
        1: no tags. 0.post0.devDISTANCE
        Severity: Minor
        Found in versioneer.py - About 55 mins to fix

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

        def render_pep440_pre(pieces: Dict[str, Any]) -> str:
        """TAG[.postN.devDISTANCE] -- No -dirty.
         
        Exceptions:
        1: no tags. 0.post0.devDISTANCE
        Severity: Minor
        Found in efel/_version.py - About 55 mins to fix

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

        def repolarization_slope(waveforms,
        sampling_frequency,
        return_idx=False
        ):
        """
        Severity: Minor
        Found in efel/pyfeatures/extrafeats.py - About 45 mins to fix

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

        def get_distance(
        Severity: Minor
        Found in efel/api.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

          if epoch.name in (
          "stim",
          "stimulus",
          "stimulation",
          "current_injection"):
          Severity: Major
          Found in efel/io.py - About 45 mins to fix

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

            def getDistance(
            Severity: Minor
            Found in efel/api.py - About 45 mins to fix

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

              def get_features(conductances):
              feature_values = collections.defaultdict(dict)
              traces = []
              times = []
              voltages = []
              Severity: Minor
              Found in examples/deap/GranuleCell1/GranuleCellDeap1-scoop.py - About 45 mins to fix

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

              def run_command(
              Severity: Minor
              Found in efel/_version.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                if event.name in (
                "stim_start",
                "stimulus_start",
                "stimulation_start",
                "current_injection_start"):
                Severity: Major
                Found in efel/io.py - About 45 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language