BlueBrain/eFEL

View on GitHub

Showing 79 of 91 total issues

File versioneer.py has 1650 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Version: 0.29
 
"""The Versioneer - like a rocketeer, but for versions.
 
The Versioneer
Severity: Major
Found in versioneer.py - About 4 days to fix

    Function extract_stim_times_from_neo_data has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring.
    Open

    def extract_stim_times_from_neo_data(blocks, stim_start, stim_end) -> tuple:
    """
    Seeks for the stim_start and stim_end parameters inside the Neo data.
     
    Args:
    Severity: Minor
    Found in efel/io.py - About 1 day to fix

    File _version.py has 495 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # This file helps to compute a version number in source trees obtained from
    # git-archive tarball (such as those provided by githubs download-from-tag
    # feature). Distribution tarballs (built by setup.py sdist) and build
    # directories (produced by setup.py build) will contain a much shorter file
    # that just contains the computed version number.
    Severity: Minor
    Found in efel/_version.py - About 7 hrs to fix

      File extrafeats.py has 385 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """Extracellular features functions"""
       
      """
      Copyright (c) 2024, EPFL/Blue Brain Project
       
       
      Severity: Minor
      Found in efel/pyfeatures/extrafeats.py - About 5 hrs to fix

        File pyfeatures.py has 374 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        from __future__ import annotations
        """Python implementation of features"""
         
        """
        Copyright (c) 2015, Blue Brain Project/EPFL
        Severity: Minor
        Found in efel/pyfeatures/pyfeatures.py - About 5 hrs to fix

          File api.py has 370 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          """eFEL Python API functions.
           
          This module provides the user-facing Python API of eFEL.
          The convenience functions defined here call the underlying 'cppcore' library
          to hide the lower level API from the user.
          Severity: Minor
          Found in efel/api.py - About 4 hrs to fix

            Function get_cmdclass has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
            Open

            def get_cmdclass(cmdclass: Optional[Dict[str, Any]] = None):
            """Get the custom setuptools subclasses used by Versioneer.
             
            If the package uses a different cmdclass (e.g. one from numpy), it
            should be provide as an argument.
            Severity: Minor
            Found in versioneer.py - About 4 hrs to fix

            Function git_pieces_from_vcs has a Cognitive Complexity of 27 (exceeds 5 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 3 hrs to fix

            Function git_pieces_from_vcs has a Cognitive Complexity of 27 (exceeds 5 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 3 hrs to fix

            File isi.py has 299 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            """Features that are depending on the inter-spike intervals."""
            from __future__ import annotations
            import logging
            from typing_extensions import deprecated
            import warnings
            Severity: Minor
            Found in efel/pyfeatures/isi.py - About 3 hrs to fix

              Function git_versions_from_keywords has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

              def git_versions_from_keywords(
              keywords: Dict[str, str],
              tag_prefix: str,
              verbose: bool,
              ) -> Dict[str, Any]:
              Severity: Minor
              Found in versioneer.py - About 2 hrs to fix

              Function git_versions_from_keywords has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

              def git_versions_from_keywords(
              keywords: Dict[str, str],
              tag_prefix: str,
              verbose: bool,
              ) -> Dict[str, Any]:
              Severity: Minor
              Found in efel/_version.py - About 2 hrs to fix

              Function get_versions has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

              def get_versions(verbose: bool = False) -> Dict[str, Any]:
              """Get the project version from whatever source is available.
               
              Returns dict with two keys: 'version' and 'full'.
              """
              Severity: Minor
              Found in versioneer.py - About 2 hrs to fix

              Function run_command has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
              Open

              def run_command(
              commands: List[str],
              args: List[str],
              cwd: Optional[str] = None,
              verbose: bool = False,
              Severity: Minor
              Found in efel/_version.py - About 2 hrs to fix

              Function run_command has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
              Open

              def run_command(
              commands: List[str],
              args: List[str],
              cwd: Optional[str] = None,
              verbose: bool = False,
              Severity: Minor
              Found in versioneer.py - About 2 hrs to fix

              Function git_get_keywords has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

              def git_get_keywords(versionfile_abs: str) -> Dict[str, str]:
              """Extract version information from the given file."""
              # the code embedded in _version.py can just fetch the value of these
              # keywords. When used from setup.py, we don't want to import _version.py,
              # so we do it with a regexp instead. This function is not used from
              Severity: Minor
              Found in efel/_version.py - About 2 hrs to fix

              Function git_get_keywords has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

              def git_get_keywords(versionfile_abs: str) -> Dict[str, str]:
              """Extract version information from the given file."""
              # the code embedded in _version.py can just fetch the value of these
              # keywords. When used from setup.py, we don't want to import _version.py,
              # so we do it with a regexp instead. This function is not used from
              Severity: Minor
              Found in versioneer.py - About 2 hrs to fix

              Function calculate_features has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
              Open

              def calculate_features(
              waveforms,
              sampling_frequency,
              upsample=None,
              feature_names=None,
              Severity: Minor
              Found in efel/pyfeatures/extrafeats.py - About 2 hrs to fix

              Function initburst_sahp has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
              Open

              def initburst_sahp() -> np.ndarray | None:
              """SlowAHP voltage after initial burst."""
              # Required cpp features
              voltage = get_cpp_feature("voltage")
              time = get_cpp_feature("time")
              Severity: Minor
              Found in efel/pyfeatures/isi.py - About 2 hrs to fix

              Function do_vcs_install has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

              def do_vcs_install(versionfile_source: str, ipy: Optional[str]) -> None:
              """Git-specific installation logic for Versioneer.
               
              For Git, this means creating/changing .gitattributes to mark _version.py
              for export-subst keyword substitution.
              Severity: Minor
              Found in versioneer.py - About 1 hr to fix
              Severity
              Category
              Status
              Source
              Language