CosmicFish/CosmicFish

View on GitHub

Showing 128 of 209 total issues

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

        if params==None and names==None:
            names_temp  = copy.deepcopy(all_names)
            params_temp = copy.deepcopy(all_params)
        elif params==None and names!=None:
            names_temp  = [i for i in fu.make_list(names) if i in all_names]
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 2 days to fix
python/cosmicfish_pylib/fisher_plot.py on lines 351..362

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

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

        if params==None and names==None:
            names_temp  = copy.deepcopy(all_names)
            params_temp = copy.deepcopy(all_params)
        elif params==None and names!=None:
            names_temp  = [i for i in fu.make_list(names) if i in all_names]
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 2 days to fix
python/cosmicfish_pylib/fisher_plot.py on lines 187..198

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

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 show_y_ticks_labels:
            subplot.set_yticklabels([])
        else:
            yticks = np.linspace(ranges[param2][0], ranges[param2][1], number_y_ticks)
            subplot.set_yticks(yticks)
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 1 day to fix
python/cosmicfish_pylib/fisher_plot.py on lines 652..660

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

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 show_x_ticks_labels:
            subplot.set_xticklabels([])
        else:
            xticks = np.linspace(ranges[param1][0], ranges[param1][1], number_x_ticks)
            subplot.set_xticks(xticks)
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 1 day to fix
python/cosmicfish_pylib/fisher_plot.py on lines 662..670

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

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 plot in list(self.plot_dict.values()):
            x_dimension = plot.yaxis.get_label().get_window_extent(renderer).width/default_dpi  #: in inches
            y_dimension = plot.yaxis.get_label().get_window_extent(renderer).height/default_dpi  #: in inches
            if x_dimension>max_y_label[0]: max_y_label[0]=x_dimension
            if y_dimension>max_y_label[1]: max_y_label[1]=y_dimension
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 7 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 815..819

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

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 plot in list(self.plot_dict.values()):
            x_dimension = plot.xaxis.get_label().get_window_extent(renderer).width/default_dpi  #: in inches
            y_dimension = plot.xaxis.get_label().get_window_extent(renderer).height/default_dpi  #: in inches
            if x_dimension>max_x_label[0]: max_x_label[0]=x_dimension
            if y_dimension>max_x_label[1]: max_x_label[1]=y_dimension
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 7 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 807..811

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

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 plot in list(self.plot_dict.values()):
            for xlabel in plot.get_xticklabels():
                x_dimension = xlabel.get_window_extent(renderer).width/default_dpi  #: in inches
                y_dimension = xlabel.get_window_extent(renderer).height/default_dpi  #: in inches
                if x_dimension>max_x_tick_label[0]: max_x_tick_label[0]=x_dimension
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 7 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 789..794

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

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 plot in list(self.plot_dict.values()):
            for ylabel in plot.get_yticklabels():
                x_dimension = ylabel.get_window_extent(renderer).width/default_dpi  #: in inches
                y_dimension = ylabel.get_window_extent(renderer).height/default_dpi  #: in inches
                if x_dimension>max_y_tick_label[0]: max_y_tick_label[0]=x_dimension
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 7 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 798..803

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

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

        y_size = num_rows*subplot_y_size/inch_to_cm +1.0*(dimensions['xtick_pad'] +2.0*dimensions['label_pad'] +dimensions['x_tick_labels'][1] +dimensions['x_labels'][1]) +(num_rows-1.0)*tri_subspace/inch_to_cm
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 7 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 995..995

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

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

        x_size = num_col*subplot_x_size/inch_to_cm +2.0*(dimensions['ytick_pad'] +2.0*dimensions['label_pad'] +dimensions['y_tick_labels'][0] +dimensions['y_labels'][0]) +(num_col-1.0)*tri_subspace/inch_to_cm
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 7 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 996..996

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

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

        if use_fixed_figure_width and use_fixed_figure_height:
            # both sizes fixed. Do nothing, just copy the setting.
            x_size = x_size_in/inch_to_cm
            y_size = y_size_in/inch_to_cm
        elif use_fixed_figure_width and not use_fixed_figure_height:
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 6 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 890..898

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

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

        if use_fixed_figure_width and use_fixed_figure_height:
            # both sizes fixed. Do nothing, just copy the setting.
            x_size = x_size_in/inch_to_cm
            y_size = y_size_in/inch_to_cm
        elif use_fixed_figure_width and not use_fixed_figure_height:
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 6 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 1012..1020

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

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 derived_matrix is None:
            # initialize from file:
            self.derived_matrix = np.loadtxt(file_name)
            # get the file name and path:
            self.path = os.path.abspath(file_name)
Severity: Major
Found in python/cosmicfish_pylib/fisher_derived.py and 1 other location - About 6 hrs to fix
python/cosmicfish_pylib/fisher_matrix.py on lines 223..232

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

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 fisher_matrix is None:
            # initialize from file:
            self.fisher_matrix = np.loadtxt(file_name)
            # get the file name and path:
            self.path  = os.path.abspath(file_name)
Severity: Major
Found in python/cosmicfish_pylib/fisher_matrix.py and 1 other location - About 6 hrs to fix
python/cosmicfish_pylib/fisher_derived.py on lines 145..154

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

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

        try:
            subplot.xaxis.get_majorticklabels()[0].set_horizontalalignment('left')
            subplot.xaxis.get_majorticklabels()[-1].set_horizontalalignment('right')
            subplot.yaxis.get_majorticklabels()[0].set_verticalalignment('bottom')
            subplot.yaxis.get_majorticklabels()[-1].set_verticalalignment('top')
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 5 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 548..553

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

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

        try:
            subplot.xaxis.get_majorticklabels()[0].set_horizontalalignment('left')
            subplot.xaxis.get_majorticklabels()[-1].set_horizontalalignment('right')
            subplot.yaxis.get_majorticklabels()[0].set_verticalalignment('bottom')
            subplot.yaxis.get_majorticklabels()[-1].set_verticalalignment('top')
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 5 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 672..677

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

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

        if 'solid_colors' in kwargs:
            for i, name in enumerate(names_temp):
                self.bind_solid_colors[name] = kwargs['solid_colors'][i]
        else:
            for i, name in enumerate(all_names):
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 2 other locations - About 4 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 732..737
python/cosmicfish_pylib/fisher_plot.py on lines 756..761

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

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

        if 'line_colors' in kwargs:
            for i, name in enumerate(names_temp):
                self.bind_line_colors[name] = kwargs['line_colors'][i]
        else:
            for i, name in enumerate(all_names):
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 2 other locations - About 4 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 740..745
python/cosmicfish_pylib/fisher_plot.py on lines 756..761

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

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

        if 'linestyle' in kwargs:
            for i, name in enumerate(names_temp):
                self.bind_linestyle[name] = kwargs['linestyle'][i]
        else:
            for i, name in enumerate(all_names):
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 2 other locations - About 4 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 732..737
python/cosmicfish_pylib/fisher_plot.py on lines 740..745

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

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

        y_size = num_rows*(subplot_y_size*cm_to_inch +dimensions['xtick_pad'] +2.0*dimensions['label_pad'] +dimensions['x_tick_labels'][1] +dimensions['x_labels'][1])
Severity: Major
Found in python/cosmicfish_pylib/fisher_plot.py and 1 other location - About 4 hrs to fix
python/cosmicfish_pylib/fisher_plot.py on lines 867..867

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

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