зеркало из https://github.com/microsoft/LightGBM.git
[ci] update some linting versions (#6598)
This commit is contained in:
Родитель
07eb351a8a
Коммит
5e4ab24b30
12
.ci/test.sh
12
.ci/test.sh
|
@ -97,12 +97,12 @@ fi
|
||||||
if [[ $TASK == "lint" ]]; then
|
if [[ $TASK == "lint" ]]; then
|
||||||
mamba create -q -y -n $CONDA_ENV \
|
mamba create -q -y -n $CONDA_ENV \
|
||||||
${CONDA_PYTHON_REQUIREMENT} \
|
${CONDA_PYTHON_REQUIREMENT} \
|
||||||
'cmakelint>=1.4.2' \
|
'cmakelint>=1.4.3' \
|
||||||
'cpplint>=1.6.0' \
|
'cpplint>=1.6.0' \
|
||||||
'matplotlib-base>=3.8.3' \
|
'matplotlib-base>=3.9.1' \
|
||||||
'mypy>=1.8.0' \
|
'mypy>=1.11.1' \
|
||||||
'pre-commit>=3.6.0' \
|
'pre-commit>=3.8.0' \
|
||||||
'pyarrow>=6.0' \
|
'pyarrow-core>=17.0' \
|
||||||
'r-lintr>=3.1.2'
|
'r-lintr>=3.1.2'
|
||||||
source activate $CONDA_ENV
|
source activate $CONDA_ENV
|
||||||
echo "Linting Python code"
|
echo "Linting Python code"
|
||||||
|
@ -124,7 +124,7 @@ if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then
|
||||||
-y \
|
-y \
|
||||||
-n $CONDA_ENV \
|
-n $CONDA_ENV \
|
||||||
'doxygen>=1.10.0' \
|
'doxygen>=1.10.0' \
|
||||||
'rstcheck>=6.2.0' || exit 1
|
'rstcheck>=6.2.4' || exit 1
|
||||||
source activate $CONDA_ENV
|
source activate $CONDA_ENV
|
||||||
# check reStructuredText formatting
|
# check reStructuredText formatting
|
||||||
cd "${BUILD_DIRECTORY}/python-package"
|
cd "${BUILD_DIRECTORY}/python-package"
|
||||||
|
|
|
@ -17,13 +17,14 @@ concurrency:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
COMPILER: 'gcc'
|
COMPILER: 'gcc'
|
||||||
|
MAKEFLAGS: '-j4'
|
||||||
OS_NAME: 'linux'
|
OS_NAME: 'linux'
|
||||||
PYTHON_VERSION: '3.12'
|
PYTHON_VERSION: '3.12'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: ${{ matrix.task }}
|
name: ${{ matrix.task }}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
|
@ -25,7 +25,7 @@ repos:
|
||||||
args: ["--settings-path", "python-package/pyproject.toml"]
|
args: ["--settings-path", "python-package/pyproject.toml"]
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
# Ruff version.
|
# Ruff version.
|
||||||
rev: v0.4.7
|
rev: v0.5.7
|
||||||
hooks:
|
hooks:
|
||||||
# Run the linter.
|
# Run the linter.
|
||||||
- id: ruff
|
- id: ruff
|
||||||
|
|
|
@ -53,7 +53,7 @@ def _create_data(task, n_samples=100, n_features=4):
|
||||||
elif task == "multiclass-classification":
|
elif task == "multiclass-classification":
|
||||||
centers = 3
|
centers = 3
|
||||||
else:
|
else:
|
||||||
ValueError(f"Unknown classification task '{task}'")
|
raise ValueError(f"Unknown classification task '{task}'")
|
||||||
X, y = make_blobs(n_samples=n_samples, n_features=n_features, centers=centers, random_state=42)
|
X, y = make_blobs(n_samples=n_samples, n_features=n_features, centers=centers, random_state=42)
|
||||||
g = None
|
g = None
|
||||||
elif task == "regression":
|
elif task == "regression":
|
||||||
|
|
Загрузка…
Ссылка в новой задаче