From 83640313223d4b6c3fe04049364f80bd158923f1 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 18 Mar 2024 21:41:16 -0500 Subject: [PATCH 01/15] [ci] raise floors on CI dependencies --- .ci/test.sh | 36 ++++++++++++++++++++---------------- .ci/test_windows.ps1 | 28 ++++++++++++++-------------- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/.ci/test.sh b/.ci/test.sh index 5af6e6de4e6b..afe54428c945 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -126,25 +126,29 @@ fi # older versions of Dask are incompatible with pandas>=2.0, but not all conda packages' metadata accurately reflects that # # ref: https://github.com/microsoft/LightGBM/issues/6030 -CONSTRAINED_DEPENDENCIES="'dask>=2023.5.0' 'distributed>=2023.5.0' 'pandas>=2.0' python-graphviz" +CONSTRAINED_DEPENDENCIES="'dask>=2023.5.0' 'distributed>=2023.5.0' 'pandas>=2.0' 'python-graphviz>=0.20'" if [[ $PYTHON_VERSION == "3.7" ]]; then CONSTRAINED_DEPENDENCIES="'dask' 'distributed' 'python-graphviz<0.20.2' 'pandas<2.0'" fi -# including python=version[build=*cpython] to ensure that conda doesn't fall back to pypy -mamba create -q -y -n $CONDA_ENV \ +# notes: +# * including python=version[build=*cpython] to ensure that conda doesn't fall back to pypy +# * these floors are not the oldest versions LightGBM supports... they're here just to make conda +# solves faster, and should generally be the latest versions that work for all CI jobs using +# this script +mamba create -y -n $CONDA_ENV \ ${CONSTRAINED_DEPENDENCIES} \ - cffi \ - cloudpickle \ - joblib \ - matplotlib \ - numpy \ - psutil \ - pyarrow \ - pytest \ + 'cffi>=1.16' \ + 'cloudpickle>=3.0.0' \ + 'joblib>=1.3.2' \ + 'matplotlib-base>=3.7.3' \ + 'numpy>=1.24.4' \ + 'psutil>=5.9.8' \ + 'pyarrow>=15.0' \ + 'pytest>=8.1.1' \ ${CONDA_PYTHON_REQUIREMENT} \ - scikit-learn \ - scipy || exit 1 + 'scikit-learn>=1.3.2' \ + 'scipy>=1.10' || exit 1 source activate $CONDA_ENV @@ -310,9 +314,9 @@ matplotlib.use\(\"Agg\"\)\ sed -i'.bak' 's/graph.render(view=True)/graph.render(view=False)/' plot_example.py # requirements for examples mamba install -q -y -n $CONDA_ENV \ - h5py \ - ipywidgets \ - notebook + 'h5py>=3.10' \ + 'ipywidgets>=8.1.2' \ + 'notebook>=7.1.2' for f in *.py **/*.py; do python $f || exit 1; done # run all examples cd $BUILD_DIRECTORY/examples/python-guide/notebooks sed -i'.bak' 's/INTERACTIVE = False/assert False, \\"Interactive mode disabled\\"/' interactive_plot_example.ipynb diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 4219b45ccd57..e872b82c58ea 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -48,23 +48,23 @@ conda config --set always_yes yes --set changeps1 no # ref: # * https://stackoverflow.com/a/62897729/3986677 # * https://github.com/microsoft/LightGBM/issues/5899 -conda install brotlipy +conda install "brotlipy>=0.7" conda update -q -y conda conda create -q -y -n $env:CONDA_ENV ` - cffi ` - cloudpickle ` - joblib ` - matplotlib ` - numpy ` - pandas ` - psutil ` - pyarrow ` - pytest ` + "cffi>=1.16" ` + "cloudpickle>=3.0" ` + "joblib>=1.3.2" ` + "matplotlib-base>=3.7.3" ` + "numpy>=1.24.4" ` + "pandas>=1.5" ` + "psutil>=5.9.8" ` + "pyarrow>=15.0" ` + "pytest>=8.1.1" ` "python=$env:PYTHON_VERSION[build=*cpython]" ` - python-graphviz ` - scikit-learn ` - scipy ; Check-Output $? + "python-graphviz>=0.20" ` + "scikit-learn>=1.3.2" ` + "scipy>=1.10" ; Check-Output $? if ($env:TASK -ne "bdist") { conda activate $env:CONDA_ENV @@ -126,7 +126,7 @@ if (($env:TASK -eq "regular") -or (($env:APPVEYOR -eq "true") -and ($env:TASK -e cd $env:BUILD_SOURCESDIRECTORY/examples/python-guide @("import matplotlib", "matplotlib.use('Agg')") + (Get-Content "plot_example.py") | Set-Content "plot_example.py" (Get-Content "plot_example.py").replace('graph.render(view=True)', 'graph.render(view=False)') | Set-Content "plot_example.py" # prevent interactive window mode - conda install -q -y -n $env:CONDA_ENV "h5py>3.0" ipywidgets notebook + conda install -q -y -n $env:CONDA_ENV "h5py>=3.10" "ipywidgets>=8.1.2" "notebook>=7.1.2" foreach ($file in @(Get-ChildItem *.py)) { @("import sys, warnings", "warnings.showwarning = lambda message, category, filename, lineno, file=None, line=None: sys.stdout.write(warnings.formatwarning(message, category, filename, lineno, line))") + (Get-Content $file) | Set-Content $file python $file ; Check-Output $? From b9a45e104801dbc4610fa7540396de09bb481f58 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 18 Mar 2024 22:00:03 -0500 Subject: [PATCH 02/15] fix matplotlib-base uninstall, relax pyarrow pin --- .ci/test.sh | 8 ++++---- .ci/test_windows.ps1 | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.ci/test.sh b/.ci/test.sh index afe54428c945..9b44d5df5aaa 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -74,10 +74,10 @@ if [[ $TASK == "lint" ]]; then ${CONDA_PYTHON_REQUIREMENT} \ 'cmakelint>=1.4.2' \ 'cpplint>=1.6.0' \ - 'matplotlib>=3.8.3' \ + 'matplotlib-base>=3.8.3' \ 'mypy>=1.8.0' \ 'pre-commit>=3.6.0' \ - 'pyarrow>=14.0' \ + 'pyarrow>=12.0' \ 'r-lintr>=3.1' source activate $CONDA_ENV echo "Linting Python code" @@ -313,7 +313,7 @@ matplotlib.use\(\"Agg\"\)\ ' plot_example.py # prevent interactive window mode sed -i'.bak' 's/graph.render(view=True)/graph.render(view=False)/' plot_example.py # requirements for examples - mamba install -q -y -n $CONDA_ENV \ + mamba install -y -n $CONDA_ENV \ 'h5py>=3.10' \ 'ipywidgets>=8.1.2' \ 'notebook>=7.1.2' @@ -328,7 +328,7 @@ matplotlib.use\(\"Agg\"\)\ dask \ distributed \ joblib \ - matplotlib \ + matplotlib-base \ psutil \ pyarrow \ python-graphviz \ diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index e872b82c58ea..35e71b72a75b 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -51,7 +51,7 @@ conda config --set always_yes yes --set changeps1 no conda install "brotlipy>=0.7" conda update -q -y conda -conda create -q -y -n $env:CONDA_ENV ` +conda create -y -n $env:CONDA_ENV ` "cffi>=1.16" ` "cloudpickle>=3.0" ` "joblib>=1.3.2" ` @@ -59,7 +59,7 @@ conda create -q -y -n $env:CONDA_ENV ` "numpy>=1.24.4" ` "pandas>=1.5" ` "psutil>=5.9.8" ` - "pyarrow>=15.0" ` + "pyarrow>=12.0" ` "pytest>=8.1.1" ` "python=$env:PYTHON_VERSION[build=*cpython]" ` "python-graphviz>=0.20" ` @@ -126,7 +126,7 @@ if (($env:TASK -eq "regular") -or (($env:APPVEYOR -eq "true") -and ($env:TASK -e cd $env:BUILD_SOURCESDIRECTORY/examples/python-guide @("import matplotlib", "matplotlib.use('Agg')") + (Get-Content "plot_example.py") | Set-Content "plot_example.py" (Get-Content "plot_example.py").replace('graph.render(view=True)', 'graph.render(view=False)') | Set-Content "plot_example.py" # prevent interactive window mode - conda install -q -y -n $env:CONDA_ENV "h5py>=3.10" "ipywidgets>=8.1.2" "notebook>=7.1.2" + conda install -y -n $env:CONDA_ENV "h5py>=3.10" "ipywidgets>=8.1.2" "notebook>=7.1.2" foreach ($file in @(Get-ChildItem *.py)) { @("import sys, warnings", "warnings.showwarning = lambda message, category, filename, lineno, file=None, line=None: sys.stdout.write(warnings.formatwarning(message, category, filename, lineno, line))") + (Get-Content $file) | Set-Content $file python $file ; Check-Output $? From 4ae15d6fcd342414fbb539180e6e9c0f6edf8e75 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 20 Mar 2024 16:02:24 -0500 Subject: [PATCH 03/15] looser pyarrow floor --- .ci/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/test.sh b/.ci/test.sh index 9b44d5df5aaa..b705dd983d97 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -144,7 +144,7 @@ mamba create -y -n $CONDA_ENV \ 'matplotlib-base>=3.7.3' \ 'numpy>=1.24.4' \ 'psutil>=5.9.8' \ - 'pyarrow>=15.0' \ + 'pyarrow>=12.0' \ 'pytest>=8.1.1' \ ${CONDA_PYTHON_REQUIREMENT} \ 'scikit-learn>=1.3.2' \ From 5b4685f6cecc955d2bbf12b351c2037ea2b6b553 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 20 Mar 2024 16:24:39 -0500 Subject: [PATCH 04/15] even looser pyarrow --- .ci/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/test.sh b/.ci/test.sh index 33cd9e35fbb6..aa38c242695c 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -75,7 +75,7 @@ if [[ $TASK == "lint" ]]; then 'matplotlib-base>=3.8.3' \ 'mypy>=1.8.0' \ 'pre-commit>=3.6.0' \ - 'pyarrow>=12.0' \ + 'pyarrow>=6.0' \ 'r-lintr>=3.1' source activate $CONDA_ENV echo "Linting Python code" @@ -142,7 +142,7 @@ mamba create -y -n $CONDA_ENV \ 'matplotlib-base>=3.7.3' \ 'numpy>=1.24.4' \ 'psutil>=5.9.8' \ - 'pyarrow>=12.0' \ + 'pyarrow>=6.0' \ 'pytest>=8.1.1' \ ${CONDA_PYTHON_REQUIREMENT} \ 'scikit-learn>=1.3.2' \ From f6a8d9932868a1b366ea08d735215d10001bd717 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 Mar 2024 21:38:07 -0500 Subject: [PATCH 05/15] add environment files --- .ci/conda-envs/README.md | 0 .ci/conda-envs/ci-core-py37.txt | 56 +++++++++++++++++++++++++++++++++ .ci/conda-envs/ci-core.txt | 40 +++++++++++++++++++++++ .ci/test.sh | 31 ++++++------------ .ci/test_windows.ps1 | 25 +++++++-------- 5 files changed, 117 insertions(+), 35 deletions(-) create mode 100644 .ci/conda-envs/README.md create mode 100644 .ci/conda-envs/ci-core-py37.txt create mode 100644 .ci/conda-envs/ci-core.txt diff --git a/.ci/conda-envs/README.md b/.ci/conda-envs/README.md new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/.ci/conda-envs/ci-core-py37.txt b/.ci/conda-envs/ci-core-py37.txt new file mode 100644 index 000000000000..89b765569aa1 --- /dev/null +++ b/.ci/conda-envs/ci-core-py37.txt @@ -0,0 +1,56 @@ +# [description] +# +# Similar to ci-core.txt, but specific to Python 3.7. +# +# Unlike ci-core.txt, this includes a Python version and uses +# `=` and `<=` pins to make solves faster and prevent against +# issues like https://github.com/microsoft/LightGBM/pull/6370. +# +# [usage] +# +# conda create \ +# --name test-env \ +# --file ./.ci/conda-envs/ci-core-py37.txt +# + +# python +python=3.7.12 + +# direct imports +cffi=1.15.* +# older versions of Dask are incompatible with pandas>=2.0, but not all conda packages' metadata accurately reflects that +# +# ref: https://github.com/microsoft/LightGBM/issues/6030 +dask=2022.2.* +distributed=2022.2.* +joblib=1.3.* +matplotlib-base=3.5.* +numpy=1.21.* +pandas=1.3.* +pyarrow=9.0.* +# python-graphviz 0.20.2 is not compatible with Python 3.7 +# ref: https://github.com/microsoft/LightGBM/pull/6370 +python-graphviz=0.20.1 +scikit-learn=1.0.* +scipy=1.7.* + +# testing-only dependencies +cloudpickle=2.2.* +pluggy=1.0.* +psutil=5.9.3 +pytest=7.4.* + +# other recursive dependencies, just +# pinned here to help speed up solves +bokeh=2.4.* +fsspec=2023.1.* +msgpack-python=1.0.* +pluggy=1.0.* +pytz=2024.1 +setuptools=59.8.* +snappy=1.1.* +tomli=2.0.* +tornado=6.1.* +wheel=0.43.* +zict=2.2.* +zipp=3.15.* diff --git a/.ci/conda-envs/ci-core.txt b/.ci/conda-envs/ci-core.txt new file mode 100644 index 000000000000..e1c88244ec28 --- /dev/null +++ b/.ci/conda-envs/ci-core.txt @@ -0,0 +1,40 @@ +# [description] +# +# Core dependencies used across most LightGBM continuous integration (CI) jobs. +# +# 'python' constraint is intentionally omitted, so this file can be reused across +# Python versions. +# +# These floors are not the oldest versions LightGBM supports... they're here just to make conda +# solves faster, and should generally be the latest versions that work for all CI jobs using this. +# +# [usage] +# +# conda create \ +# --name test-env \ +# --file ./.ci/conda-envs/ci-core.txt \ +# python=3.10 +# + +# direct imports +conda-forge::cffi>=1.16 +dask>=2023.5.0 +joblib>=1.3.2 +matplotlib-base>=3.7.3 +numpy>=1.24.4 +pandas>2.0 +pyarrow>=6.0 +python-graphviz>=0.20.3 +scikit-learn>=1.3.2 +scipy>=1.1 + +# testing-only dependencies +cloudpickle>=3.0.0 +psutil>=5.9.8 +pytest>=8.1.1 + +# other recursive dependencies, just +# pinned here to help speed up solves +pluggy>=1.4.0 +setuptools>=69.2 +wheel>=0.43 diff --git a/.ci/test.sh b/.ci/test.sh index aa38c242695c..641c72a291f9 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -36,6 +36,7 @@ if [[ "$TASK" == "cpp-tests" ]]; then exit 0 fi +# including python=version[build=*cpython] to ensure that conda doesn't fall back to pypy CONDA_PYTHON_REQUIREMENT="python=$PYTHON_VERSION[build=*cpython]" if [[ $TASK == "if-else" ]]; then @@ -121,32 +122,18 @@ if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then exit 0 fi -# older versions of Dask are incompatible with pandas>=2.0, but not all conda packages' metadata accurately reflects that -# -# ref: https://github.com/microsoft/LightGBM/issues/6030 -CONSTRAINED_DEPENDENCIES="'dask>=2023.5.0' 'distributed>=2023.5.0' 'pandas>=2.0' 'python-graphviz>=0.20'" if [[ $PYTHON_VERSION == "3.7" ]]; then - CONSTRAINED_DEPENDENCIES="'dask' 'distributed' 'python-graphviz<0.20.2' 'pandas<2.0'" + CONDA_REQUIREMENT_FILES="--file ${BUILD_DIRECTORY}/.ci/conda-envs/ci-core-py37.txt" +else + CONDA_REQUIREMENT_FILES="--file ${BUILD_DIRECTORY}/.ci/conda-envs/ci-core.txt" fi -# notes: -# * including python=version[build=*cpython] to ensure that conda doesn't fall back to pypy -# * these floors are not the oldest versions LightGBM supports... they're here just to make conda -# solves faster, and should generally be the latest versions that work for all CI jobs using -# this script -mamba create -y -n $CONDA_ENV \ - ${CONSTRAINED_DEPENDENCIES} \ - 'cffi>=1.16' \ - 'cloudpickle>=3.0.0' \ - 'joblib>=1.3.2' \ - 'matplotlib-base>=3.7.3' \ - 'numpy>=1.24.4' \ - 'psutil>=5.9.8' \ - 'pyarrow>=6.0' \ - 'pytest>=8.1.1' \ +mamba create \ + -y \ + -n $CONDA_ENV \ + ${CONDA_REQUIREMENT_FILES} \ ${CONDA_PYTHON_REQUIREMENT} \ - 'scikit-learn>=1.3.2' \ - 'scipy>=1.10' || exit 1 +|| exit 1 source activate $CONDA_ENV diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 0ff1ff9c2d88..7ff7d75b8733 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -49,20 +49,19 @@ conda config --set always_yes yes --set changeps1 no conda install "brotlipy>=0.7" conda update -q -y conda -conda create -y -n $env:CONDA_ENV ` - "cffi>=1.16" ` - "cloudpickle>=3.0" ` - "joblib>=1.3.2" ` - "matplotlib-base>=3.7.3" ` - "numpy>=1.24.4" ` - "pandas>=1.5" ` - "psutil>=5.9.8" ` - "pyarrow>=12.0" ` - "pytest>=8.1.1" ` + +if ($env:PYTHON_VERSION -eq "3.7") { + $env:CONDA_REQUIREMENT_FILES = "--file $env:BUILD_SOURCESDIRECTORY/.ci/ci-core-py37.txt" +} else { + $env:CONDA_REQUIREMENT_FILES = "--file $env:BUILD_SOURCESDIRECTORY/.ci/ci-core.txt" +} + +conda create ` + -y + -n $env:CONDA_ENV ` + $env:CONDA_REQUIREMENT_FILES ` "python=$env:PYTHON_VERSION[build=*cpython]" ` - "python-graphviz>=0.20" ` - "scikit-learn>=1.3.2" ` - "scipy>=1.10" ; Check-Output $? +; Check-Output $? if ($env:TASK -ne "bdist") { conda activate $env:CONDA_ENV From 5828e0dbc4b496428d58e9007fc42ac3e015cf0a Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 Mar 2024 21:51:23 -0500 Subject: [PATCH 06/15] missed backtick --- .ci/test_windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 7ff7d75b8733..1a6c23089891 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -57,7 +57,7 @@ if ($env:PYTHON_VERSION -eq "3.7") { } conda create ` - -y + -y ` -n $env:CONDA_ENV ` $env:CONDA_REQUIREMENT_FILES ` "python=$env:PYTHON_VERSION[build=*cpython]" ` From 30909e9f6172292bfa9675cdc349d058430c7e35 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 Mar 2024 22:04:29 -0500 Subject: [PATCH 07/15] more powershell --- .ci/test_windows.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 1a6c23089891..50cddf11128f 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -51,17 +51,16 @@ conda install "brotlipy>=0.7" conda update -q -y conda if ($env:PYTHON_VERSION -eq "3.7") { - $env:CONDA_REQUIREMENT_FILES = "--file $env:BUILD_SOURCESDIRECTORY/.ci/ci-core-py37.txt" + $env:CONDA_REQUIREMENT_FILES = "--file $env:BUILD_SOURCESDIRECTORY/.ci/conda-envs/ci-core-py37.txt" } else { - $env:CONDA_REQUIREMENT_FILES = "--file $env:BUILD_SOURCESDIRECTORY/.ci/ci-core.txt" + $env:CONDA_REQUIREMENT_FILES = "--file $env:BUILD_SOURCESDIRECTORY/.ci/conda-envs/ci-core.txt" } conda create ` -y ` -n $env:CONDA_ENV ` $env:CONDA_REQUIREMENT_FILES ` - "python=$env:PYTHON_VERSION[build=*cpython]" ` -; Check-Output $? + "python=$env:PYTHON_VERSION[build=*cpython]" ; Check-Output $? if ($env:TASK -ne "bdist") { conda activate $env:CONDA_ENV From 620daaab4649eba3f9838a2112a24adb45091907 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 Mar 2024 22:36:18 -0500 Subject: [PATCH 08/15] how does powershell work --- .ci/test_windows.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 50cddf11128f..61ef1ae0f2a1 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -51,15 +51,15 @@ conda install "brotlipy>=0.7" conda update -q -y conda if ($env:PYTHON_VERSION -eq "3.7") { - $env:CONDA_REQUIREMENT_FILES = "--file $env:BUILD_SOURCESDIRECTORY/.ci/conda-envs/ci-core-py37.txt" + $env:CONDA_REQUIREMENT_FILE = "$env:BUILD_SOURCESDIRECTORY/.ci/conda-envs/ci-core-py37.txt" } else { - $env:CONDA_REQUIREMENT_FILES = "--file $env:BUILD_SOURCESDIRECTORY/.ci/conda-envs/ci-core.txt" + $env:CONDA_REQUIREMENT_FILE = "$env:BUILD_SOURCESDIRECTORY/.ci/conda-envs/ci-core.txt" } conda create ` -y ` -n $env:CONDA_ENV ` - $env:CONDA_REQUIREMENT_FILES ` + --file $env:CONDA_REQUIREMENT_FILE ` "python=$env:PYTHON_VERSION[build=*cpython]" ; Check-Output $? if ($env:TASK -ne "bdist") { From 2d45f71361700f2bd40063db14adf8cc57e61db5 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 Mar 2024 22:48:44 -0500 Subject: [PATCH 09/15] remove channel specifier --- .ci/conda-envs/ci-core.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/conda-envs/ci-core.txt b/.ci/conda-envs/ci-core.txt index e1c88244ec28..ef04e4df2b3a 100644 --- a/.ci/conda-envs/ci-core.txt +++ b/.ci/conda-envs/ci-core.txt @@ -17,7 +17,7 @@ # # direct imports -conda-forge::cffi>=1.16 +cffi>=1.16 dask>=2023.5.0 joblib>=1.3.2 matplotlib-base>=3.7.3 From 9d1da9af21c1fc44a737b31bd8becd7accb78470 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Thu, 21 Mar 2024 23:45:29 -0500 Subject: [PATCH 10/15] add README --- .ci/conda-envs/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.ci/conda-envs/README.md b/.ci/conda-envs/README.md index e69de29bb2d1..4666f96fe954 100644 --- a/.ci/conda-envs/README.md +++ b/.ci/conda-envs/README.md @@ -0,0 +1,11 @@ +# conda-envs + +This directory contains files used to create `conda` environments for development +and testing of LightGBM. + +The `.txt` files here are intended to be used with `conda create --file`. + +For details on that, see the `conda` docs: + +* `conda create` docs ([link](https://conda.io/projects/conda/en/latest/commands/create.html)) +* "Managing Environments" ([link](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)) From 730247d3a44c3ff417b223669367c1d2ef1e5481 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 14 Apr 2024 22:56:26 -0500 Subject: [PATCH 11/15] use bash task type --- .vsts-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index bfb17ddeedcb..f906613e47e0 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -68,8 +68,10 @@ jobs: - script: | echo '$(Build.SourceVersion)' > '$(Build.ArtifactStagingDirectory)/commit.txt' displayName: 'Add commit hash to artifacts archive' - - bash: $(Build.SourcesDirectory)/.ci/setup.sh + - task: Bash@3 displayName: Setup + inputs: + fileType: $(Build.SourcesDirectory)/.ci/setup.sh - bash: $(Build.SourcesDirectory)/.ci/test.sh displayName: Test - task: PublishBuildArtifacts@1 From ff7fb3b89567c9d4979c998c5dcd49280788afd4 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 14 Apr 2024 23:00:30 -0500 Subject: [PATCH 12/15] filePath not fileType --- .vsts-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index f906613e47e0..8d54321c5518 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -71,7 +71,7 @@ jobs: - task: Bash@3 displayName: Setup inputs: - fileType: $(Build.SourcesDirectory)/.ci/setup.sh + filePath: $(Build.SourcesDirectory)/.ci/setup.sh - bash: $(Build.SourcesDirectory)/.ci/test.sh displayName: Test - task: PublishBuildArtifacts@1 From 95fff254fbcba74a3517834095cfbd1ccbe4f1b5 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 14 Apr 2024 23:03:02 -0500 Subject: [PATCH 13/15] Revert "filePath not fileType" This reverts commit ff7fb3b89567c9d4979c998c5dcd49280788afd4. --- .vsts-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 8d54321c5518..f906613e47e0 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -71,7 +71,7 @@ jobs: - task: Bash@3 displayName: Setup inputs: - filePath: $(Build.SourcesDirectory)/.ci/setup.sh + fileType: $(Build.SourcesDirectory)/.ci/setup.sh - bash: $(Build.SourcesDirectory)/.ci/test.sh displayName: Test - task: PublishBuildArtifacts@1 From bfcf254dce408be13cef026ee75896ef0ff8a6d1 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 14 Apr 2024 23:03:10 -0500 Subject: [PATCH 14/15] Revert "use bash task type" This reverts commit 730247d3a44c3ff417b223669367c1d2ef1e5481. --- .vsts-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.vsts-ci.yml b/.vsts-ci.yml index f906613e47e0..bfb17ddeedcb 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -68,10 +68,8 @@ jobs: - script: | echo '$(Build.SourceVersion)' > '$(Build.ArtifactStagingDirectory)/commit.txt' displayName: 'Add commit hash to artifacts archive' - - task: Bash@3 + - bash: $(Build.SourcesDirectory)/.ci/setup.sh displayName: Setup - inputs: - fileType: $(Build.SourcesDirectory)/.ci/setup.sh - bash: $(Build.SourcesDirectory)/.ci/test.sh displayName: Test - task: PublishBuildArtifacts@1 From fc9679c61f8c93ae88d42fd065153b4b4b3e0b1c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 22 Apr 2024 22:33:30 -0500 Subject: [PATCH 15/15] older wheel, less strict Python 3.7 --- .ci/conda-envs/ci-core-py37.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/conda-envs/ci-core-py37.txt b/.ci/conda-envs/ci-core-py37.txt index 89b765569aa1..b38a06a5a5c5 100644 --- a/.ci/conda-envs/ci-core-py37.txt +++ b/.ci/conda-envs/ci-core-py37.txt @@ -14,7 +14,7 @@ # # python -python=3.7.12 +python=3.7.* # direct imports cffi=1.15.* @@ -51,6 +51,6 @@ setuptools=59.8.* snappy=1.1.* tomli=2.0.* tornado=6.1.* -wheel=0.43.* +wheel=0.42.* zict=2.2.* zipp=3.15.*