Repository: deepchecks/deepchecks (branch: main)
Commit date: 2023-12-05T16:11:11Z

Workflow file: .github/workflows/lint.yml (Code Style)
# ----------------------------------------------------------------------------
# Copyright (C) 2021-2023 Deepchecks (https://www.deepchecks.com)
#
# This file is part of Deepchecks.
# Deepchecks is distributed under the terms of the GNU Affero General
# Public License (version 3 or later).
# You should have received a copy of the GNU Affero General Public License
# along with Deepchecks.  If not, see <http://www.gnu.org/licenses/>.
# ----------------------------------------------------------------------------
#
name: Code Style

on:
  push:
    branches: [ main ]
  pull_request: 
    branches: [ main, nlp-base]

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

env:
  DISABLE_DEEPCHECKS_ANONYMOUS_TELEMETRY: 'true'
  PIP_INDEX_URL: http://localhost:8629/2023-12-05
  UV_INDEX_URL: http://localhost:8629/2023-12-05

jobs:
  pylint:
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080


    steps:
    - uses: actions/checkout@v2
    - name: Set up Python 3.9
      uses: actions/setup-python@v2
      with:
        python-version: 3.9

    - name: Run Pylint
      run: make pylint
    - name: Check import order
      uses: jamescurtin/isort-action@master
      with:
        sortPaths: deepchecks/
  docstring:
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python 3.9
      uses: actions/setup-python@v2
      with:
        python-version: 3.9
    - name: Run Pydocstyle
      run: make docstring

  license-check:
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    
    needs: docstring
    
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python 3.9
      uses: actions/setup-python@v2
      with:
        python-version: 3.9
    - name: Run License eye
      run: make license-check


Failed build logs:
step_name: pylint/5_Check import order.txt
log: ##[group]Run jamescurtin/isort-action@master
with:
  sortPaths: deepchecks/
  isortVersion: latest
  configuration: --check-only --diff
env:
  DISABLE_DEEPCHECKS_ANONYMOUS_TELEMETRY: true
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
##[endgroup]
##[group]Run $GITHUB_ACTION_PATH/bin/ensure_python
[36;1m$GITHUB_ACTION_PATH/bin/ensure_python[0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DISABLE_DEEPCHECKS_ANONYMOUS_TELEMETRY: true
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
##[endgroup]
##[group]Run $GITHUB_ACTION_PATH/bin/install_packages latest 
[36;1m$GITHUB_ACTION_PATH/bin/install_packages latest [0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DISABLE_DEEPCHECKS_ANONYMOUS_TELEMETRY: true
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
##[endgroup]
##[group]Install isort
Installing latest version of isort
Collecting isort[pipfile_deprecated_finder,requirements_deprecated_finder]
  Downloading isort-5.12.0-py3-none-any.whl (91 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 91.2/91.2 kB 4.2 MB/s eta 0:00:00
Collecting pip-api (from isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading pip_api-0.0.30-py3-none-any.whl (111 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 111.6/111.6 kB 8.3 MB/s eta 0:00:00
Collecting pipreqs (from isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading pipreqs-0.4.13-py2.py3-none-any.whl (33 kB)
Collecting pip-shims>=0.5.2 (from isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading pip_shims-0.7.3-py2.py3-none-any.whl (35 kB)
Collecting requirementslib (from isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading requirementslib-3.0.0-py2.py3-none-any.whl.metadata (13 kB)
Requirement already satisfied: pip>=20 in /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages (from pip-shims>=0.5.2->isort[pipfile_deprecated_finder,requirements_deprecated_finder]) (23.0.1)
Collecting packaging (from pip-shims>=0.5.2->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
Requirement already satisfied: setuptools in /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages (from pip-shims>=0.5.2->isort[pipfile_deprecated_finder,requirements_deprecated_finder]) (58.1.0)
Collecting wheel (from pip-shims>=0.5.2->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
Collecting docopt (from pipreqs->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading docopt-0.6.2.tar.gz (25 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting yarg (from pipreqs->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading yarg-0.1.9-py2.py3-none-any.whl (19 kB)
Collecting distlib>=0.2.8 (from requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading distlib-0.3.7-py2.py3-none-any.whl.metadata (5.1 kB)
Collecting pep517>=0.5.0 (from requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading pep517-0.13.1-py3-none-any.whl.metadata (4.1 kB)
Collecting pip>=20 (from pip-shims>=0.5.2->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading pip-23.3.1-py3-none-any.whl.metadata (3.5 kB)
Collecting platformdirs (from requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading platformdirs-4.1.0-py3-none-any.whl.metadata (11 kB)
Collecting plette[validation] (from requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading plette-0.4.4-py2.py3-none-any.whl (12 kB)
Collecting pydantic (from requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading pydantic-2.5.2-py3-none-any.whl.metadata (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.2/65.2 kB 8.9 MB/s eta 0:00:00
Collecting requests (from requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting tomlkit>=0.5.3 (from requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading tomlkit-0.12.3-py3-none-any.whl.metadata (2.7 kB)
Collecting tomli>=1.1.0 (from pep517>=0.5.0->requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting cerberus (from plette[validation]->requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading Cerberus-1.3.5-py3-none-any.whl.metadata (6.0 kB)
Collecting annotated-types>=0.4.0 (from pydantic->requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading annotated_types-0.6.0-py3-none-any.whl.metadata (12 kB)
Collecting pydantic-core==2.14.5 (from pydantic->requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading pydantic_core-2.14.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.5 kB)
Collecting typing-extensions>=4.6.1 (from pydantic->requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading typing_extensions-4.8.0-py3-none-any.whl.metadata (3.0 kB)
Collecting charset-normalizer<4,>=2 (from requests->requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests->requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading idna-3.6-py3-none-any.whl.metadata (9.9 kB)
Collecting urllib3<3,>=1.21.1 (from requests->requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading urllib3-2.1.0-py3-none-any.whl.metadata (6.4 kB)
Collecting certifi>=2017.4.17 (from requests->requirementslib->isort[pipfile_deprecated_finder,requirements_deprecated_finder])
  Downloading certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB)
Downloading requirementslib-3.0.0-py2.py3-none-any.whl (96 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.7/96.7 kB 8.0 MB/s eta 0:00:00
Downloading distlib-0.3.7-py2.py3-none-any.whl (468 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 kB 10.1 MB/s eta 0:00:00
Downloading pep517-0.13.1-py3-none-any.whl (19 kB)
Downloading pip-23.3.1-py3-none-any.whl (2.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 17.3 MB/s eta 0:00:00
Downloading tomlkit-0.12.3-py3-none-any.whl (37 kB)
Downloading packaging-23.2-py3-none-any.whl (53 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.0/53.0 kB 15.6 MB/s eta 0:00:00
Downloading platformdirs-4.1.0-py3-none-any.whl (17 kB)
Downloading pydantic-2.5.2-py3-none-any.whl (381 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 381.9/381.9 kB 21.0 MB/s eta 0:00:00
Downloading pydantic_core-2.14.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 29.9 MB/s eta 0:00:00
Downloading requests-2.31.0-py3-none-any.whl (62 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 18.9 MB/s eta 0:00:00
Using cached wheel-0.42.0-py3-none-any.whl (65 kB)
Downloading annotated_types-0.6.0-py3-none-any.whl (12 kB)
Downloading certifi-2023.11.17-py3-none-any.whl (162 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 162.5/162.5 kB 33.6 MB/s eta 0:00:00
Downloading charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 142.3/142.3 kB 36.6 MB/s eta 0:00:00
Downloading idna-3.6-py3-none-any.whl (61 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.6/61.6 kB 19.5 MB/s eta 0:00:00
Downloading typing_extensions-4.8.0-py3-none-any.whl (31 kB)
Downloading urllib3-2.1.0-py3-none-any.whl (104 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 104.6/104.6 kB 29.6 MB/s eta 0:00:00
Downloading Cerberus-1.3.5-py3-none-any.whl (30 kB)
Building wheels for collected packages: docopt
  Building wheel for docopt (pyproject.toml): started
  Building wheel for docopt (pyproject.toml): finished with status 'done'
  Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13706 sha256=29c03dca51f57ce29e3477c3d0f4958f94387b06a456f0fb38fa4f2f840b837c
  Stored in directory: /home/runner/.cache/pip/wheels/70/4a/46/1309fc853b8d395e60bafaf1b6df7845bdd82c95fd59dd8d2b
Successfully built docopt
Installing collected packages: docopt, distlib, cerberus, wheel, urllib3, typing-extensions, tomlkit, tomli, platformdirs, pip, packaging, isort, idna, charset-normalizer, certifi, annotated-types, requests, pydantic-core, plette, pip-shims, pip-api, pep517, yarg, pydantic, requirementslib, pipreqs
  Attempting uninstall: pip
    Found existing installation: pip 23.0.1
    Uninstalling pip-23.0.1:
      Successfully uninstalled pip-23.0.1
Successfully installed annotated-types-0.6.0 cerberus-1.3.5 certifi-2023.11.17 charset-normalizer-3.3.2 distlib-0.3.7 docopt-0.6.2 idna-3.6 isort-5.12.0 packaging-23.2 pep517-0.13.1 pip-23.3.1 pip-api-0.0.30 pip-shims-0.7.3 pipreqs-0.4.13 platformdirs-4.1.0 plette-0.4.4 pydantic-2.5.2 pydantic-core-2.14.5 requests-2.31.0 requirementslib-3.0.0 tomli-2.0.1 tomlkit-0.12.3 typing-extensions-4.8.0 urllib3-2.1.0 wheel-0.42.0 yarg-0.1.9
##[endgroup]
##[group]Run echo "::add-matcher::$GITHUB_ACTION_PATH/isort-matcher.json"
[36;1mecho "::add-matcher::$GITHUB_ACTION_PATH/isort-matcher.json"[0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DISABLE_DEEPCHECKS_ANONYMOUS_TELEMETRY: true
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
##[endgroup]
##[group]Run $GITHUB_ACTION_PATH/bin/run_isort --check-only --diff deepchecks/
[36;1m$GITHUB_ACTION_PATH/bin/run_isort --check-only --diff deepchecks/[0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  DISABLE_DEEPCHECKS_ANONYMOUS_TELEMETRY: true
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
##[endgroup]
Running isort --check-only --diff deepchecks/
##[error]ERROR: /home/runner/work/deepchecks/deepchecks/deepchecks/nlp/utils/text_embeddings.py Imports are incorrectly sorted and/or formatted.
##[error]Process completed with exit code 1.


Changed files:
deepchecks/nlp/utils/text_embeddings.py

Fix diff:
diff --git a/deepchecks/nlp/utils/text_embeddings.py b/deepchecks/nlp/utils/text_embeddings.py
index 758d3554b..85fc5ad47 100644
--- a/deepchecks/nlp/utils/text_embeddings.py
+++ b/deepchecks/nlp/utils/text_embeddings.py
@@ -9,8 +9,8 @@
 # ----------------------------------------------------------------------------
 #
 """Utils module for calculating embeddings for text."""
-import sys
 import re
+import sys
 import warnings
 from itertools import islice
 from typing import Optional