Repository: deepchecks/deepchecks (branch: jonatan/llm-1167-insights-query-that-result-0-samples-when-running-it)
Commit date: 2023-12-05T13:29:43Z

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/4_Run Pylint.txt
log: ##[group]Run make pylint
[36;1mmake pylint[0m
shell: /usr/bin/bash -e {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]
#### Creating Python Virtual Environment [ /home/runner/work/deepchecks/deepchecks/venv ] ####
external python_exe is /opt/hostedtoolcache/Python/3.9.18/x64/bin/python3
####  installing development dependencies, it could take some time, please wait! ####
  DEPRECATION: pathtools is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  DEPRECATION: docopt is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  DEPRECATION: promise is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  DEPRECATION: gower is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  DEPRECATION: umap-learn is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  DEPRECATION: sentence-transformers is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

[notice] A new release of pip is available: 23.0.1 -> 23.3.1
[notice] To update, run: python3 -m pip install --upgrade pip
/home/runner/work/deepchecks/deepchecks/venv/bin/pylint -j 0 deepchecks
************* Module deepchecks.utils.dataframes
deepchecks/utils/dataframes.py:47:54: C0303: Trailing whitespace (trailing-whitespace)
deepchecks/utils/dataframes.py:47:0: W0311: Bad indentation. Found 12 spaces, expected 8 (bad-indentation)
deepchecks/utils/dataframes.py:50:0: C0303: Trailing whitespace (trailing-whitespace)

------------------------------------
Your code has been rated at 10.00/10

make: *** [makefile:213: pylint] Error 20
##[error]Process completed with exit code 2.


Changed files:
deepchecks/utils/dataframes.py

Fix diff:
diff --git a/deepchecks/utils/dataframes.py b/deepchecks/utils/dataframes.py
index 9f612e5e1..308e700ff 100644
--- a/deepchecks/utils/dataframes.py
+++ b/deepchecks/utils/dataframes.py
@@ -44,10 +44,10 @@ def default_fill_na_per_column_type(df: pd.DataFrame, cat_features: t.Optional[t
 def default_fill_na_series(col: pd.Series, is_cat_column: t.Optional[bool] = None) -> t.Optional[pd.Series]:
     """Fill NaN values based on column type if possible otherwise returns None."""
     if is_cat_column and 'None' not in col.astype('object').unique():
-            return col.astype('object').fillna('None')            
+        return col.astype('object').fillna('None')
     elif is_numeric_dtype(col):
         return col.astype('float64').fillna(np.nan)
-    
+
     common_values_list = col.mode()
     if isinstance(common_values_list, pd.Series) and len(common_values_list) > 0:
         return col.fillna(common_values_list[0])