From 34cd38799dff80c896d1ff3c3aeab384a6ed80f0 Mon Sep 17 00:00:00 2001 From: ryanSoley Date: Tue, 29 Aug 2023 10:08:47 +0000 Subject: [PATCH 1/3] [edgetest] automated change --- setup.cfg | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/setup.cfg b/setup.cfg index 3a7916a7..1d77870b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,13 +28,13 @@ zip_safe = False include_package_data = True packages = find: install_requires = - click<=8.1.4,>=7.1 + click<=8.1.7,>=7.1 fsspec<=2023.6.0,>=2021.4.0 intake[dataframe]<=0.7.0,>=0.5.2 - numpy<=1.25.1,>=1.22.0 + numpy<=1.25.2,>=1.22.0 pandas<=2.0.3,>=1.0.0 - pyarrow<=12.0.1,>=0.18.0 - PyYAML<=6.0,>=5.4.0 + pyarrow<=13.0.0,>=0.18.0 + PyYAML<=6.0.1,>=5.4.0 scikit-learn<=1.3.0,>=0.22.0 [options.extras_require] @@ -43,14 +43,14 @@ prefect = s3 = s3fs<=2023.6.0,>=0.4 ui = - dash<=2.11.1,>=2.0.0 - dash-bootstrap-components<=1.4.1,>=1.0.0 + dash<=2.13.0,>=2.0.0 + dash-bootstrap-components<=1.4.2,>=1.0.0 viz = - dash<=2.11.1,>=2.0.0 - dash-bootstrap-components<=1.4.1,>=1.0.0 + dash<=2.13.0,>=2.0.0 + dash-bootstrap-components<=1.4.2,>=1.0.0 all = - dash<=2.11.1,>=2.0.0 - dash-bootstrap-components<=1.4.1,>=1.0.0 + dash<=2.13.0,>=2.0.0 + dash-bootstrap-components<=1.4.2,>=1.0.0 prefect<=1.2.4,>=0.12.0 s3fs<=2023.6.0,>=0.4 From e04c0ea6ab7f4a08e7ab73d358bf100aa53b7d3d Mon Sep 17 00:00:00 2001 From: Ryan Soley Date: Wed, 30 Aug 2023 14:48:56 -0400 Subject: [PATCH 2/3] update environments --- docs/docs-environment.yml | 10 +++++----- environment.yml | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/docs-environment.yml b/docs/docs-environment.yml index 1dc66fb7..672c22ed 100644 --- a/docs/docs-environment.yml +++ b/docs/docs-environment.yml @@ -17,13 +17,13 @@ dependencies: # install rubicon-ml dependencies # so local pip install doesn't - - dash<=2.11.1,>=2.0.0 - - dash-bootstrap-components<=1.4.1,>=1.0.0 + - dash<=2.13.0,>=2.0.0 + - dash-bootstrap-components<=1.4.2,>=1.0.0 - fsspec<=2023.6.0,>=2021.4.0 - intake[dataframe]<=0.7.0,>=0.5.2 - - numpy<=1.25.1,>=1.22.0 + - numpy<=1.25.2,>=1.22.0 - pandas<=2.0.3,>=1.0.0 - prefect<=1.2.4,>=0.12.0 - - pyarrow<=12.0.1,>=0.18.0 - - PyYAML<=6.0,>=5.4.0 + - pyarrow<=13.0.0,>=0.18.0 + - PyYAML<=6.0.1,>=5.4.0 - scikit-learn<=1.3.0,>=0.22.0 diff --git a/environment.yml b/environment.yml index 73e7dbc4..8a8a8605 100644 --- a/environment.yml +++ b/environment.yml @@ -5,13 +5,13 @@ dependencies: - python>=3.8 - pip - - click<=8.1.4,>=7.1 + - click<=8.1.7,>=7.1 - fsspec<=2023.6.0,>=2021.4.0 - intake[dataframe]<=0.7.0,>=0.5.2 - - numpy<=1.25.1,>=1.22.0 + - numpy<=1.25.2,>=1.22.0 - pandas<=2.0.3,>=1.0.0 - - pyarrow<=12.0.1,>=0.18.0 - - PyYAML<=6.0,>=5.4.0 + - pyarrow<=13.0.0,>=0.18.0 + - PyYAML<=6.0.1,>=5.4.0 - scikit-learn<=1.3.0,>=0.22.0 # for prefect extras @@ -21,8 +21,8 @@ dependencies: - s3fs<=2023.6.0,>=0.4 # for viz extras - - dash<=2.11.1,>=2.0.0 - - dash-bootstrap-components<=1.4.1,>=1.0.0 + - dash<=2.13.0,>=2.0.0 + - dash-bootstrap-components<=1.4.2,>=1.0.0 # for testing - black From fc730d541f13344c8c73257d7e0bb803a346298f Mon Sep 17 00:00:00 2001 From: Ryan Soley Date: Wed, 30 Aug 2023 15:22:02 -0400 Subject: [PATCH 3/3] update pre-commit % flake8 --- .pre-commit-config.yaml | 26 +++++++++++------------ rubicon_ml/sklearn/pipeline.py | 2 +- tests/unit/repository/test_local_repo.py | 2 +- tests/unit/repository/test_memory_repo.py | 2 +- tests/unit/repository/test_s3_repo.py | 3 +-- tests/unit/sklearn/test_pipeline.py | 4 ++-- 6 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f6ec9ea2..6db48054 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,16 @@ repos: - - repo: https://github.com/psf/black - rev: 22.10.0 - hooks: - - id: black - exclude: (versioneer.py|_version.py) +- repo: https://github.com/psf/black + rev: 23.7.0 + hooks: + - id: black + exclude: (versioneer.py|_version.py) - - repo: https://github.com/timothycrosley/isort - rev: 5.12.0 - hooks: - - id: isort +- repo: https://github.com/timothycrosley/isort + rev: 5.12.0 + hooks: + - id: isort - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.9.2 - hooks: - - id: flake8 +- repo: https://github.com/pycqa/flake8 + rev: 6.1.0 + hooks: + - id: flake8 diff --git a/rubicon_ml/sklearn/pipeline.py b/rubicon_ml/sklearn/pipeline.py index 9ccf4a81..c0363a08 100644 --- a/rubicon_ml/sklearn/pipeline.py +++ b/rubicon_ml/sklearn/pipeline.py @@ -318,7 +318,7 @@ def make_pipeline( steps = _name_estimators(steps) user_defined_loggers = _name_loggers(steps, loggers) - if type(project) != Project: + if not isinstance(project, Project): raise ValueError( "project" + str(project) + " must be of type rubicon_ml.client.project.Project" ) diff --git a/tests/unit/repository/test_local_repo.py b/tests/unit/repository/test_local_repo.py index 36ad000e..53e995a8 100644 --- a/tests/unit/repository/test_local_repo.py +++ b/tests/unit/repository/test_local_repo.py @@ -14,7 +14,7 @@ def test_initialization(): local_repo = LocalRepository(root_dir="/local/root") assert local_repo.PROTOCOL == "file" - assert type(local_repo.filesystem) == fsspec.implementations.local.LocalFileSystem + assert isinstance(local_repo.filesystem, fsspec.implementations.local.LocalFileSystem) @patch("fsspec.implementations.local.LocalFileSystem.open") diff --git a/tests/unit/repository/test_memory_repo.py b/tests/unit/repository/test_memory_repo.py index 8b4c3f46..308f2082 100644 --- a/tests/unit/repository/test_memory_repo.py +++ b/tests/unit/repository/test_memory_repo.py @@ -11,7 +11,7 @@ def test_initialization(): assert memory_repo.PROTOCOL == "memory" assert memory_repo.root_dir == "/root" - assert type(memory_repo.filesystem) == fsspec.implementations.memory.MemoryFileSystem + assert isinstance(memory_repo.filesystem, fsspec.implementations.memory.MemoryFileSystem) def test_persist_dataframe(): diff --git a/tests/unit/repository/test_s3_repo.py b/tests/unit/repository/test_s3_repo.py index 8b5192ca..33a660a1 100644 --- a/tests/unit/repository/test_s3_repo.py +++ b/tests/unit/repository/test_s3_repo.py @@ -12,8 +12,7 @@ def test_initialization(): s3_repo = S3Repository(root_dir="s3://bucket/root") - assert s3_repo.PROTOCOL == "s3" - assert type(s3_repo.filesystem) == s3fs.core.S3FileSystem + assert isinstance(s3_repo.filesystem, s3fs.core.S3FileSystem) @patch("s3fs.core.S3FileSystem.open") diff --git a/tests/unit/sklearn/test_pipeline.py b/tests/unit/sklearn/test_pipeline.py index ba392ffa..19a95a8a 100644 --- a/tests/unit/sklearn/test_pipeline.py +++ b/tests/unit/sklearn/test_pipeline.py @@ -17,7 +17,7 @@ def test_get_default_estimator_logger(project_client, fake_estimator_cls): logger = pipeline.get_estimator_logger() - assert type(logger) == EstimatorLogger + assert isinstance(logger, EstimatorLogger) def test_get_user_defined_estimator_logger(project_client, fake_estimator_cls): @@ -29,7 +29,7 @@ def test_get_user_defined_estimator_logger(project_client, fake_estimator_cls): logger = pipeline.get_estimator_logger("est") - assert type(logger) == FilterEstimatorLogger + assert isinstance(logger, FilterEstimatorLogger) def test_fit_logs_parameters(project_client, fake_estimator_cls):