intracom-telecom-sdn/nstat

View on GitHub
util/plot_utils.py

Summary

Maintainability
C
1 day
Test Coverage

Showing 7 of 7 total issues

File plot_utils.py has 274 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright (c) 2015 Intracom S.A. Telecom Solutions. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v1.0 which accompanies this distribution,
# and is available at http://www.eclipse.org/legal/epl-v10.html
Severity: Minor
Found in util/plot_utils.py - About 2 hrs to fix

    Function plot_errorbar has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def plot_errorbar(x_keys_sorted, y_mean, y_diff_minus, y_diff_plus,
    Severity: Minor
    Found in util/plot_utils.py - About 35 mins to fix

      Function plot_errorbar_helper has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def plot_errorbar_helper(x_keys_sorted, y_mean, y_diff_minus, y_diff_plus,
      Severity: Minor
      Found in util/plot_utils.py - About 35 mins to fix

        Function plot_scatter_helper has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def plot_scatter_helper(x_coords, y_coords, plot_options, marker_arg='o',
        Severity: Minor
        Found in util/plot_utils.py - About 35 mins to fix

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

          def plot_multi_scatter(y_values, z_axis_key, plot_options):
          """
          Creates a multiple scatter plots figure
           
          :param y_values: list<float>
          Severity: Minor
          Found in util/plot_utils.py - About 25 mins to fix

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

          plt.legend(list(plots.values()),
          [z_axis_key + ':' + str(k) for k in list(plots.keys())],
          scatterpoints=1, loc=plot_options.legend_position, fontsize=8)
          Severity: Major
          Found in util/plot_utils.py and 1 other location - About 3 hrs to fix
          util/plot_utils.py on lines 190..193

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

          plt.legend(list(plots.values()),
          [z_axis_key + ':' + str(k) for k in list(plots.keys())],
          scatterpoints=1,
          loc=plot_options.legend_position,
          Severity: Major
          Found in util/plot_utils.py and 1 other location - About 3 hrs to fix
          util/plot_utils.py on lines 268..270
          Category
          Status