You need to sign in or sign up before continuing.

[python-package] [ci] allow ImportErrors from dependencies to be raised, expand testing of imports #7456

Open
jameslamb opened 2:11am on September 25, 2026 wants to merge 243 Δ into microsoft/lightgbm main from
python/lazy-imports-pt3

Pull request #7456 quality checks

Code files and functions touched by this pull request are analyzed below.

Quality targets

How does this pull request compare to chosen code quality targets? Read more about code quality targets.

Target name Target value This PR
Maximum Diff Delta per PR 500 243
Maximum comment count per PR 10 8
Pull request maximum business days between activity 3 39
Pull request maximum business days open 5 50

Coupled files

Are there any files from this commit that are always committed alongside another file? This often suggests that there exists code coupling to potentially remove. Read more about code coupling

Committed together % Code file
Coupled code file
Commits in PR with both
100 .readthedocs.yaml
.github/workflows/python_package.yml
1
100 .readthedocs.yaml
docs/env.yml
1
100 .readthedocs.yaml
.github/workflows/static_analysis.yml
1
100 .readthedocs.yaml
docs/conf.py
1
100 tests/distributed/_test_distributed.py
python-package/lightgbm/basic.py
1
100 .ci/README.md
docker/README.md
1
100 docs/Makefile
docs/conf.py
1
100 docs/Makefile
docker/README.md
1
100 .github/workflows/swig.yml
.github/workflows/r_package.yml
1
100 .ci/test-python-minimal-deps.sh
.ci/test.sh
1
100 .ci/pip-envs/requirements-windows-arm64.txt
.ci/test.sh
1
100 .ci/pip-envs/requirements-test.txt
.ci/test.sh
1
100 .github/workflows/swig.yml
.github/workflows/python_package.yml
1
94 .github/workflows/cpp.yml
.github/workflows/python_package.yml
1
90 .github/workflows/build.yml
.github/workflows/r_package.yml
1
88 .github/workflows/cpp.yml
.github/workflows/r_package.yml
1
85 .ci/lint-r-code.R
docker/README.md
1
85 .readthedocs.yaml
.gitignore
1
80 .github/workflows/swig.yml
.github/workflows/cpp.yml
1
77 .github/workflows/build.yml
.github/workflows/python_package.yml
1
77 tests/distributed/_test_distributed.py
tests/python_package_test/test_basic.py
1
75 .ci/README.md
docs/conf.py
1
75 .ci/test-imports.py
.ci/test.sh
1
75 .ci/test-imports.py
python-package/lightgbm/__init__.py
2
72 .github/workflows/build.yml
.github/workflows/swig.yml
1
70 CONTRIBUTING.md
docker/README.md
1

Biggest files changes in pull request

Path View whole file Lines removed Lines added Final line count
tests/python_package_test/utils.py 2 18 329
.ci/test-python-minimal-deps.sh 0 30 30
tests/python_package_test/test_basic.py 3 11 1473
.ci/test.sh 0 8 361
.github/workflows/python_package.yml 0 39 597
python-package/lightgbm/__init__.py 10 2 51
.ci/test-imports.py 0 23 24
.ci/test-python-latest.sh 0 1 19
.pre-commit-config.yaml 0 0 136
.ci/pip-envs/requirements-windows-arm64.txt 3 0 14
.ci/pip-envs/requirements-test.txt 0 5 5
.ci/conda-envs/ci-core.txt 0 1 51
.ci/pip-envs/requirements-latest.txt 5 0 19
python-package/pyproject.toml 0 0 ---
docs/conf.py 0 0 ---
.github/workflows/cuda.yml 0 0 ---
docs/Key-Events.md 0 0 ---
include/LightGBM/dataset.h 0 0 ---
.github/workflows/swig.yml 0 0 ---
.github/workflows/r_package.yml 0 0 ---
docs/index.rst 0 0 ---
.ci/test-windows.ps1 0 0 ---
tests/distributed/utils.py 0 0 ---
src/io/dataset_loader.cpp 0 0 ---
R-package/DESCRIPTION 0 0 ---
.ci/setup.sh 0 0 ---
tests/cpp_tests/test_common.cpp 0 0 ---
docs/Makefile 0 0 ---
.github/workflows/static_analysis.yml 0 0 ---
tests/distributed/_test_distributed.py 0 0 ---
pixi.lock 0 0 ---
.github/workflows/cpp.yml 0 0 ---
.github/workflows/build.yml 0 0 ---
docs/Development-Guide.rst 0 0 ---
.github/workflows/ci-images.yml 0 0 ---
CONTRIBUTING.md 0 0 ---
tests/python_package_test/test_sklearn.py 0 0 ---
docs/build-docs.sh 0 0 ---
docker/README.md 0 0 ---
.ci/README.md 0 0 ---
.readthedocs.yaml 0 0 ---
.ci/test-python-oldest.sh 0 0 ---
python-package/lightgbm/basic.py 0 0 ---
pixi.toml 0 0 ---
tests/distributed/_test_distributed_dataset.py 0 0 ---
R-package/configure.win 0 0 ---
.ci/check-python-dists.sh 0 0 ---
.ci/lint-r-code.R 0 0 ---
docs/env.yml 0 0 ---
python-package/lightgbm/sklearn.py 0 0 ---
.gitignore 0 0 ---