tipresias/augury

View on GitHub

Showing 17 of 17 total issues

Function __init__ has 23 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(
Severity: Major
Found in src/augury/sklearn/models.py - About 2 hrs to fix

    Function rnn_model_func has 19 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def rnn_model_func(
    Severity: Major
    Found in src/augury/sklearn/models.py - About 2 hrs to fix

      Function run has 14 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def run(
      Severity: Major
      Found in src/augury/cli.py - About 1 hr to fix

        Function __init__ has 11 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(
        Severity: Major
        Found in src/augury/sklearn/models.py - About 1 hr to fix

          Function __init__ has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def __init__(
                  self,
                  n_categories: int = len(CATEGORY_COLS),
                  n_features: int = None,
                  n_steps: int = 2,
          Severity: Minor
          Found in src/augury/sklearn/models.py - About 1 hr to fix

            Function __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(
            Severity: Major
            Found in src/augury/sklearn/models.py - About 1 hr to fix

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

                  def __init__(
              Severity: Minor
              Found in src/augury/predictions.py - About 45 mins to fix

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

                    def __init__(
                Severity: Minor
                Found in src/augury/sklearn/models.py - About 45 mins to fix

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

                  def autodoc_process_docstring(app, what, name, obj, options, lines):
                  Severity: Minor
                  Found in docs/source/conf.py - About 45 mins to fix

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

                    def skip(app, what, name, obj, skip, options):
                    Severity: Minor
                    Found in docs/source/conf.py - About 45 mins to fix

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

                          def __init__(
                      Severity: Minor
                      Found in src/augury/ml_data.py - About 45 mins to fix

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

                            def _predict_with_team_model(
                        Severity: Minor
                        Found in src/augury/sklearn/models.py - About 35 mins to fix

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

                              def register_catalog(
                          Severity: Minor
                          Found in src/augury/hooks.py - About 35 mins to fix

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

                            def score_model(
                            Severity: Minor
                            Found in src/augury/model_tracking.py - About 35 mins to fix

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

                                  def fit(self, X: pd.DataFrame, y: Union[pd.Series, np.ndarray]) -> Type[R]:
                                      """Fit estimator to the data."""
                                      X_filtered, y_filtered = (
                                          self._filter_by_min_year(X),
                                          self._filter_by_min_year(y),
                              Severity: Minor
                              Found in src/augury/ml_estimators/stacking_estimator.py - About 35 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

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

                                  def fit(
                                      self, X: pd.DataFrame, y: Optional[Union[pd.Series, np.ndarray]] = None
                                  ) -> Type[T]:
                                      """Calculate feature/label correlations and save high-correlation features."""
                                      if not any(self.labels) and y is not None:
                              Severity: Minor
                              Found in src/augury/sklearn/preprocessing.py - About 25 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

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

                              def reload_kedro(path, line=None):
                                  """Line magic which reloads all Kedro default variables."""
                                  global startup_error
                                  global context
                                  global catalog
                              Severity: Minor
                              Found in .ipython/profile_default/startup/00-kedro-init.py - About 25 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

                              Severity
                              Category
                              Status
                              Source
                              Language