intracom-telecom-sdn/nstat

View on GitHub
util/plot_json.py

Summary

Maintainability
F
3 days
Test Coverage

Showing 11 of 11 total issues

File plot_json.py has 318 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_json.py - About 3 hrs to fix

    Cyclomatic complexity is too high in function plot_json. (7)
    Open

    def plot_json(results_file, x_axis_key, y_axis_key, z_axis_key, plot_type,
    plot_subtitle_keys, plot_options):
    """
    Acts as a wrapper method for plotting a set of samples from a \
    JSON file. The method ends up calling specific methods for one of the \
    Severity: Minor
    Found in util/plot_json.py by radon

    Function plot_json has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def plot_json(results_file, x_axis_key, y_axis_key, z_axis_key, plot_type,
    Severity: Major
    Found in util/plot_json.py - About 50 mins to fix

      Function multiplot_scatter_json has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def multiplot_scatter_json(results_file, x_axis_key, y_axis_key, z_axis_key,
      Severity: Minor
      Found in util/plot_json.py - About 45 mins to fix

        Function multiplot_errorbar_json has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def multiplot_errorbar_json(results_file, x_axis_key, y_axis_key, z_axis_key,
        Severity: Minor
        Found in util/plot_json.py - About 45 mins to fix

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

          def plot_errorbar_json(results_file, x_axis_key, y_axis_key,
          Severity: Minor
          Found in util/plot_json.py - About 35 mins to fix

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

            def plot_scatter_json(results_file, x_axis_key, y_axis_key, plot_subtitle_keys,
            Severity: Minor
            Found in util/plot_json.py - About 35 mins to fix

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

              def plot_json(results_file, x_axis_key, y_axis_key, z_axis_key, plot_type,
              plot_subtitle_keys, plot_options):
              """
              Acts as a wrapper method for plotting a set of samples from a \
              JSON file. The method ends up calling specific methods for one of the \
              Severity: Minor
              Found in util/plot_json.py - About 35 mins to fix

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

              def plot_scatter_json(results_file, x_axis_key, y_axis_key, plot_subtitle_keys,
              plot_options):
              """
              Draw a single scatter-plot over a set of samples from a JSON file. \
              For each different x value, the function plots a point for every \
              Severity: Minor
              Found in util/plot_json.py - About 35 mins to fix

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

              def multiplot_errorbar_json(results_file, x_axis_key, y_axis_key, z_axis_key,
              plot_subtitle_keys, plot_options):
              """
              Draw multiple collection of errorbars over a set of samples from a \
              JSON file. \
              Severity: Major
              Found in util/plot_json.py and 1 other location - About 1 day to fix
              util/plot_json.py on lines 288..351

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

              def multiplot_scatter_json(results_file, x_axis_key, y_axis_key, z_axis_key,
              plot_subtitle_keys, plot_options):
              """
              Draw multiple scatter-plots over a set of samples from a JSON file. \
              Each scatter-plot is determined by a specific value of the z_axis_key \
              Severity: Major
              Found in util/plot_json.py and 1 other location - About 1 day to fix
              util/plot_json.py on lines 156..217
              Category
              Status