Skip to content

Commit e93937e

Browse files
authored
Merge branch 'master' into newer-fmt
2 parents 9e8d94d + 1531d87 commit e93937e

36 files changed

+261
-137
lines changed

.ci/check-python-dists.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if [ "$PY_MINOR_VER" -gt 7 ]; then
3232
--inspect \
3333
--ignore 'compiled-objects-have-debug-symbols'\
3434
--ignore 'distro-too-large-compressed' \
35-
--max-allowed-size-uncompressed '100M' \
35+
--max-allowed-size-uncompressed '120M' \
3636
--max-allowed-files 800 \
3737
"$(echo "${DIST_DIR}"/*)" || exit 1
3838
elif { test "$(uname -m)" = "aarch64"; }; then

.ci/test-windows.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if ($env:TASK -eq "swig") {
6666
conda init powershell
6767
conda activate
6868
conda config --set always_yes yes --set changeps1 no
69-
conda update -q -y conda "python=$env:PYTHON_VERSION[build=*cpython]"
69+
conda update -q -y conda "python=$env:PYTHON_VERSION[build=*_cp*]"
7070

7171
if ($env:PYTHON_VERSION -eq "3.7") {
7272
$env:CONDA_REQUIREMENT_FILE = "$env:BUILD_SOURCESDIRECTORY/.ci/conda-envs/ci-core-py37.txt"
@@ -80,7 +80,7 @@ $condaParams = @(
8080
"-y",
8181
"-n", "$env:CONDA_ENV",
8282
"--file", "$env:CONDA_REQUIREMENT_FILE",
83-
"python=$env:PYTHON_VERSION[build=*cpython]"
83+
"python=$env:PYTHON_VERSION[build=*_cp*]"
8484
)
8585
conda create @condaParams ; Assert-Output $?
8686

.ci/test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ if [[ "$TASK" == "cpp-tests" ]]; then
6464
exit 0
6565
fi
6666

67-
# including python=version[build=*cpython] to ensure that conda doesn't fall back to pypy
68-
CONDA_PYTHON_REQUIREMENT="python=${PYTHON_VERSION}[build=*cpython]"
67+
# including python=version=[build=*_cp*] to ensure that conda prefers CPython and doesn't fall back to
68+
# other implementations like pypy
69+
CONDA_PYTHON_REQUIREMENT="python=${PYTHON_VERSION}[build=*_cp*]"
6970

7071
if [[ $TASK == "if-else" ]]; then
7172
conda create -q -y -n "${CONDA_ENV}" "${CONDA_PYTHON_REQUIREMENT}" numpy

.github/workflows/cuda.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ jobs:
4343
software-properties-common
4444
# set up nvidia-docker
4545
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
46-
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -y
46+
sudo add-apt-repository -y \
47+
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
4748
curl -sL https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
48-
curl -sL https://nvidia.github.io/nvidia-docker/$(. /etc/os-release;echo $ID$VERSION_ID)/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
49+
curl -sL \
50+
https://nvidia.github.io/nvidia-docker/$(. /etc/os-release;echo $ID$VERSION_ID)/nvidia-docker.list \
51+
| sudo tee /etc/apt/sources.list.d/nvidia-docker.list
4952
sudo apt-get update
5053
sudo apt-get install --no-install-recommends -y \
5154
containerd.io \
@@ -58,6 +61,7 @@ jobs:
5861
run: |
5962
exit 0
6063
test:
64+
# yamllint disable-line rule:line-length
6165
name: ${{ matrix.task }} ${{ matrix.cuda_version }} ${{ matrix.method }} (${{ matrix.linux_version }}, ${{ matrix.compiler }}, Python ${{ matrix.python_version }})
6266
runs-on: [self-hosted, linux]
6367
needs: [restart-docker]
@@ -81,19 +85,19 @@ jobs:
8185
include:
8286
- method: wheel
8387
compiler: gcc
84-
python_version: "3.10"
85-
cuda_version: "12.6.1"
88+
python_version: "3.11"
89+
cuda_version: "12.8.0"
8690
linux_version: "ubuntu22.04"
8791
task: cuda
8892
- method: source
8993
compiler: gcc
90-
python_version: "3.12"
94+
python_version: "3.13"
9195
cuda_version: "12.2.2"
9296
linux_version: "ubuntu22.04"
9397
task: cuda
9498
- method: pip
9599
compiler: clang
96-
python_version: "3.11"
100+
python_version: "3.12"
97101
cuda_version: "11.8.0"
98102
linux_version: "ubuntu20.04"
99103
task: cuda

.github/workflows/linkchecker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
env:
1111
COMPILER: gcc
1212
OS_NAME: 'linux'
13-
PYTHON_VERSION: '3.12'
13+
PYTHON_VERSION: '3.13'
1414
TASK: 'check-links'
1515

1616
jobs:

.github/workflows/lock.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,18 @@ jobs:
3434
remove-pr-labels: 'awaiting response,awaiting review,blocking,in progress'
3535
# what message should be posted prior to locking?
3636
issue-comment: >
37-
This issue has been automatically locked since there has not been any recent activity since it was closed.
38-
To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues
37+
This issue has been automatically locked
38+
since there has not been any recent activity since it was closed.
39+
40+
To start a new related discussion,
41+
open a new issue at https://github.com/microsoft/LightGBM/issues
3942
including a reference to this.
4043
pr-comment: >
41-
This pull request has been automatically locked since there has not been any recent activity since it was closed.
42-
To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues
44+
This pull request has been automatically locked
45+
since there has not been any recent activity since it was closed.
46+
47+
To start a new related discussion,
48+
open a new issue at https://github.com/microsoft/LightGBM/issues
4349
including a reference to this.
4450
# what should the locking status be?
4551
issue-lock-reason: 'resolved'

.github/workflows/no_response.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ jobs:
1818
- uses: lee-dohm/[email protected]
1919
with:
2020
closeComment: >
21-
This issue has been automatically closed because it has been awaiting a response for too long.
22-
When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened.
23-
If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one.
21+
This issue has been automatically closed
22+
because it has been awaiting a response for too long.
23+
24+
When you have time to to work with the maintainers to resolve this issue,
25+
please post a new comment and it will be re-opened.
26+
If the issue has been locked for editing by the time you return to it,
27+
please open a new issue and reference this one.
28+
2429
Thank you for taking the time to improve LightGBM!
2530
daysUntilClose: 30
2631
responseRequiredLabel: awaiting response

.github/workflows/optional_checks.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ jobs:
1616
fetch-depth: 5
1717
submodules: false
1818
- name: Check that all tests succeeded
19+
shell: bash
1920
run: |
2021
workflows=(
2122
"R valgrind tests;r-valgrind"
2223
)
2324
for i in "${workflows[@]}"; do
2425
workflow_name=${i%;*}
26+
comment="The last reported status from workflow \"$workflow_name\" is failure."
27+
comment="${comment} Commit fixes and rerun the workflow."
2528
trigger_phrase=${i#*;}
26-
python "$GITHUB_WORKSPACE/.ci/get-workflow-status.py" "$trigger_phrase" \
27-
|| { echo "The last reported status from workflow \"$workflow_name\" is failure. Commit fixes and rerun the workflow."; \
28-
exit 1; }
29+
python \
30+
"$GITHUB_WORKSPACE/.ci/get-workflow-status.py" \
31+
"$trigger_phrase" \
32+
|| { echo "${comment}"; exit 1; }
2933
done

.github/workflows/python_package.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,32 @@ jobs:
2828
include:
2929
- os: macos-13
3030
task: regular
31-
python_version: '3.10'
31+
python_version: '3.11'
3232
- os: macos-13
3333
task: sdist
34-
python_version: '3.11'
34+
python_version: '3.12'
3535
- os: macos-13
3636
task: bdist
37-
python_version: '3.8'
37+
python_version: '3.9'
3838
- os: macos-13
3939
task: if-else
40-
python_version: '3.9'
40+
python_version: '3.10'
4141
- os: macos-14
4242
task: bdist
4343
method: wheel
44-
python_version: '3.10'
44+
python_version: '3.11'
4545
- os: macos-13
4646
task: mpi
4747
method: source
48-
python_version: '3.11'
48+
python_version: '3.12'
4949
- os: macos-13
5050
task: mpi
5151
method: pip
52-
python_version: '3.12'
52+
python_version: '3.13'
5353
- os: macos-13
5454
task: mpi
5555
method: wheel
56-
python_version: '3.9'
56+
python_version: '3.10'
5757
steps:
5858
- name: Checkout repository
5959
uses: actions/checkout@v4
@@ -113,12 +113,19 @@ jobs:
113113
--rm \
114114
-v $(pwd):/opt/lgb-build \
115115
-w /opt/lgb-build \
116-
python:3.12 \
116+
python:3.13 \
117117
/bin/bash ./.ci/test-python-latest.sh
118-
test-oldest-versions:
118+
test-old-versions:
119119
name: Python - oldest supported versions (ubuntu-latest)
120120
runs-on: ubuntu-latest
121121
timeout-minutes: 60
122+
strategy:
123+
fail-fast: false
124+
matrix:
125+
# end-of-life Python versions
126+
python_version:
127+
- '3.7'
128+
- '3.8'
122129
steps:
123130
- name: Checkout repository
124131
uses: actions/checkout@v4
@@ -140,12 +147,12 @@ jobs:
140147
--rm \
141148
-v $(pwd):/opt/lgb-build \
142149
-w /opt/lgb-build \
143-
python:3.7 \
150+
python:${{ matrix.python_version }} \
144151
/bin/bash ./.ci/test-python-oldest.sh
145152
all-python-package-jobs-successful:
146153
if: always()
147154
runs-on: ubuntu-latest
148-
needs: [test, test-latest-versions, test-oldest-versions]
155+
needs: [test, test-latest-versions, test-old-versions]
149156
steps:
150157
- name: Note that all tests succeeded
151158
uses: re-actors/[email protected]

.github/workflows/r_package.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ env:
4747

4848
jobs:
4949
test:
50+
# yamllint disable-line rule:line-length
5051
name: ${{ matrix.task }} (${{ matrix.os }}, ${{ matrix.compiler }}, R ${{ matrix.r_version }}, ${{ matrix.build_type }})
5152
runs-on: ${{ matrix.os }}
5253
container: ${{ matrix.container }}
@@ -244,7 +245,9 @@ jobs:
244245
- name: Install packages
245246
shell: bash
246247
run: |
247-
RDscript${{ matrix.r_customization }} -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
248+
R_LIBS="c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl', 'testthat')"
249+
RDscript${{ matrix.r_customization }} \
250+
-e "install.packages(${R_LIBS}, repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
248251
sh build-cran-package.sh --r-executable=RD${{ matrix.r_customization }}
249252
RD${{ matrix.r_customization }} CMD INSTALL lightgbm_*.tar.gz || exit 1
250253
- name: Run tests with sanitizers
@@ -309,7 +312,9 @@ jobs:
309312
- name: Install packages and run tests
310313
shell: bash
311314
run: |
312-
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
315+
R_LIBS="c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl')"
316+
Rscript \
317+
-e "install.packages(${R_LIBS}, repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
313318
sh build-cran-package.sh
314319
315320
# 'rchk' isn't run through 'R CMD check', use the approach documented at

.github/workflows/r_valgrind.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,27 @@ jobs:
3232
ref: "refs/pull/${{ github.event.client_payload.pr_number }}/merge"
3333
- name: Send init status
3434
if: ${{ always() }}
35+
shell: bash
3536
run: |
36-
$GITHUB_WORKSPACE/.ci/set-commit-status.sh "${{ github.workflow }}" "pending" "${{ github.event.client_payload.pr_sha }}"
37+
$GITHUB_WORKSPACE/.ci/set-commit-status.sh \
38+
"${{ github.workflow }}" \
39+
"pending" \
40+
"${{ github.event.client_payload.pr_sha }}"
41+
comment="Workflow **${{ github.workflow }}** has been triggered! 🚀\r\n"
42+
comment="${comment}${GITHUB_SERVER_URL}/microsoft/LightGBM/actions/runs/${GITHUB_RUN_ID}"
3743
$GITHUB_WORKSPACE/.ci/append-comment.sh \
3844
"${{ github.event.client_payload.comment_number }}" \
39-
"Workflow **${{ github.workflow }}** has been triggered! 🚀\r\n${GITHUB_SERVER_URL}/microsoft/LightGBM/actions/runs/${GITHUB_RUN_ID}"
45+
"${comment}"
4046
- name: Run tests with valgrind
4147
shell: bash
4248
run: ./.ci/test-r-package-valgrind.sh
4349
- name: Send final status
4450
if: ${{ always() }}
4551
run: |
46-
$GITHUB_WORKSPACE/.ci/set-commit-status.sh "${{ github.workflow }}" "${{ job.status }}" "${{ github.event.client_payload.pr_sha }}"
52+
$GITHUB_WORKSPACE/.ci/set-commit-status.sh \
53+
"${{ github.workflow }}" \
54+
"${{ job.status }}" \
55+
"${{ github.event.client_payload.pr_sha }}"
4756
$GITHUB_WORKSPACE/.ci/append-comment.sh \
4857
"${{ github.event.client_payload.comment_number }}" \
4958
"Status: ${{ job.status }}."

.github/workflows/release_drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
pull-requests: read
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: release-drafter/release-drafter@v6.0.0
18+
- uses: release-drafter/release-drafter@v6.1.0
1919
with:
2020
config-name: release-drafter.yml
2121
disable-autolabeler: true

.github/workflows/static_analysis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
COMPILER: 'gcc'
2020
MAKEFLAGS: '-j4'
2121
OS_NAME: 'linux'
22-
PYTHON_VERSION: '3.12'
22+
PYTHON_VERSION: '3.13'
2323

2424
jobs:
2525
test:
@@ -63,10 +63,12 @@ jobs:
6363
submodules: true
6464
- name: Install packages
6565
shell: bash
66+
# yamllint disable rule:line-length
6667
run: |
6768
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl', 'roxygen2', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
6869
sh build-cran-package.sh || exit 1
6970
R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit 1
71+
# yamllint enable rule:line-length
7072
- name: Test documentation
7173
shell: bash --noprofile --norc {0}
7274
run: |

.github/workflows/triggering_comments.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ on:
66

77
jobs:
88
triggering-tests:
9-
if: github.event.issue.pull_request && contains('OWNER,MEMBER,COLLABORATOR', github.event.comment.author_association) && startsWith(github.event.comment.body, '/gha run')
9+
if: |
10+
github.event.issue.pull_request &&
11+
contains('OWNER,MEMBER,COLLABORATOR', github.event.comment.author_association) &&
12+
startsWith(github.event.comment.body, '/gha run')
1013
runs-on: ubuntu-latest
1114
env:
1215
SECRETS_WORKFLOW: ${{ secrets.WORKFLOW }}

.pre-commit-config.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
args: ["--strict"]
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
2626
# Ruff version.
27-
rev: v0.8.3
27+
rev: v0.9.5
2828
hooks:
2929
# Run the linter.
3030
- id: ruff
@@ -39,8 +39,13 @@ repos:
3939
hooks:
4040
- id: shellcheck
4141
- repo: https://github.com/crate-ci/typos
42-
rev: v1.28.3
42+
rev: v1.29.5
4343
hooks:
4444
- id: typos
4545
args: ["--force-exclude"]
4646
exclude: (\.gitignore$)|(^\.editorconfig$)
47+
- repo: https://github.com/henryiii/validate-pyproject-schema-store
48+
rev: 2025.02.03
49+
hooks:
50+
- id: validate-pyproject
51+
files: python-package/pyproject.toml$

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: 2
22
build:
3-
os: "ubuntu-20.04"
3+
os: "ubuntu-24.04"
44
tools:
5-
python: "miniconda3-4.7"
5+
python: "mambaforge-23.11"
66
conda:
77
environment: docs/env.yml
88
formats:

0 commit comments

Comments
 (0)