From d5d42a47617796ae893d39a7d8716271a182bb95 Mon Sep 17 00:00:00 2001 From: machineFL <49695056+machineFL@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:53:47 -0400 Subject: [PATCH] Automated Latest Dependency Updates (#4458) * Update latest dependencies * Fix ruff command * Remove Nate from deps review list * Ignore lint rule E721 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: eccabay --- .github/workflows/latest_dependency_checker.yaml | 2 +- .pre-commit-config.yaml | 2 +- Makefile | 4 ++-- evalml/pipelines/components/estimators/estimator.py | 4 ---- .../preprocessing/time_series_featurizer.py | 2 +- .../automl_tests/test_automl_search_classification.py | 2 +- evalml/tests/component_tests/test_target_imputer.py | 4 ++-- .../latest_dependency_versions.txt | 4 ++-- pyproject.toml | 10 +++++----- 9 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/latest_dependency_checker.yaml b/.github/workflows/latest_dependency_checker.yaml index ac52c9d602..1c148cd20a 100644 --- a/.github/workflows/latest_dependency_checker.yaml +++ b/.github/workflows/latest_dependency_checker.yaml @@ -32,4 +32,4 @@ jobs: delete-branch: true base: main assignees: machineFL - reviewers: jeremyliweishih, thehomebrewnerd, MichaelFu512, eccabay, christopherbunn + reviewers: jeremyliweishih, MichaelFu512, eccabay, christopherbunn diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1acb0a9e4e..f8e9575c9b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,7 @@ repos: additional_dependencies: [".[jupyter]"] types_or: [python, jupyter] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.0.239' + rev: 'v0.5.1' hooks: - id: ruff args: diff --git a/Makefile b/Makefile index 89a481a367..46cf8c786d 100644 --- a/Makefile +++ b/Makefile @@ -14,13 +14,13 @@ lint: python docs/notebook_version_standardizer.py check-versions python docs/notebook_version_standardizer.py check-execution black . --check --config=./pyproject.toml - ruff . --config=./pyproject.toml + ruff check . --config=./pyproject.toml .PHONY: lint-fix lint-fix: python docs/notebook_version_standardizer.py standardize black . --config=./pyproject.toml - ruff . --config=./pyproject.toml --fix + ruff check . --config=./pyproject.toml --fix .PHONY: test test: diff --git a/evalml/pipelines/components/estimators/estimator.py b/evalml/pipelines/components/estimators/estimator.py index 64584d717a..91a378e0d5 100644 --- a/evalml/pipelines/components/estimators/estimator.py +++ b/evalml/pipelines/components/estimators/estimator.py @@ -7,7 +7,6 @@ import scipy.stats as st from evalml.exceptions import MethodPropertyNotFoundError -from evalml.model_family import ModelFamily from evalml.pipelines.components import ComponentBase from evalml.problem_types import ProblemTypes from evalml.utils import infer_feature_types @@ -38,9 +37,6 @@ class Estimator(ComponentBase): random_seed (int): Seed for the random number generator. Defaults to 0. """ - model_family = ModelFamily.NONE - """ModelFamily.NONE""" - modifies_features = True modifies_target = False training_only = False diff --git a/evalml/pipelines/components/transformers/preprocessing/time_series_featurizer.py b/evalml/pipelines/components/transformers/preprocessing/time_series_featurizer.py index 4f257efd55..8f71661ad3 100644 --- a/evalml/pipelines/components/transformers/preprocessing/time_series_featurizer.py +++ b/evalml/pipelines/components/transformers/preprocessing/time_series_featurizer.py @@ -304,7 +304,7 @@ def _compute_delays(self, X_ww, y): if isinstance(y, pd.DataFrame): lagged_features.update(self._delay_df(y, y.columns)) else: - if type(y.ww.logical_type) == logical_types.Categorical: + if type(y.ww.logical_type) is logical_types.Categorical: y = self._encode_y_while_preserving_index(y) for t in self.statistically_significant_lags: lagged_features[self.target_colname_prefix.format(t)] = y.shift(t) diff --git a/evalml/tests/automl_tests/test_automl_search_classification.py b/evalml/tests/automl_tests/test_automl_search_classification.py index e55024dc46..9724edfc81 100644 --- a/evalml/tests/automl_tests/test_automl_search_classification.py +++ b/evalml/tests/automl_tests/test_automl_search_classification.py @@ -1230,7 +1230,7 @@ def test_time_series_pipeline_parameter_warnings( automl.search() # We throw a warning about time series being in beta - assert w[0].category == UserWarning + assert w[0].category is UserWarning if len(w) > 1: assert w[1].message.components == set_values diff --git a/evalml/tests/component_tests/test_target_imputer.py b/evalml/tests/component_tests/test_target_imputer.py index a236a3d413..2c16624ea2 100644 --- a/evalml/tests/component_tests/test_target_imputer.py +++ b/evalml/tests/component_tests/test_target_imputer.py @@ -262,9 +262,9 @@ def test_target_imputer_woodwork_custom_overrides_returned_by_components( _, y_t = imputer.transform(None, y) if impute_strategy_to_use == "most_frequent" or not has_nan: - assert type(y_t.ww.logical_type) == logical_type + assert type(y_t.ww.logical_type) is logical_type else: - assert type(y_t.ww.logical_type) == Double + assert type(y_t.ww.logical_type) is Double @pytest.mark.parametrize("impute_strategy", ["mean", "median", "most_frequent"]) diff --git a/evalml/tests/dependency_update_check/latest_dependency_versions.txt b/evalml/tests/dependency_update_check/latest_dependency_versions.txt index 5e1bca2bbe..009e746943 100644 --- a/evalml/tests/dependency_update_check/latest_dependency_versions.txt +++ b/evalml/tests/dependency_update_check/latest_dependency_versions.txt @@ -9,13 +9,13 @@ dask-expr==1.1.6 distributed==2024.6.2 featuretools==1.31.0 graphviz==0.20.3 -holidays==0.51 +holidays==0.52 imbalanced-learn==0.12.3 ipywidgets==8.1.3 kaleido==0.2.1 lightgbm==4.4.0 lime==0.2.0.1 -matplotlib==3.9.0 +matplotlib==3.9.1 matplotlib-inline==0.1.7 networkx==3.2.1 nlp-primitives==2.13.0 diff --git a/pyproject.toml b/pyproject.toml index 6fdf48c363..d72780bec0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -153,7 +153,7 @@ target-version = ["py39"] [tool.ruff] line-length = 88 -select = [ +lint.select = [ "D", # Pyflakes "F", @@ -163,20 +163,20 @@ select = [ # isort "I001" ] -ignore = ["E501", "D107", "D401"] +lint.ignore = ["E501", "D107", "D401", "E721"] src = ["evalml"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "__init__.py" = ["E402", "F401", "I001", "E501"] "evalml/tests/**" = ["D"] "evalml/utils/**" = ["D"] ".github/**" = ["D"] "docs/**" = ["D"] -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = ["evalml"] -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "google" [tool.coverage.run]