CellProfiler/centrosome

View on GitHub

Showing 380 of 380 total issues

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

        dot_vs1s0 = np.sum(s01 * vs1, 1) / np.sqrt(
            np.sum(s01 ** 2, 1) * np.sum(vs1 ** 2, 1)
Severity: Major
Found in centrosome/cpmorphology.py and 1 other location - About 3 hrs to fix
centrosome/cpmorphology.py on lines 1594..1595

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

        dot_vs0s1 = np.sum(s10 * vs0, 1) / np.sqrt(
            np.sum(s01 ** 2, 1) * np.sum(vs0 ** 2, 1)
Severity: Major
Found in centrosome/cpmorphology.py and 1 other location - About 3 hrs to fix
centrosome/cpmorphology.py on lines 1589..1590

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

        for row in [
            i
            for i in range(0, len(detections_1))
            if detections_1[i].is_reliable()
            and (not params["check_if_big"] or self.is_cell_big(detections_1[i]))
Severity: Major
Found in centrosome/neighmovetrack.py and 1 other location - About 3 hrs to fix
centrosome/neighmovetrack.py on lines 391..395

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

            dc = distance2_to_line(
                chull_pts[chull_idx + antipode_idx, :],
                chull_pts[chull_idx + vertex_idx, :],
                chull_pts[chull_idx + vertex_idx + 1, :],
Severity: Major
Found in centrosome/cpmorphology.py and 1 other location - About 3 hrs to fix
centrosome/cpmorphology.py on lines 4917..4920

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

            dn = distance2_to_line(
                chull_pts[chull_idx + next_antipode_idx, :],
                chull_pts[chull_idx + vertex_idx, :],
                chull_pts[chull_idx + vertex_idx + 1, :],
Severity: Major
Found in centrosome/cpmorphology.py and 1 other location - About 3 hrs to fix
centrosome/cpmorphology.py on lines 4907..4910

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

Function canny has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def canny(image, mask, sigma, low_threshold, high_threshold):
    """Edge filter an image using the Canny algorithm.

    sigma - the standard deviation of the Gaussian used
    low_threshold - threshold for edges that connect to high-threshold
Severity: Major
Found in centrosome/filter.py - About 2 hrs to fix

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

            binary_shrink_top_right &= make_table(
                False,
                np.array([[0, 0, 0], [0, 1, 0], [0, 0, 1]], bool),
                np.array([[1, 1, 1], [1, 1, 0], [1, 0, 1]], bool),
    Severity: Major
    Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 236..239
    centrosome/cpmorphology.py on lines 241..244
    centrosome/cpmorphology.py on lines 246..249
    centrosome/cpmorphology.py on lines 256..259
    centrosome/cpmorphology.py on lines 272..275
    centrosome/cpmorphology.py on lines 277..280
    centrosome/cpmorphology.py on lines 282..285
    centrosome/cpmorphology.py on lines 287..290
    centrosome/cpmorphology.py on lines 292..295

    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 59.

    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 10 locations. Consider refactoring.
    Open

            binary_shrink_top_right &= make_table(
                False,
                np.array([[0, 0, 0], [1, 1, 0], [0, 0, 0]], bool),
                np.array([[0, 0, 1], [1, 1, 1], [0, 0, 1]], bool),
    Severity: Major
    Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 236..239
    centrosome/cpmorphology.py on lines 246..249
    centrosome/cpmorphology.py on lines 251..254
    centrosome/cpmorphology.py on lines 256..259
    centrosome/cpmorphology.py on lines 272..275
    centrosome/cpmorphology.py on lines 277..280
    centrosome/cpmorphology.py on lines 282..285
    centrosome/cpmorphology.py on lines 287..290
    centrosome/cpmorphology.py on lines 292..295

    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 59.

    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 not mask is None:
            not_mask = np.logical_not(mask)
            big_image[iradius:-iradius, iradius:-iradius][not_mask] = 1
    Severity: Major
    Found in centrosome/cpmorphology.py and 1 other location - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 3037..3039

    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 59.

    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 not mask is None:
            not_mask = np.logical_not(mask)
            big_image[iradius:-iradius, iradius:-iradius][not_mask] = 0
    Severity: Major
    Found in centrosome/cpmorphology.py and 1 other location - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 3008..3010

    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 59.

    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

    Function slow_minimum_distance2 has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    def slow_minimum_distance2(hull_a, hull_b):
        """Do the minimum distance by exhaustive examination of all points"""
        d2_min = np.iinfo(int).max
        for a in hull_a:
            if within_hull(a, hull_b):
    Severity: Minor
    Found in centrosome/cpmorphology.py - About 2 hrs 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 10 locations. Consider refactoring.
    Open

            binary_shrink_bottom_left &= make_table(
                False,
                np.array([[0, 0, 0], [0, 1, 1], [0, 0, 0]], bool),
                np.array([[1, 0, 0], [1, 1, 1], [1, 0, 0]], bool),
    Severity: Major
    Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 236..239
    centrosome/cpmorphology.py on lines 241..244
    centrosome/cpmorphology.py on lines 246..249
    centrosome/cpmorphology.py on lines 251..254
    centrosome/cpmorphology.py on lines 256..259
    centrosome/cpmorphology.py on lines 272..275
    centrosome/cpmorphology.py on lines 282..285
    centrosome/cpmorphology.py on lines 287..290
    centrosome/cpmorphology.py on lines 292..295

    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 59.

    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

    Function otsu has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    def otsu(data, min_threshold=None, max_threshold=None, bins=256):
        """Compute a threshold using Otsu's method
        
        data           - an array of intensity values between zero and one
        min_threshold  - only consider thresholds above this minimum value
    Severity: Minor
    Found in centrosome/otsu.py - About 2 hrs 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 10 locations. Consider refactoring.
    Open

            binary_shrink_top_right &= make_table(
                False,
                np.array([[0, 0, 0], [0, 1, 0], [1, 0, 0]], bool),
                np.array([[1, 1, 1], [0, 1, 1], [1, 0, 1]], bool),
    Severity: Major
    Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 241..244
    centrosome/cpmorphology.py on lines 246..249
    centrosome/cpmorphology.py on lines 251..254
    centrosome/cpmorphology.py on lines 256..259
    centrosome/cpmorphology.py on lines 272..275
    centrosome/cpmorphology.py on lines 277..280
    centrosome/cpmorphology.py on lines 282..285
    centrosome/cpmorphology.py on lines 287..290
    centrosome/cpmorphology.py on lines 292..295

    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 59.

    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 10 locations. Consider refactoring.
    Open

            binary_shrink_bottom_left &= make_table(
                False,
                np.array([[1, 1, 0], [0, 1, 1], [0, 0, 0]], bool),
                np.array([[0, 1, 0], [1, 1, 1], [1, 0, 0]], bool),
    Severity: Major
    Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 236..239
    centrosome/cpmorphology.py on lines 241..244
    centrosome/cpmorphology.py on lines 246..249
    centrosome/cpmorphology.py on lines 251..254
    centrosome/cpmorphology.py on lines 256..259
    centrosome/cpmorphology.py on lines 272..275
    centrosome/cpmorphology.py on lines 277..280
    centrosome/cpmorphology.py on lines 287..290
    centrosome/cpmorphology.py on lines 292..295

    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 59.

    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 10 locations. Consider refactoring.
    Open

            binary_shrink_bottom_left &= make_table(
                False,
                np.array([[0, 0, 1], [0, 1, 0], [0, 0, 0]], bool),
                np.array([[1, 0, 1], [1, 1, 0], [1, 1, 1]], bool),
    Severity: Major
    Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 236..239
    centrosome/cpmorphology.py on lines 241..244
    centrosome/cpmorphology.py on lines 246..249
    centrosome/cpmorphology.py on lines 251..254
    centrosome/cpmorphology.py on lines 256..259
    centrosome/cpmorphology.py on lines 277..280
    centrosome/cpmorphology.py on lines 282..285
    centrosome/cpmorphology.py on lines 287..290
    centrosome/cpmorphology.py on lines 292..295

    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 59.

    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 10 locations. Consider refactoring.
    Open

            binary_shrink_bottom_left &= make_table(
                False,
                np.array([[1, 0, 0], [0, 1, 0], [0, 0, 0]], bool),
                np.array([[1, 0, 1], [0, 1, 1], [1, 1, 1]], bool),
    Severity: Major
    Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 236..239
    centrosome/cpmorphology.py on lines 241..244
    centrosome/cpmorphology.py on lines 246..249
    centrosome/cpmorphology.py on lines 251..254
    centrosome/cpmorphology.py on lines 256..259
    centrosome/cpmorphology.py on lines 272..275
    centrosome/cpmorphology.py on lines 277..280
    centrosome/cpmorphology.py on lines 282..285
    centrosome/cpmorphology.py on lines 292..295

    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 59.

    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 10 locations. Consider refactoring.
    Open

            binary_shrink_top_right &= make_table(
                False,
                np.array([[0, 0, 0], [0, 1, 0], [1, 1, 1]], bool),
                np.array([[1, 1, 1], [1, 1, 0], [0, 1, 1]], bool),
    Severity: Major
    Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 236..239
    centrosome/cpmorphology.py on lines 241..244
    centrosome/cpmorphology.py on lines 246..249
    centrosome/cpmorphology.py on lines 251..254
    centrosome/cpmorphology.py on lines 272..275
    centrosome/cpmorphology.py on lines 277..280
    centrosome/cpmorphology.py on lines 282..285
    centrosome/cpmorphology.py on lines 287..290
    centrosome/cpmorphology.py on lines 292..295

    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 59.

    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 10 locations. Consider refactoring.
    Open

            binary_shrink_bottom_left &= make_table(
                False,
                np.array([[1, 1, 1], [0, 1, 0], [0, 0, 0]], bool),
                np.array([[1, 1, 0], [0, 1, 1], [1, 1, 1]], bool),
    Severity: Major
    Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 236..239
    centrosome/cpmorphology.py on lines 241..244
    centrosome/cpmorphology.py on lines 246..249
    centrosome/cpmorphology.py on lines 251..254
    centrosome/cpmorphology.py on lines 256..259
    centrosome/cpmorphology.py on lines 272..275
    centrosome/cpmorphology.py on lines 277..280
    centrosome/cpmorphology.py on lines 282..285
    centrosome/cpmorphology.py on lines 287..290

    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 59.

    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 10 locations. Consider refactoring.
    Open

            binary_shrink_top_right &= make_table(
                False,
                np.array([[0, 0, 0], [1, 1, 0], [0, 1, 1]], bool),
                np.array([[0, 0, 1], [1, 1, 1], [0, 1, 0]], bool),
    Severity: Major
    Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
    centrosome/cpmorphology.py on lines 236..239
    centrosome/cpmorphology.py on lines 241..244
    centrosome/cpmorphology.py on lines 251..254
    centrosome/cpmorphology.py on lines 256..259
    centrosome/cpmorphology.py on lines 272..275
    centrosome/cpmorphology.py on lines 277..280
    centrosome/cpmorphology.py on lines 282..285
    centrosome/cpmorphology.py on lines 287..290
    centrosome/cpmorphology.py on lines 292..295

    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 59.

    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

    Severity
    Category
    Status
    Source
    Language