HajimeKawahara/exojax

View on GitHub

Showing 10 of 31 total issues

Function plottau has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

def plottau(nugrid, dtauM, Tarr=None, Parr=None, unit=None, mode=None, vmin=-3, vmax=3):
    """Plot optical depth (tau). This function gives the color map of log10(tau) (or log10(dtau)), optionally w/ a T-P profile.

    Args:
        nus: wavenumber in linear scale
Severity: Minor
Found in src/exojax/plot/atmplot.py - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function plot_lbd has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Confirmed

def plot_lbd(
    lbd_coeff,
    elower_grid,
    ngamma_ref_grid,
    n_Texp_grid,
Severity: Minor
Found in src/exojax/plot/opaplot.py - About 1 hr to fix

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

    def split_simple(molname_simple):
        """splits simple molname.
    
        Args:
            molname_simple: simple molname
    Severity: Minor
    Found in src/exojax/utils/molname.py - About 45 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function _nsol_aag21 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Confirmed

    def _nsol_aag21():
        """provides solar abundance dictionary from AAG21.
    
        Args:
            database: name of database.
    Severity: Minor
    Found in src/exojax/utils/zsol.py - About 45 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    def plotcf(
        nus,
        dtauM,
        Tarr,
        Parr,
    Severity: Minor
    Found in src/exojax/plot/atmplot.py - About 45 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function premodit_devmemory_use has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def premodit_devmemory_use(
        ngrid_nu_grid,
        ngrid_broadpar,
        ngrid_elower,
        nlayer=None,
    Severity: Minor
    Found in src/exojax/utils/memuse.py - About 35 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function molmass_hitran has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def molmass_hitran():
        """molar mass info from HITRAN_molparam.txt
    
    
        Returns:
    Severity: Minor
    Found in src/exojax/utils/isotopes.py - About 35 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function plot_dgm has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    def plot_dgm(dgm_sigmaD, dgm_gammaL, sigmaDM, gammaLM, js=0, je=10):
        """plot DIT grid matrix (dgm)
    
        Args:
           dgm_sigmaD: DIT grid matrix of sigmaD (Nlayer x Ngrid)
    Severity: Minor
    Found in src/exojax/plot/ditplot.py - About 25 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function plot_dgmn has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    def plot_dgmn(Parr, dgm_ngammaL, ngammaLM, js, je):
        """plot MODIT grid matrix (dgm)
    
        Args:
           Parr: pressure layer (Nlayer)
    Severity: Minor
    Found in src/exojax/plot/ditplot.py - About 25 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function device_memory_use has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    def device_memory_use(opa, art=None, nfree=None, print_summary=True):
        """device memory use given opa and art (optional), n free parameters (optional)
    
        Args:
            opa (opa): opa instance
    Severity: Minor
    Found in src/exojax/utils/memuse.py - About 25 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Severity
    Category
    Status
    Source
    Language