avaframe/AvaFrame

View on GitHub
avaframe/com2AB/com2AB.py

Summary

Maintainability
F
4 days
Test Coverage
B
82%

File com2AB.py has 329 lines of code (exceeds 300 allowed). Consider refactoring.
Open

"""
    Main module for Alpha beta

"""
Severity: Minor
Found in avaframe/com2AB/com2AB.py - About 2 hrs to fix

    Function readABinputs has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    def readABinputs(avalancheDir, path2Line='', path2SplitPoint=''):
        """ Fetch inputs for AlpahBeta model
    
        Get path to AlphaBeta model inputs (dem raster, avalanche path and split points)
    
    Severity: Minor
    Found in avaframe/com2AB/com2AB.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 setEqParameters has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    def setEqParameters(cfg, smallAva):
        """ Set alpha beta equation parameters
    
        Set alpha beta equation parameters to
        - standard (default)
    Severity: Minor
    Found in avaframe/com2AB/com2AB.py - About 55 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

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

        if path2Line == '':
            refDir = avalancheDir / 'Inputs' / 'LINES'
            profileLayer = list(refDir.glob('*AB*.shp'))
            try:
                message = ('There should be exactly one pathAB.shp file containing (multiple)'
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 1 other location - About 3 hrs to fix
    avaframe/com2AB/com2AB.py on lines 265..280

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        if path2SplitPoint == '':
            refDir = avalancheDir / 'Inputs' / 'POINTS'
            splitPointSource = list(refDir.glob('*.shp'))
            try:
                message = 'There should be exactly one .shp file containing the split points in %s /Inputs/POINTS/' %  avalancheDir
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 1 other location - About 3 hrs to fix
    avaframe/com2AB/com2AB.py on lines 236..253

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 62.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        try:
            indAlphaM2SD = indAlphaM2SD[s[indAlphaM2SD] > sSplit][0]
        except IndexError:
            log.warning('-2 SD out of profile')
            indAlphaM2SD = None
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 3 other locations - About 2 hrs to fix
    avaframe/com2AB/com2AB.py on lines 401..405
    avaframe/com2AB/com2AB.py on lines 407..411
    avaframe/com2AB/com2AB.py on lines 413..417

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 50.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        try:
            indAlpha = indAlpha[s[indAlpha] > sSplit][0]
        except IndexError:
            log.warning('Alpha out of profile')
            indAlpha = None
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 3 other locations - About 2 hrs to fix
    avaframe/com2AB/com2AB.py on lines 407..411
    avaframe/com2AB/com2AB.py on lines 413..417
    avaframe/com2AB/com2AB.py on lines 419..423

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 50.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        try:
            indAlphaP1SD = indAlphaP1SD[s[indAlphaP1SD] > sSplit][0]
        except IndexError:
            log.warning('+1 SD above beta point')
            indAlphaP1SD = None
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 3 other locations - About 2 hrs to fix
    avaframe/com2AB/com2AB.py on lines 401..405
    avaframe/com2AB/com2AB.py on lines 413..417
    avaframe/com2AB/com2AB.py on lines 419..423

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 50.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        try:
            indAlphaM1SD = indAlphaM1SD[s[indAlphaM1SD] > sSplit][0]
        except IndexError:
            log.warning('-1 SD out of profile')
            indAlphaM1SD = None
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 3 other locations - About 2 hrs to fix
    avaframe/com2AB/com2AB.py on lines 401..405
    avaframe/com2AB/com2AB.py on lines 407..411
    avaframe/com2AB/com2AB.py on lines 419..423

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 50.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        alphaSD = k1 * beta + k2 * poly.deriv(2)[0] + k3 * H0 + k4 + SDs
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 1 other location - About 1 hr to fix
    avaframe/com2AB/com2AB.py on lines 348..348

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 49.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

        alpha = k1 * beta + k2 * poly.deriv(2)[0] + k3 * H0 + k4
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 1 other location - About 1 hr to fix
    avaframe/com2AB/com2AB.py on lines 352..352

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 49.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        fplus1SD = z[0] + np.tan(np.deg2rad(-alphaSD[0])) * s
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 2 other locations - About 1 hr to fix
    avaframe/com2AB/com2AB.py on lines 389..389
    avaframe/com2AB/com2AB.py on lines 390..390

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        fminus1SD = z[0] + np.tan(np.deg2rad(-alphaSD[1])) * s
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 2 other locations - About 1 hr to fix
    avaframe/com2AB/com2AB.py on lines 388..388
    avaframe/com2AB/com2AB.py on lines 390..390

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        fminus2SD = z[0] + np.tan(np.deg2rad(-alphaSD[2])) * s
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 2 other locations - About 1 hr to fix
    avaframe/com2AB/com2AB.py on lines 388..388
    avaframe/com2AB/com2AB.py on lines 389..389

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

            try:
                message = 'There should be exactly one .shp file containing the split points in %s /Inputs/POINTS/' %  avalancheDir
                assert len(splitPointSource) == 1, message
            except AssertionError:
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 2 other locations - About 40 mins to fix
    avaframe/ana3AIMEC/aimecTools.py on lines 57..61
    avaframe/ana3AIMEC/aimecTools.py on lines 68..71

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 34.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        indAlphaM2SD = np.argwhere(np.diff(np.sign(fminus2SD - z))).flatten()
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 5 other locations - About 35 mins to fix
    avaframe/ana1Tests/energyLineTest.py on lines 300..300
    avaframe/ana1Tests/energyLineTest.py on lines 310..310
    avaframe/com2AB/com2AB.py on lines 395..395
    avaframe/com2AB/com2AB.py on lines 396..396
    avaframe/com2AB/com2AB.py on lines 397..397

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 33.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        indAlphaM1SD = np.argwhere(np.diff(np.sign(fminus1SD - z))).flatten()
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 5 other locations - About 35 mins to fix
    avaframe/ana1Tests/energyLineTest.py on lines 300..300
    avaframe/ana1Tests/energyLineTest.py on lines 310..310
    avaframe/com2AB/com2AB.py on lines 395..395
    avaframe/com2AB/com2AB.py on lines 396..396
    avaframe/com2AB/com2AB.py on lines 398..398

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 33.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        indAlphaP1SD = np.argwhere(np.diff(np.sign(fplus1SD - z))).flatten()
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 5 other locations - About 35 mins to fix
    avaframe/ana1Tests/energyLineTest.py on lines 300..300
    avaframe/ana1Tests/energyLineTest.py on lines 310..310
    avaframe/com2AB/com2AB.py on lines 395..395
    avaframe/com2AB/com2AB.py on lines 397..397
    avaframe/com2AB/com2AB.py on lines 398..398

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 33.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

        indAlpha = np.argwhere(np.diff(np.sign(f - z))).flatten()
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 5 other locations - About 35 mins to fix
    avaframe/ana1Tests/energyLineTest.py on lines 300..300
    avaframe/ana1Tests/energyLineTest.py on lines 310..310
    avaframe/com2AB/com2AB.py on lines 396..396
    avaframe/com2AB/com2AB.py on lines 397..397
    avaframe/com2AB/com2AB.py on lines 398..398

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 33.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

            avaPath['x'] = fullAvaPath['x'][int(start):int(end)]
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 4 other locations - About 35 mins to fix
    avaframe/in2Trans/shpConversion.py on lines 416..416
    avaframe/in2Trans/shpConversion.py on lines 417..417
    avaframe/in2Trans/shpConversion.py on lines 418..419
    avaframe/com2AB/com2AB.py on lines 141..141

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 33.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

            avaPath['y'] = fullAvaPath['y'][int(start):int(end)]
    Severity: Major
    Found in avaframe/com2AB/com2AB.py and 4 other locations - About 35 mins to fix
    avaframe/in2Trans/shpConversion.py on lines 416..416
    avaframe/in2Trans/shpConversion.py on lines 417..417
    avaframe/in2Trans/shpConversion.py on lines 418..419
    avaframe/com2AB/com2AB.py on lines 140..140

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 33.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status