From d3ee54e5f809cadd5416d93acca5214c0dc856ad Mon Sep 17 00:00:00 2001 From: Thomas S Date: Mon, 27 Jan 2025 17:59:28 +0100 Subject: [PATCH 01/14] [skip ci] ci: Use lockfiles to ensure cached venv are always up-to-date --- .../scikit-learn-1.6-test-requirements.txt | 241 +++++++++++++++++ .../scikit-learn-1.6-test-requirements.txt | 231 ++++++++++++++++ .../scikit-learn-1.4-test-requirements.txt | 231 ++++++++++++++++ .../scikit-learn-1.5-test-requirements.txt | 231 ++++++++++++++++ .../scikit-learn-1.6-test-requirements.txt | 231 ++++++++++++++++ .../scikit-learn-1.6-test-requirements.txt | 250 ++++++++++++++++++ skore/hatch/metadata.py | 31 ++- skore/pyproject.toml | 61 +---- skore/requirements.in | 13 + skore/sphinx-requirements.in | 14 + skore/test-requirements.in | 14 + 11 files changed, 1496 insertions(+), 52 deletions(-) create mode 100644 skore/ci/requirements/python-3.10/scikit-learn-1.6-test-requirements.txt create mode 100644 skore/ci/requirements/python-3.11/scikit-learn-1.6-test-requirements.txt create mode 100644 skore/ci/requirements/python-3.12/scikit-learn-1.4-test-requirements.txt create mode 100644 skore/ci/requirements/python-3.12/scikit-learn-1.5-test-requirements.txt create mode 100644 skore/ci/requirements/python-3.12/scikit-learn-1.6-test-requirements.txt create mode 100644 skore/ci/requirements/python-3.9/scikit-learn-1.6-test-requirements.txt create mode 100644 skore/requirements.in create mode 100644 skore/sphinx-requirements.in create mode 100644 skore/test-requirements.in diff --git a/skore/ci/requirements/python-3.10/scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.10/scikit-learn-1.6-test-requirements.txt new file mode 100644 index 000000000..d79ab31c6 --- /dev/null +++ b/skore/ci/requirements/python-3.10/scikit-learn-1.6-test-requirements.txt @@ -0,0 +1,241 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --extra=test --output-file=ci/requirements/python-3.10/scikit-learn-1.6-test-requirements.txt pyproject.toml +# +altair==5.5.0 + # via skore (pyproject.toml) +annotated-types==0.7.0 + # via pydantic +anyio==4.8.0 + # via + # httpx + # starlette +attrs==25.1.0 + # via + # jsonschema + # referencing +certifi==2024.12.14 + # via + # httpcore + # httpx + # requests +cfgv==3.4.0 + # via pre-commit +charset-normalizer==3.4.1 + # via requests +click==8.1.8 + # via uvicorn +contourpy==1.3.1 + # via matplotlib +coverage[toml]==7.6.10 + # via pytest-cov +cycler==0.12.1 + # via matplotlib +diskcache==5.6.3 + # via skore (pyproject.toml) +distlib==0.3.9 + # via virtualenv +exceptiongroup==1.2.2 + # via + # anyio + # pytest +execnet==2.1.1 + # via pytest-xdist +fastapi==0.115.7 + # via skore (pyproject.toml) +filelock==3.17.0 + # via + # huggingface-hub + # virtualenv +fonttools==4.55.6 + # via matplotlib +fsspec==2024.12.0 + # via huggingface-hub +h11==0.14.0 + # via + # httpcore + # uvicorn +httpcore==1.0.7 + # via httpx +httpx==0.28.1 + # via skore (pyproject.toml) +huggingface-hub==0.27.1 + # via skops +identify==2.6.6 + # via pre-commit +idna==3.10 + # via + # anyio + # httpx + # requests +iniconfig==2.0.0 + # via pytest +jinja2==3.1.5 + # via + # altair + # skrub +joblib==1.4.2 + # via + # scikit-learn + # skore (pyproject.toml) +jsonschema==4.23.0 + # via altair +jsonschema-specifications==2024.10.1 + # via jsonschema +kiwisolver==1.4.8 + # via matplotlib +markdown-it-py==3.0.0 + # via rich +markupsafe==3.0.2 + # via jinja2 +matplotlib==3.10.0 + # via + # skore (pyproject.toml) + # skrub +mdurl==0.1.2 + # via markdown-it-py +narwhals==1.24.0 + # via altair +nodeenv==1.9.1 + # via pre-commit +numpy==2.2.2 + # via + # contourpy + # matplotlib + # pandas + # scikit-learn + # scipy + # skore (pyproject.toml) + # skrub +orjson==3.10.15 + # via skore (pyproject.toml) +packaging==24.2 + # via + # altair + # huggingface-hub + # matplotlib + # plotly + # pytest + # skops + # skrub +pandas==2.2.3 + # via + # skore (pyproject.toml) + # skrub +pillow==11.1.0 + # via + # matplotlib + # skore (pyproject.toml) +platformdirs==4.3.6 + # via virtualenv +plotly==5.24.1 + # via skore (pyproject.toml) +pluggy==1.5.0 + # via pytest +polars==1.21.0 + # via skore (pyproject.toml) +pre-commit==4.1.0 + # via skore (pyproject.toml) +pyarrow==19.0.0 + # via skore (pyproject.toml) +pydantic==2.10.6 + # via fastapi +pydantic-core==2.27.2 + # via pydantic +pygments==2.19.1 + # via rich +pyparsing==3.2.1 + # via matplotlib +pytest==8.3.4 + # via + # pytest-cov + # pytest-order + # pytest-randomly + # pytest-xdist + # skore (pyproject.toml) +pytest-cov==6.0.0 + # via skore (pyproject.toml) +pytest-order==1.3.0 + # via skore (pyproject.toml) +pytest-randomly==3.16.0 + # via skore (pyproject.toml) +pytest-xdist==3.6.1 + # via skore (pyproject.toml) +python-dateutil==2.9.0.post0 + # via + # matplotlib + # pandas +pytz==2024.2 + # via pandas +pyyaml==6.0.2 + # via + # huggingface-hub + # pre-commit +referencing==0.36.2 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 + # via + # huggingface-hub + # skrub +rich==13.9.4 + # via skore (pyproject.toml) +rpds-py==0.22.3 + # via + # jsonschema + # referencing +ruff==0.9.3 + # via skore (pyproject.toml) +scikit-learn==1.6.1 + # via + # skops + # skore (pyproject.toml) + # skrub +scipy==1.15.1 + # via + # scikit-learn + # skrub +six==1.17.0 + # via python-dateutil +skops==0.11.0 + # via skore (pyproject.toml) +skrub==0.5.1 + # via skore (pyproject.toml) +sniffio==1.3.1 + # via anyio +starlette==0.45.3 + # via fastapi +tabulate==0.9.0 + # via skops +tenacity==9.0.0 + # via plotly +threadpoolctl==3.5.0 + # via scikit-learn +tomli==2.2.1 + # via + # coverage + # pytest +tqdm==4.67.1 + # via huggingface-hub +typing-extensions==4.12.2 + # via + # altair + # anyio + # fastapi + # huggingface-hub + # pydantic + # pydantic-core + # referencing + # rich + # uvicorn +tzdata==2025.1 + # via pandas +urllib3==2.3.0 + # via requests +uvicorn==0.34.0 + # via skore (pyproject.toml) +virtualenv==20.29.1 + # via pre-commit diff --git a/skore/ci/requirements/python-3.11/scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.11/scikit-learn-1.6-test-requirements.txt new file mode 100644 index 000000000..8015dc146 --- /dev/null +++ b/skore/ci/requirements/python-3.11/scikit-learn-1.6-test-requirements.txt @@ -0,0 +1,231 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --extra=test --output-file=ci/requirements/python-3.11/scikit-learn-1.6-test-requirements.txt pyproject.toml +# +altair==5.5.0 + # via skore (pyproject.toml) +annotated-types==0.7.0 + # via pydantic +anyio==4.8.0 + # via + # httpx + # starlette +attrs==25.1.0 + # via + # jsonschema + # referencing +certifi==2024.12.14 + # via + # httpcore + # httpx + # requests +cfgv==3.4.0 + # via pre-commit +charset-normalizer==3.4.1 + # via requests +click==8.1.8 + # via uvicorn +contourpy==1.3.1 + # via matplotlib +coverage[toml]==7.6.10 + # via pytest-cov +cycler==0.12.1 + # via matplotlib +diskcache==5.6.3 + # via skore (pyproject.toml) +distlib==0.3.9 + # via virtualenv +execnet==2.1.1 + # via pytest-xdist +fastapi==0.115.7 + # via skore (pyproject.toml) +filelock==3.17.0 + # via + # huggingface-hub + # virtualenv +fonttools==4.55.6 + # via matplotlib +fsspec==2024.12.0 + # via huggingface-hub +h11==0.14.0 + # via + # httpcore + # uvicorn +httpcore==1.0.7 + # via httpx +httpx==0.28.1 + # via skore (pyproject.toml) +huggingface-hub==0.27.1 + # via skops +identify==2.6.6 + # via pre-commit +idna==3.10 + # via + # anyio + # httpx + # requests +iniconfig==2.0.0 + # via pytest +jinja2==3.1.5 + # via + # altair + # skrub +joblib==1.4.2 + # via + # scikit-learn + # skore (pyproject.toml) +jsonschema==4.23.0 + # via altair +jsonschema-specifications==2024.10.1 + # via jsonschema +kiwisolver==1.4.8 + # via matplotlib +markdown-it-py==3.0.0 + # via rich +markupsafe==3.0.2 + # via jinja2 +matplotlib==3.10.0 + # via + # skore (pyproject.toml) + # skrub +mdurl==0.1.2 + # via markdown-it-py +narwhals==1.24.0 + # via altair +nodeenv==1.9.1 + # via pre-commit +numpy==2.2.2 + # via + # contourpy + # matplotlib + # pandas + # scikit-learn + # scipy + # skore (pyproject.toml) + # skrub +orjson==3.10.15 + # via skore (pyproject.toml) +packaging==24.2 + # via + # altair + # huggingface-hub + # matplotlib + # plotly + # pytest + # skops + # skrub +pandas==2.2.3 + # via + # skore (pyproject.toml) + # skrub +pillow==11.1.0 + # via + # matplotlib + # skore (pyproject.toml) +platformdirs==4.3.6 + # via virtualenv +plotly==5.24.1 + # via skore (pyproject.toml) +pluggy==1.5.0 + # via pytest +polars==1.21.0 + # via skore (pyproject.toml) +pre-commit==4.1.0 + # via skore (pyproject.toml) +pyarrow==19.0.0 + # via skore (pyproject.toml) +pydantic==2.10.6 + # via fastapi +pydantic-core==2.27.2 + # via pydantic +pygments==2.19.1 + # via rich +pyparsing==3.2.1 + # via matplotlib +pytest==8.3.4 + # via + # pytest-cov + # pytest-order + # pytest-randomly + # pytest-xdist + # skore (pyproject.toml) +pytest-cov==6.0.0 + # via skore (pyproject.toml) +pytest-order==1.3.0 + # via skore (pyproject.toml) +pytest-randomly==3.16.0 + # via skore (pyproject.toml) +pytest-xdist==3.6.1 + # via skore (pyproject.toml) +python-dateutil==2.9.0.post0 + # via + # matplotlib + # pandas +pytz==2024.2 + # via pandas +pyyaml==6.0.2 + # via + # huggingface-hub + # pre-commit +referencing==0.36.2 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 + # via + # huggingface-hub + # skrub +rich==13.9.4 + # via skore (pyproject.toml) +rpds-py==0.22.3 + # via + # jsonschema + # referencing +ruff==0.9.3 + # via skore (pyproject.toml) +scikit-learn==1.6.1 + # via + # skops + # skore (pyproject.toml) + # skrub +scipy==1.15.1 + # via + # scikit-learn + # skrub +six==1.17.0 + # via python-dateutil +skops==0.11.0 + # via skore (pyproject.toml) +skrub==0.5.1 + # via skore (pyproject.toml) +sniffio==1.3.1 + # via anyio +starlette==0.45.3 + # via fastapi +tabulate==0.9.0 + # via skops +tenacity==9.0.0 + # via plotly +threadpoolctl==3.5.0 + # via scikit-learn +tqdm==4.67.1 + # via huggingface-hub +typing-extensions==4.12.2 + # via + # altair + # anyio + # fastapi + # huggingface-hub + # pydantic + # pydantic-core + # referencing +tzdata==2025.1 + # via pandas +urllib3==2.3.0 + # via requests +uvicorn==0.34.0 + # via skore (pyproject.toml) +virtualenv==20.29.1 + # via pre-commit diff --git a/skore/ci/requirements/python-3.12/scikit-learn-1.4-test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.4-test-requirements.txt new file mode 100644 index 000000000..6e4007782 --- /dev/null +++ b/skore/ci/requirements/python-3.12/scikit-learn-1.4-test-requirements.txt @@ -0,0 +1,231 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --extra=test --output-file=ci/requirements/python-3.12/scikit-learn-1.4-test-requirements.txt pyproject.toml +# +altair==5.5.0 + # via skore (pyproject.toml) +annotated-types==0.7.0 + # via pydantic +anyio==4.8.0 + # via + # httpx + # starlette +attrs==25.1.0 + # via + # jsonschema + # referencing +certifi==2024.12.14 + # via + # httpcore + # httpx + # requests +cfgv==3.4.0 + # via pre-commit +charset-normalizer==3.4.1 + # via requests +click==8.1.8 + # via uvicorn +contourpy==1.3.1 + # via matplotlib +coverage[toml]==7.6.10 + # via pytest-cov +cycler==0.12.1 + # via matplotlib +diskcache==5.6.3 + # via skore (pyproject.toml) +distlib==0.3.9 + # via virtualenv +execnet==2.1.1 + # via pytest-xdist +fastapi==0.115.7 + # via skore (pyproject.toml) +filelock==3.17.0 + # via + # huggingface-hub + # virtualenv +fonttools==4.55.6 + # via matplotlib +fsspec==2024.12.0 + # via huggingface-hub +h11==0.14.0 + # via + # httpcore + # uvicorn +httpcore==1.0.7 + # via httpx +httpx==0.28.1 + # via skore (pyproject.toml) +huggingface-hub==0.27.1 + # via skops +identify==2.6.6 + # via pre-commit +idna==3.10 + # via + # anyio + # httpx + # requests +iniconfig==2.0.0 + # via pytest +jinja2==3.1.5 + # via + # altair + # skrub +joblib==1.4.2 + # via + # scikit-learn + # skore (pyproject.toml) +jsonschema==4.23.0 + # via altair +jsonschema-specifications==2024.10.1 + # via jsonschema +kiwisolver==1.4.8 + # via matplotlib +markdown-it-py==3.0.0 + # via rich +markupsafe==3.0.2 + # via jinja2 +matplotlib==3.10.0 + # via + # skore (pyproject.toml) + # skrub +mdurl==0.1.2 + # via markdown-it-py +narwhals==1.24.0 + # via altair +nodeenv==1.9.1 + # via pre-commit +numpy==2.2.2 + # via + # contourpy + # matplotlib + # pandas + # scikit-learn + # scipy + # skore (pyproject.toml) + # skrub +orjson==3.10.15 + # via skore (pyproject.toml) +packaging==24.2 + # via + # altair + # huggingface-hub + # matplotlib + # plotly + # pytest + # skops + # skrub +pandas==2.2.3 + # via + # skore (pyproject.toml) + # skrub +pillow==11.1.0 + # via + # matplotlib + # skore (pyproject.toml) +platformdirs==4.3.6 + # via virtualenv +plotly==5.24.1 + # via skore (pyproject.toml) +pluggy==1.5.0 + # via pytest +polars==1.21.0 + # via skore (pyproject.toml) +pre-commit==4.1.0 + # via skore (pyproject.toml) +pyarrow==19.0.0 + # via skore (pyproject.toml) +pydantic==2.10.6 + # via fastapi +pydantic-core==2.27.2 + # via pydantic +pygments==2.19.1 + # via rich +pyparsing==3.2.1 + # via matplotlib +pytest==8.3.4 + # via + # pytest-cov + # pytest-order + # pytest-randomly + # pytest-xdist + # skore (pyproject.toml) +pytest-cov==6.0.0 + # via skore (pyproject.toml) +pytest-order==1.3.0 + # via skore (pyproject.toml) +pytest-randomly==3.16.0 + # via skore (pyproject.toml) +pytest-xdist==3.6.1 + # via skore (pyproject.toml) +python-dateutil==2.9.0.post0 + # via + # matplotlib + # pandas +pytz==2024.2 + # via pandas +pyyaml==6.0.2 + # via + # huggingface-hub + # pre-commit +referencing==0.36.2 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 + # via + # huggingface-hub + # skrub +rich==13.9.4 + # via skore (pyproject.toml) +rpds-py==0.22.3 + # via + # jsonschema + # referencing +ruff==0.9.3 + # via skore (pyproject.toml) +scikit-learn==1.4.2 + # via + # skops + # skore (pyproject.toml) + # skrub +scipy==1.15.1 + # via + # scikit-learn + # skrub +six==1.17.0 + # via python-dateutil +skops==0.11.0 + # via skore (pyproject.toml) +skrub==0.5.1 + # via skore (pyproject.toml) +sniffio==1.3.1 + # via anyio +starlette==0.45.3 + # via fastapi +tabulate==0.9.0 + # via skops +tenacity==9.0.0 + # via plotly +threadpoolctl==3.5.0 + # via scikit-learn +tqdm==4.67.1 + # via huggingface-hub +typing-extensions==4.12.2 + # via + # altair + # anyio + # fastapi + # huggingface-hub + # pydantic + # pydantic-core + # referencing +tzdata==2025.1 + # via pandas +urllib3==2.3.0 + # via requests +uvicorn==0.34.0 + # via skore (pyproject.toml) +virtualenv==20.29.1 + # via pre-commit diff --git a/skore/ci/requirements/python-3.12/scikit-learn-1.5-test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.5-test-requirements.txt new file mode 100644 index 000000000..157abbfa6 --- /dev/null +++ b/skore/ci/requirements/python-3.12/scikit-learn-1.5-test-requirements.txt @@ -0,0 +1,231 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --extra=test --output-file=ci/requirements/python-3.12/scikit-learn-1.5-test-requirements.txt pyproject.toml +# +altair==5.5.0 + # via skore (pyproject.toml) +annotated-types==0.7.0 + # via pydantic +anyio==4.8.0 + # via + # httpx + # starlette +attrs==25.1.0 + # via + # jsonschema + # referencing +certifi==2024.12.14 + # via + # httpcore + # httpx + # requests +cfgv==3.4.0 + # via pre-commit +charset-normalizer==3.4.1 + # via requests +click==8.1.8 + # via uvicorn +contourpy==1.3.1 + # via matplotlib +coverage[toml]==7.6.10 + # via pytest-cov +cycler==0.12.1 + # via matplotlib +diskcache==5.6.3 + # via skore (pyproject.toml) +distlib==0.3.9 + # via virtualenv +execnet==2.1.1 + # via pytest-xdist +fastapi==0.115.7 + # via skore (pyproject.toml) +filelock==3.17.0 + # via + # huggingface-hub + # virtualenv +fonttools==4.55.6 + # via matplotlib +fsspec==2024.12.0 + # via huggingface-hub +h11==0.14.0 + # via + # httpcore + # uvicorn +httpcore==1.0.7 + # via httpx +httpx==0.28.1 + # via skore (pyproject.toml) +huggingface-hub==0.27.1 + # via skops +identify==2.6.6 + # via pre-commit +idna==3.10 + # via + # anyio + # httpx + # requests +iniconfig==2.0.0 + # via pytest +jinja2==3.1.5 + # via + # altair + # skrub +joblib==1.4.2 + # via + # scikit-learn + # skore (pyproject.toml) +jsonschema==4.23.0 + # via altair +jsonschema-specifications==2024.10.1 + # via jsonschema +kiwisolver==1.4.8 + # via matplotlib +markdown-it-py==3.0.0 + # via rich +markupsafe==3.0.2 + # via jinja2 +matplotlib==3.10.0 + # via + # skore (pyproject.toml) + # skrub +mdurl==0.1.2 + # via markdown-it-py +narwhals==1.24.0 + # via altair +nodeenv==1.9.1 + # via pre-commit +numpy==2.2.2 + # via + # contourpy + # matplotlib + # pandas + # scikit-learn + # scipy + # skore (pyproject.toml) + # skrub +orjson==3.10.15 + # via skore (pyproject.toml) +packaging==24.2 + # via + # altair + # huggingface-hub + # matplotlib + # plotly + # pytest + # skops + # skrub +pandas==2.2.3 + # via + # skore (pyproject.toml) + # skrub +pillow==11.1.0 + # via + # matplotlib + # skore (pyproject.toml) +platformdirs==4.3.6 + # via virtualenv +plotly==5.24.1 + # via skore (pyproject.toml) +pluggy==1.5.0 + # via pytest +polars==1.21.0 + # via skore (pyproject.toml) +pre-commit==4.1.0 + # via skore (pyproject.toml) +pyarrow==19.0.0 + # via skore (pyproject.toml) +pydantic==2.10.6 + # via fastapi +pydantic-core==2.27.2 + # via pydantic +pygments==2.19.1 + # via rich +pyparsing==3.2.1 + # via matplotlib +pytest==8.3.4 + # via + # pytest-cov + # pytest-order + # pytest-randomly + # pytest-xdist + # skore (pyproject.toml) +pytest-cov==6.0.0 + # via skore (pyproject.toml) +pytest-order==1.3.0 + # via skore (pyproject.toml) +pytest-randomly==3.16.0 + # via skore (pyproject.toml) +pytest-xdist==3.6.1 + # via skore (pyproject.toml) +python-dateutil==2.9.0.post0 + # via + # matplotlib + # pandas +pytz==2024.2 + # via pandas +pyyaml==6.0.2 + # via + # huggingface-hub + # pre-commit +referencing==0.36.2 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 + # via + # huggingface-hub + # skrub +rich==13.9.4 + # via skore (pyproject.toml) +rpds-py==0.22.3 + # via + # jsonschema + # referencing +ruff==0.9.3 + # via skore (pyproject.toml) +scikit-learn==1.5.2 + # via + # skops + # skore (pyproject.toml) + # skrub +scipy==1.15.1 + # via + # scikit-learn + # skrub +six==1.17.0 + # via python-dateutil +skops==0.11.0 + # via skore (pyproject.toml) +skrub==0.5.1 + # via skore (pyproject.toml) +sniffio==1.3.1 + # via anyio +starlette==0.45.3 + # via fastapi +tabulate==0.9.0 + # via skops +tenacity==9.0.0 + # via plotly +threadpoolctl==3.5.0 + # via scikit-learn +tqdm==4.67.1 + # via huggingface-hub +typing-extensions==4.12.2 + # via + # altair + # anyio + # fastapi + # huggingface-hub + # pydantic + # pydantic-core + # referencing +tzdata==2025.1 + # via pandas +urllib3==2.3.0 + # via requests +uvicorn==0.34.0 + # via skore (pyproject.toml) +virtualenv==20.29.1 + # via pre-commit diff --git a/skore/ci/requirements/python-3.12/scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.6-test-requirements.txt new file mode 100644 index 000000000..6a0608213 --- /dev/null +++ b/skore/ci/requirements/python-3.12/scikit-learn-1.6-test-requirements.txt @@ -0,0 +1,231 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --extra=test --output-file=ci/requirements/python-3.12/scikit-learn-1.6-test-requirements.txt pyproject.toml +# +altair==5.5.0 + # via skore (pyproject.toml) +annotated-types==0.7.0 + # via pydantic +anyio==4.8.0 + # via + # httpx + # starlette +attrs==25.1.0 + # via + # jsonschema + # referencing +certifi==2024.12.14 + # via + # httpcore + # httpx + # requests +cfgv==3.4.0 + # via pre-commit +charset-normalizer==3.4.1 + # via requests +click==8.1.8 + # via uvicorn +contourpy==1.3.1 + # via matplotlib +coverage[toml]==7.6.10 + # via pytest-cov +cycler==0.12.1 + # via matplotlib +diskcache==5.6.3 + # via skore (pyproject.toml) +distlib==0.3.9 + # via virtualenv +execnet==2.1.1 + # via pytest-xdist +fastapi==0.115.7 + # via skore (pyproject.toml) +filelock==3.17.0 + # via + # huggingface-hub + # virtualenv +fonttools==4.55.6 + # via matplotlib +fsspec==2024.12.0 + # via huggingface-hub +h11==0.14.0 + # via + # httpcore + # uvicorn +httpcore==1.0.7 + # via httpx +httpx==0.28.1 + # via skore (pyproject.toml) +huggingface-hub==0.27.1 + # via skops +identify==2.6.6 + # via pre-commit +idna==3.10 + # via + # anyio + # httpx + # requests +iniconfig==2.0.0 + # via pytest +jinja2==3.1.5 + # via + # altair + # skrub +joblib==1.4.2 + # via + # scikit-learn + # skore (pyproject.toml) +jsonschema==4.23.0 + # via altair +jsonschema-specifications==2024.10.1 + # via jsonschema +kiwisolver==1.4.8 + # via matplotlib +markdown-it-py==3.0.0 + # via rich +markupsafe==3.0.2 + # via jinja2 +matplotlib==3.10.0 + # via + # skore (pyproject.toml) + # skrub +mdurl==0.1.2 + # via markdown-it-py +narwhals==1.24.0 + # via altair +nodeenv==1.9.1 + # via pre-commit +numpy==2.2.2 + # via + # contourpy + # matplotlib + # pandas + # scikit-learn + # scipy + # skore (pyproject.toml) + # skrub +orjson==3.10.15 + # via skore (pyproject.toml) +packaging==24.2 + # via + # altair + # huggingface-hub + # matplotlib + # plotly + # pytest + # skops + # skrub +pandas==2.2.3 + # via + # skore (pyproject.toml) + # skrub +pillow==11.1.0 + # via + # matplotlib + # skore (pyproject.toml) +platformdirs==4.3.6 + # via virtualenv +plotly==5.24.1 + # via skore (pyproject.toml) +pluggy==1.5.0 + # via pytest +polars==1.21.0 + # via skore (pyproject.toml) +pre-commit==4.1.0 + # via skore (pyproject.toml) +pyarrow==19.0.0 + # via skore (pyproject.toml) +pydantic==2.10.6 + # via fastapi +pydantic-core==2.27.2 + # via pydantic +pygments==2.19.1 + # via rich +pyparsing==3.2.1 + # via matplotlib +pytest==8.3.4 + # via + # pytest-cov + # pytest-order + # pytest-randomly + # pytest-xdist + # skore (pyproject.toml) +pytest-cov==6.0.0 + # via skore (pyproject.toml) +pytest-order==1.3.0 + # via skore (pyproject.toml) +pytest-randomly==3.16.0 + # via skore (pyproject.toml) +pytest-xdist==3.6.1 + # via skore (pyproject.toml) +python-dateutil==2.9.0.post0 + # via + # matplotlib + # pandas +pytz==2024.2 + # via pandas +pyyaml==6.0.2 + # via + # huggingface-hub + # pre-commit +referencing==0.36.2 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 + # via + # huggingface-hub + # skrub +rich==13.9.4 + # via skore (pyproject.toml) +rpds-py==0.22.3 + # via + # jsonschema + # referencing +ruff==0.9.3 + # via skore (pyproject.toml) +scikit-learn==1.6.1 + # via + # skops + # skore (pyproject.toml) + # skrub +scipy==1.15.1 + # via + # scikit-learn + # skrub +six==1.17.0 + # via python-dateutil +skops==0.11.0 + # via skore (pyproject.toml) +skrub==0.5.1 + # via skore (pyproject.toml) +sniffio==1.3.1 + # via anyio +starlette==0.45.3 + # via fastapi +tabulate==0.9.0 + # via skops +tenacity==9.0.0 + # via plotly +threadpoolctl==3.5.0 + # via scikit-learn +tqdm==4.67.1 + # via huggingface-hub +typing-extensions==4.12.2 + # via + # altair + # anyio + # fastapi + # huggingface-hub + # pydantic + # pydantic-core + # referencing +tzdata==2025.1 + # via pandas +urllib3==2.3.0 + # via requests +uvicorn==0.34.0 + # via skore (pyproject.toml) +virtualenv==20.29.1 + # via pre-commit diff --git a/skore/ci/requirements/python-3.9/scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.9/scikit-learn-1.6-test-requirements.txt new file mode 100644 index 000000000..9005b6985 --- /dev/null +++ b/skore/ci/requirements/python-3.9/scikit-learn-1.6-test-requirements.txt @@ -0,0 +1,250 @@ +# +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: +# +# pip-compile --extra=test --output-file=ci/requirements/python-3.9/scikit-learn-1.6-test-requirements.txt pyproject.toml +# +altair==5.5.0 + # via skore (pyproject.toml) +annotated-types==0.7.0 + # via pydantic +anyio==4.8.0 + # via + # httpx + # starlette +attrs==25.1.0 + # via + # jsonschema + # referencing +certifi==2024.12.14 + # via + # httpcore + # httpx + # requests +cfgv==3.4.0 + # via pre-commit +charset-normalizer==3.4.1 + # via requests +click==8.1.8 + # via uvicorn +contourpy==1.3.0 + # via matplotlib +coverage[toml]==7.6.10 + # via pytest-cov +cycler==0.12.1 + # via matplotlib +diskcache==5.6.3 + # via skore (pyproject.toml) +distlib==0.3.9 + # via virtualenv +exceptiongroup==1.2.2 + # via + # anyio + # pytest +execnet==2.1.1 + # via pytest-xdist +fastapi==0.115.7 + # via skore (pyproject.toml) +filelock==3.17.0 + # via + # huggingface-hub + # virtualenv +fonttools==4.55.6 + # via matplotlib +fsspec==2024.12.0 + # via huggingface-hub +h11==0.14.0 + # via + # httpcore + # uvicorn +httpcore==1.0.7 + # via httpx +httpx==0.28.1 + # via skore (pyproject.toml) +huggingface-hub==0.27.1 + # via skops +identify==2.6.6 + # via pre-commit +idna==3.10 + # via + # anyio + # httpx + # requests +importlib-metadata==8.6.1 + # via pytest-randomly +importlib-resources==6.5.2 + # via matplotlib +iniconfig==2.0.0 + # via pytest +jinja2==3.1.5 + # via + # altair + # skrub +joblib==1.4.2 + # via + # scikit-learn + # skore (pyproject.toml) +jsonschema==4.23.0 + # via altair +jsonschema-specifications==2024.10.1 + # via jsonschema +kiwisolver==1.4.7 + # via matplotlib +markdown-it-py==3.0.0 + # via rich +markupsafe==3.0.2 + # via jinja2 +matplotlib==3.9.4 + # via + # skore (pyproject.toml) + # skrub +mdurl==0.1.2 + # via markdown-it-py +narwhals==1.24.0 + # via altair +nodeenv==1.9.1 + # via pre-commit +numpy==2.0.2 + # via + # contourpy + # matplotlib + # pandas + # scikit-learn + # scipy + # skore (pyproject.toml) + # skrub +orjson==3.10.15 + # via skore (pyproject.toml) +packaging==24.2 + # via + # altair + # huggingface-hub + # matplotlib + # plotly + # pytest + # skops + # skrub +pandas==2.2.3 + # via + # skore (pyproject.toml) + # skrub +pillow==11.1.0 + # via + # matplotlib + # skore (pyproject.toml) +platformdirs==4.3.6 + # via virtualenv +plotly==5.24.1 + # via skore (pyproject.toml) +pluggy==1.5.0 + # via pytest +polars==1.21.0 + # via skore (pyproject.toml) +pre-commit==4.1.0 + # via skore (pyproject.toml) +pyarrow==19.0.0 + # via skore (pyproject.toml) +pydantic==2.10.6 + # via fastapi +pydantic-core==2.27.2 + # via pydantic +pygments==2.19.1 + # via rich +pyparsing==3.2.1 + # via matplotlib +pytest==8.3.4 + # via + # pytest-cov + # pytest-order + # pytest-randomly + # pytest-xdist + # skore (pyproject.toml) +pytest-cov==6.0.0 + # via skore (pyproject.toml) +pytest-order==1.3.0 + # via skore (pyproject.toml) +pytest-randomly==3.16.0 + # via skore (pyproject.toml) +pytest-xdist==3.6.1 + # via skore (pyproject.toml) +python-dateutil==2.9.0.post0 + # via + # matplotlib + # pandas +pytz==2024.2 + # via pandas +pyyaml==6.0.2 + # via + # huggingface-hub + # pre-commit +referencing==0.36.2 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 + # via + # huggingface-hub + # skrub +rich==13.9.4 + # via skore (pyproject.toml) +rpds-py==0.22.3 + # via + # jsonschema + # referencing +ruff==0.9.3 + # via skore (pyproject.toml) +scikit-learn==1.6.1 + # via + # skops + # skore (pyproject.toml) + # skrub +scipy==1.13.1 + # via + # scikit-learn + # skrub +six==1.17.0 + # via python-dateutil +skops==0.11.0 + # via skore (pyproject.toml) +skrub==0.5.1 + # via skore (pyproject.toml) +sniffio==1.3.1 + # via anyio +starlette==0.45.3 + # via fastapi +tabulate==0.9.0 + # via skops +tenacity==9.0.0 + # via plotly +threadpoolctl==3.5.0 + # via scikit-learn +tomli==2.2.1 + # via + # coverage + # pytest +tqdm==4.67.1 + # via huggingface-hub +typing-extensions==4.12.2 + # via + # altair + # anyio + # fastapi + # huggingface-hub + # pydantic + # pydantic-core + # referencing + # rich + # starlette + # uvicorn +tzdata==2025.1 + # via pandas +urllib3==2.3.0 + # via requests +uvicorn==0.34.0 + # via skore (pyproject.toml) +virtualenv==20.29.1 + # via pre-commit +zipp==3.21.0 + # via + # importlib-metadata + # importlib-resources diff --git a/skore/hatch/metadata.py b/skore/hatch/metadata.py index cf5ab0944..c3bc1c473 100644 --- a/skore/hatch/metadata.py +++ b/skore/hatch/metadata.py @@ -1,10 +1,19 @@ import shutil from pathlib import Path -from contextlib import suppress +from contextlib import ExitStack, suppress from hatchling.metadata.plugin.interface import MetadataHookInterface +# @dataclasses.dataclass +# class Configuration: + + +def readlines(filepath): + with open(filepath) as file: + yield from file + + class MetadataHook(MetadataHookInterface): def update(self, metadata): license_path = Path(self.root, self.config["license-file"]) @@ -21,3 +30,23 @@ def update(self, metadata): license_dest = Path(self.root, license_path.name) shutil.copy2(license_path, license_dest) + + # { + # 'path': 'hatch/metadata.py', + # 'license-file': '../LICENSE', + # 'readme-file': '../README.md', + # 'version-default': '0.0.0+unknown', + # 'dependencies': {'file': 'requirements.in'}, + # 'optional-dependencies': { + # 'test': {'file': 'test-requirements.in'}, + # 'sphinx': {'file': 'sphinx-requirements.in'} + # } + # } + + metadata["dependencies"] = list( + map(str.strip, readlines(self.config["dependencies"])) + ) + metadata["optional-dependencies"] = { + label: list(map(str.strip, readlines(filepath))) + for label, filepath in self.config["optional-dependencies"].items() + } diff --git a/skore/pyproject.toml b/skore/pyproject.toml index fc6ab0cc9..c300e1be3 100644 --- a/skore/pyproject.toml +++ b/skore/pyproject.toml @@ -1,24 +1,15 @@ [project] name = "skore" description = "the scikit-learn sidekick" -dynamic = ["license", "readme", "version"] +dynamic = [ + "license", + "readme", + "version", + "dependencies", + "optional-dependencies", +] requires-python = ">=3.9, <3.13" maintainers = [{ name = "skore developers", email = "skore@signal.probabl.ai" }] -dependencies = [ - "diskcache", - "fastapi", - "joblib", - "matplotlib", - "numpy", - "orjson", - "pandas", - "plotly>=5,<6", - "pyarrow", - "rich", - "scikit-learn", - "skops", - "uvicorn", -] classifiers = [ "Intended Audience :: Science/Research", "Intended Audience :: Developers", @@ -57,6 +48,9 @@ path = "hatch/metadata.py" license-file = "../LICENSE" readme-file = "../README.md" version-default = "0.0.0+unknown" +dependencies = "requirements.in" +optional-dependencies.test = "test-requirements.in" +optional-dependencies.sphinx = "sphinx-requirements.in" [tool.hatch.build.targets.sdist] only-include = ["src/", "hatch/"] @@ -66,41 +60,6 @@ artifacts = ["src/skore/ui/static/"] package = ["src/skore/"] artifacts = ["src/skore/ui/static/"] -[project.optional-dependencies] -test = [ - "altair>=5,<6", - "httpx", - "pillow", - "plotly", - "polars", - "pre-commit", - "pytest", - "pytest-cov", - "pytest-order", - "pytest-randomly", - "pytest-xdist", - "ruff", - "scikit-learn<1.7", - "skrub", -] - -sphinx = [ - "IPython", - "altair", - "numpydoc", - "polars", - "kaleido", - "pydata-sphinx-theme", - "sentence-transformers", - "sphinx", - "sphinx_autosummary_accessors", - "sphinx-design", - "sphinx-gallery", - "sphinx-copybutton", - "sphinx-tabs", - "skrub", -] - [tool.pytest.ini_options] addopts = [ "--doctest-modules", diff --git a/skore/requirements.in b/skore/requirements.in new file mode 100644 index 000000000..1e3776462 --- /dev/null +++ b/skore/requirements.in @@ -0,0 +1,13 @@ +diskcache +fastapi +joblib +matplotlib +numpy +orjson +pandas +plotly>=5,<6 +pyarrow +rich +scikit-learn>=1.6 +skops +uvicorn diff --git a/skore/sphinx-requirements.in b/skore/sphinx-requirements.in new file mode 100644 index 000000000..ac11433f0 --- /dev/null +++ b/skore/sphinx-requirements.in @@ -0,0 +1,14 @@ +IPython +altair +numpydoc +polars +kaleido +pydata-sphinx-theme +sentence-transformers +sphinx +sphinx_autosummary_accessors +sphinx-design +sphinx-gallery +sphinx-copybutton +sphinx-tabs +skrub diff --git a/skore/test-requirements.in b/skore/test-requirements.in new file mode 100644 index 000000000..1dbcf182e --- /dev/null +++ b/skore/test-requirements.in @@ -0,0 +1,14 @@ +altair>=5,<6 +httpx +pillow +plotly +polars +pre-commit +pytest +pytest-cov +pytest-order +pytest-randomly +pytest-xdist +ruff +scikit-learn<1.7 +skrub From 4156b2593f4afe65b39baef2b883a5bfaa1e26d5 Mon Sep 17 00:00:00 2001 From: Thomas S Date: Thu, 30 Jan 2025 12:27:21 +0100 Subject: [PATCH 02/14] WIP --- skore/requirements.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skore/requirements.in b/skore/requirements.in index 1e3776462..b4493f89c 100644 --- a/skore/requirements.in +++ b/skore/requirements.in @@ -8,6 +8,6 @@ pandas plotly>=5,<6 pyarrow rich -scikit-learn>=1.6 +scikit-learn skops uvicorn From ed7ab7d68c75fa1903a1153a4db7a8dc22fa91f1 Mon Sep 17 00:00:00 2001 From: Thomas S Date: Thu, 30 Jan 2025 13:07:37 +0100 Subject: [PATCH 03/14] Add bash script to compile requirements --- skore/ci/pip-compile.sh | 50 ++++ ...10-scikit-learn-1.6-test-requirements.txt} | 62 ++--- .../scikit-learn-1.6-test-requirements.txt | 241 ----------------- ...11-scikit-learn-1.6-test-requirements.txt} | 62 ++--- ...12-scikit-learn-1.4-test-requirements.txt} | 62 ++--- ...12-scikit-learn-1.5-test-requirements.txt} | 62 ++--- ....12-scikit-learn-1.6-test-requirements.txt | 225 ++++++++++++++++ ...3.9-scikit-learn-1.6-test-requirements.txt | 225 ++++++++++++++++ .../scikit-learn-1.6-test-requirements.txt | 250 ------------------ 9 files changed, 612 insertions(+), 627 deletions(-) create mode 100644 skore/ci/pip-compile.sh rename skore/ci/requirements/{python-3.12/scikit-learn-1.6-test-requirements.txt => python-3.10-scikit-learn-1.6-test-requirements.txt} (75%) delete mode 100644 skore/ci/requirements/python-3.10/scikit-learn-1.6-test-requirements.txt rename skore/ci/requirements/{python-3.11/scikit-learn-1.6-test-requirements.txt => python-3.11-scikit-learn-1.6-test-requirements.txt} (75%) rename skore/ci/requirements/{python-3.12/scikit-learn-1.4-test-requirements.txt => python-3.12-scikit-learn-1.4-test-requirements.txt} (75%) rename skore/ci/requirements/{python-3.12/scikit-learn-1.5-test-requirements.txt => python-3.12-scikit-learn-1.5-test-requirements.txt} (75%) create mode 100644 skore/ci/requirements/python-3.12-scikit-learn-1.6-test-requirements.txt create mode 100644 skore/ci/requirements/python-3.9-scikit-learn-1.6-test-requirements.txt delete mode 100644 skore/ci/requirements/python-3.9/scikit-learn-1.6-test-requirements.txt diff --git a/skore/ci/pip-compile.sh b/skore/ci/pip-compile.sh new file mode 100644 index 000000000..bb21522dc --- /dev/null +++ b/skore/ci/pip-compile.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +CWD="$PWD" +TMPDIR=$(mktemp -d); trap 'rm -rf ${TMPDIR}' 0 + +declare -a COMBINATIONS + +COMBINATIONS[0]='3.9;1.6' +COMBINATIONS[1]='3.10;1.6' +COMBINATIONS[2]='3.11;1.6' +COMBINATIONS[3]='3.12;1.4' +COMBINATIONS[4]='3.12;1.5' +COMBINATIONS[5]='3.12;1.6' + +set -eu + +( + cp -r .. "${TMPDIR}/skore" + cp ../../LICENSE "${TMPDIR}/LICENSE" + cp ../../README.md "${TMPDIR}/README.md" + + cd "${TMPDIR}" + + for combination in "${COMBINATIONS[@]}" + do + IFS=";" read -r -a combination <<< "${combination}" + + python="${combination[0]}" + scikit_learn="${combination[1]}" + filepath="${CWD}/requirements/python-${python}-scikit-learn-${scikit_learn}-test-requirements.txt" + + sed -i "s/scikit-learn.*/scikit-learn==${scikit_learn}.*/g" skore/test-requirements.in + + pyenv local "${python}" + python -m venv "python-${python}" + source "python-${python}/bin/activate" + + echo "Generating requirements: python ==${python} | scikit-learn ==${scikit_learn}" + + python -m pip install pip pip-tools --quiet + python -m piptools compile \ + --quiet \ + --no-strip-extras \ + --no-header \ + --extra=test \ + --output-file="${filepath}" \ + "${@:2}" \ + skore/pyproject.toml + done +) diff --git a/skore/ci/requirements/python-3.12/scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.10-scikit-learn-1.6-test-requirements.txt similarity index 75% rename from skore/ci/requirements/python-3.12/scikit-learn-1.6-test-requirements.txt rename to skore/ci/requirements/python-3.10-scikit-learn-1.6-test-requirements.txt index 6a0608213..98d0221b3 100644 --- a/skore/ci/requirements/python-3.12/scikit-learn-1.6-test-requirements.txt +++ b/skore/ci/requirements/python-3.10-scikit-learn-1.6-test-requirements.txt @@ -1,11 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --extra=test --output-file=ci/requirements/python-3.12/scikit-learn-1.6-test-requirements.txt pyproject.toml -# altair==5.5.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) annotated-types==0.7.0 # via pydantic anyio==4.8.0 @@ -34,18 +28,18 @@ coverage[toml]==7.6.10 cycler==0.12.1 # via matplotlib diskcache==5.6.3 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv execnet==2.1.1 # via pytest-xdist fastapi==0.115.7 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) filelock==3.17.0 # via # huggingface-hub # virtualenv -fonttools==4.55.6 +fonttools==4.55.8 # via matplotlib fsspec==2024.12.0 # via huggingface-hub @@ -56,8 +50,8 @@ h11==0.14.0 httpcore==1.0.7 # via httpx httpx==0.28.1 - # via skore (pyproject.toml) -huggingface-hub==0.27.1 + # via skore (skore/pyproject.toml) +huggingface-hub==0.28.0 # via skops identify==2.6.6 # via pre-commit @@ -75,7 +69,7 @@ jinja2==3.1.5 joblib==1.4.2 # via # scikit-learn - # skore (pyproject.toml) + # skore (skore/pyproject.toml) jsonschema==4.23.0 # via altair jsonschema-specifications==2024.10.1 @@ -88,11 +82,11 @@ markupsafe==3.0.2 # via jinja2 matplotlib==3.10.0 # via - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub mdurl==0.1.2 # via markdown-it-py -narwhals==1.24.0 +narwhals==1.24.1 # via altair nodeenv==1.9.1 # via pre-commit @@ -103,10 +97,10 @@ numpy==2.2.2 # pandas # scikit-learn # scipy - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub orjson==3.10.15 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) packaging==24.2 # via # altair @@ -118,24 +112,24 @@ packaging==24.2 # skrub pandas==2.2.3 # via - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub pillow==11.1.0 # via # matplotlib - # skore (pyproject.toml) + # skore (skore/pyproject.toml) platformdirs==4.3.6 # via virtualenv plotly==5.24.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pluggy==1.5.0 # via pytest polars==1.21.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pre-commit==4.1.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pyarrow==19.0.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pydantic==2.10.6 # via fastapi pydantic-core==2.27.2 @@ -150,15 +144,15 @@ pytest==8.3.4 # pytest-order # pytest-randomly # pytest-xdist - # skore (pyproject.toml) + # skore (skore/pyproject.toml) pytest-cov==6.0.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-order==1.3.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-randomly==3.16.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-xdist==3.6.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) python-dateutil==2.9.0.post0 # via # matplotlib @@ -178,17 +172,17 @@ requests==2.32.3 # huggingface-hub # skrub rich==13.9.4 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) rpds-py==0.22.3 # via # jsonschema # referencing ruff==0.9.3 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) scikit-learn==1.6.1 # via # skops - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub scipy==1.15.1 # via @@ -197,9 +191,9 @@ scipy==1.15.1 six==1.17.0 # via python-dateutil skops==0.11.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) skrub==0.5.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) sniffio==1.3.1 # via anyio starlette==0.45.3 @@ -226,6 +220,6 @@ tzdata==2025.1 urllib3==2.3.0 # via requests uvicorn==0.34.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit diff --git a/skore/ci/requirements/python-3.10/scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.10/scikit-learn-1.6-test-requirements.txt deleted file mode 100644 index d79ab31c6..000000000 --- a/skore/ci/requirements/python-3.10/scikit-learn-1.6-test-requirements.txt +++ /dev/null @@ -1,241 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --extra=test --output-file=ci/requirements/python-3.10/scikit-learn-1.6-test-requirements.txt pyproject.toml -# -altair==5.5.0 - # via skore (pyproject.toml) -annotated-types==0.7.0 - # via pydantic -anyio==4.8.0 - # via - # httpx - # starlette -attrs==25.1.0 - # via - # jsonschema - # referencing -certifi==2024.12.14 - # via - # httpcore - # httpx - # requests -cfgv==3.4.0 - # via pre-commit -charset-normalizer==3.4.1 - # via requests -click==8.1.8 - # via uvicorn -contourpy==1.3.1 - # via matplotlib -coverage[toml]==7.6.10 - # via pytest-cov -cycler==0.12.1 - # via matplotlib -diskcache==5.6.3 - # via skore (pyproject.toml) -distlib==0.3.9 - # via virtualenv -exceptiongroup==1.2.2 - # via - # anyio - # pytest -execnet==2.1.1 - # via pytest-xdist -fastapi==0.115.7 - # via skore (pyproject.toml) -filelock==3.17.0 - # via - # huggingface-hub - # virtualenv -fonttools==4.55.6 - # via matplotlib -fsspec==2024.12.0 - # via huggingface-hub -h11==0.14.0 - # via - # httpcore - # uvicorn -httpcore==1.0.7 - # via httpx -httpx==0.28.1 - # via skore (pyproject.toml) -huggingface-hub==0.27.1 - # via skops -identify==2.6.6 - # via pre-commit -idna==3.10 - # via - # anyio - # httpx - # requests -iniconfig==2.0.0 - # via pytest -jinja2==3.1.5 - # via - # altair - # skrub -joblib==1.4.2 - # via - # scikit-learn - # skore (pyproject.toml) -jsonschema==4.23.0 - # via altair -jsonschema-specifications==2024.10.1 - # via jsonschema -kiwisolver==1.4.8 - # via matplotlib -markdown-it-py==3.0.0 - # via rich -markupsafe==3.0.2 - # via jinja2 -matplotlib==3.10.0 - # via - # skore (pyproject.toml) - # skrub -mdurl==0.1.2 - # via markdown-it-py -narwhals==1.24.0 - # via altair -nodeenv==1.9.1 - # via pre-commit -numpy==2.2.2 - # via - # contourpy - # matplotlib - # pandas - # scikit-learn - # scipy - # skore (pyproject.toml) - # skrub -orjson==3.10.15 - # via skore (pyproject.toml) -packaging==24.2 - # via - # altair - # huggingface-hub - # matplotlib - # plotly - # pytest - # skops - # skrub -pandas==2.2.3 - # via - # skore (pyproject.toml) - # skrub -pillow==11.1.0 - # via - # matplotlib - # skore (pyproject.toml) -platformdirs==4.3.6 - # via virtualenv -plotly==5.24.1 - # via skore (pyproject.toml) -pluggy==1.5.0 - # via pytest -polars==1.21.0 - # via skore (pyproject.toml) -pre-commit==4.1.0 - # via skore (pyproject.toml) -pyarrow==19.0.0 - # via skore (pyproject.toml) -pydantic==2.10.6 - # via fastapi -pydantic-core==2.27.2 - # via pydantic -pygments==2.19.1 - # via rich -pyparsing==3.2.1 - # via matplotlib -pytest==8.3.4 - # via - # pytest-cov - # pytest-order - # pytest-randomly - # pytest-xdist - # skore (pyproject.toml) -pytest-cov==6.0.0 - # via skore (pyproject.toml) -pytest-order==1.3.0 - # via skore (pyproject.toml) -pytest-randomly==3.16.0 - # via skore (pyproject.toml) -pytest-xdist==3.6.1 - # via skore (pyproject.toml) -python-dateutil==2.9.0.post0 - # via - # matplotlib - # pandas -pytz==2024.2 - # via pandas -pyyaml==6.0.2 - # via - # huggingface-hub - # pre-commit -referencing==0.36.2 - # via - # jsonschema - # jsonschema-specifications -requests==2.32.3 - # via - # huggingface-hub - # skrub -rich==13.9.4 - # via skore (pyproject.toml) -rpds-py==0.22.3 - # via - # jsonschema - # referencing -ruff==0.9.3 - # via skore (pyproject.toml) -scikit-learn==1.6.1 - # via - # skops - # skore (pyproject.toml) - # skrub -scipy==1.15.1 - # via - # scikit-learn - # skrub -six==1.17.0 - # via python-dateutil -skops==0.11.0 - # via skore (pyproject.toml) -skrub==0.5.1 - # via skore (pyproject.toml) -sniffio==1.3.1 - # via anyio -starlette==0.45.3 - # via fastapi -tabulate==0.9.0 - # via skops -tenacity==9.0.0 - # via plotly -threadpoolctl==3.5.0 - # via scikit-learn -tomli==2.2.1 - # via - # coverage - # pytest -tqdm==4.67.1 - # via huggingface-hub -typing-extensions==4.12.2 - # via - # altair - # anyio - # fastapi - # huggingface-hub - # pydantic - # pydantic-core - # referencing - # rich - # uvicorn -tzdata==2025.1 - # via pandas -urllib3==2.3.0 - # via requests -uvicorn==0.34.0 - # via skore (pyproject.toml) -virtualenv==20.29.1 - # via pre-commit diff --git a/skore/ci/requirements/python-3.11/scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.11-scikit-learn-1.6-test-requirements.txt similarity index 75% rename from skore/ci/requirements/python-3.11/scikit-learn-1.6-test-requirements.txt rename to skore/ci/requirements/python-3.11-scikit-learn-1.6-test-requirements.txt index 8015dc146..98d0221b3 100644 --- a/skore/ci/requirements/python-3.11/scikit-learn-1.6-test-requirements.txt +++ b/skore/ci/requirements/python-3.11-scikit-learn-1.6-test-requirements.txt @@ -1,11 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --extra=test --output-file=ci/requirements/python-3.11/scikit-learn-1.6-test-requirements.txt pyproject.toml -# altair==5.5.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) annotated-types==0.7.0 # via pydantic anyio==4.8.0 @@ -34,18 +28,18 @@ coverage[toml]==7.6.10 cycler==0.12.1 # via matplotlib diskcache==5.6.3 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv execnet==2.1.1 # via pytest-xdist fastapi==0.115.7 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) filelock==3.17.0 # via # huggingface-hub # virtualenv -fonttools==4.55.6 +fonttools==4.55.8 # via matplotlib fsspec==2024.12.0 # via huggingface-hub @@ -56,8 +50,8 @@ h11==0.14.0 httpcore==1.0.7 # via httpx httpx==0.28.1 - # via skore (pyproject.toml) -huggingface-hub==0.27.1 + # via skore (skore/pyproject.toml) +huggingface-hub==0.28.0 # via skops identify==2.6.6 # via pre-commit @@ -75,7 +69,7 @@ jinja2==3.1.5 joblib==1.4.2 # via # scikit-learn - # skore (pyproject.toml) + # skore (skore/pyproject.toml) jsonschema==4.23.0 # via altair jsonschema-specifications==2024.10.1 @@ -88,11 +82,11 @@ markupsafe==3.0.2 # via jinja2 matplotlib==3.10.0 # via - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub mdurl==0.1.2 # via markdown-it-py -narwhals==1.24.0 +narwhals==1.24.1 # via altair nodeenv==1.9.1 # via pre-commit @@ -103,10 +97,10 @@ numpy==2.2.2 # pandas # scikit-learn # scipy - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub orjson==3.10.15 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) packaging==24.2 # via # altair @@ -118,24 +112,24 @@ packaging==24.2 # skrub pandas==2.2.3 # via - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub pillow==11.1.0 # via # matplotlib - # skore (pyproject.toml) + # skore (skore/pyproject.toml) platformdirs==4.3.6 # via virtualenv plotly==5.24.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pluggy==1.5.0 # via pytest polars==1.21.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pre-commit==4.1.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pyarrow==19.0.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pydantic==2.10.6 # via fastapi pydantic-core==2.27.2 @@ -150,15 +144,15 @@ pytest==8.3.4 # pytest-order # pytest-randomly # pytest-xdist - # skore (pyproject.toml) + # skore (skore/pyproject.toml) pytest-cov==6.0.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-order==1.3.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-randomly==3.16.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-xdist==3.6.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) python-dateutil==2.9.0.post0 # via # matplotlib @@ -178,17 +172,17 @@ requests==2.32.3 # huggingface-hub # skrub rich==13.9.4 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) rpds-py==0.22.3 # via # jsonschema # referencing ruff==0.9.3 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) scikit-learn==1.6.1 # via # skops - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub scipy==1.15.1 # via @@ -197,9 +191,9 @@ scipy==1.15.1 six==1.17.0 # via python-dateutil skops==0.11.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) skrub==0.5.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) sniffio==1.3.1 # via anyio starlette==0.45.3 @@ -226,6 +220,6 @@ tzdata==2025.1 urllib3==2.3.0 # via requests uvicorn==0.34.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit diff --git a/skore/ci/requirements/python-3.12/scikit-learn-1.4-test-requirements.txt b/skore/ci/requirements/python-3.12-scikit-learn-1.4-test-requirements.txt similarity index 75% rename from skore/ci/requirements/python-3.12/scikit-learn-1.4-test-requirements.txt rename to skore/ci/requirements/python-3.12-scikit-learn-1.4-test-requirements.txt index 6e4007782..8901a48a4 100644 --- a/skore/ci/requirements/python-3.12/scikit-learn-1.4-test-requirements.txt +++ b/skore/ci/requirements/python-3.12-scikit-learn-1.4-test-requirements.txt @@ -1,11 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --extra=test --output-file=ci/requirements/python-3.12/scikit-learn-1.4-test-requirements.txt pyproject.toml -# altair==5.5.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) annotated-types==0.7.0 # via pydantic anyio==4.8.0 @@ -34,18 +28,18 @@ coverage[toml]==7.6.10 cycler==0.12.1 # via matplotlib diskcache==5.6.3 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv execnet==2.1.1 # via pytest-xdist fastapi==0.115.7 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) filelock==3.17.0 # via # huggingface-hub # virtualenv -fonttools==4.55.6 +fonttools==4.55.8 # via matplotlib fsspec==2024.12.0 # via huggingface-hub @@ -56,8 +50,8 @@ h11==0.14.0 httpcore==1.0.7 # via httpx httpx==0.28.1 - # via skore (pyproject.toml) -huggingface-hub==0.27.1 + # via skore (skore/pyproject.toml) +huggingface-hub==0.28.0 # via skops identify==2.6.6 # via pre-commit @@ -75,7 +69,7 @@ jinja2==3.1.5 joblib==1.4.2 # via # scikit-learn - # skore (pyproject.toml) + # skore (skore/pyproject.toml) jsonschema==4.23.0 # via altair jsonschema-specifications==2024.10.1 @@ -88,11 +82,11 @@ markupsafe==3.0.2 # via jinja2 matplotlib==3.10.0 # via - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub mdurl==0.1.2 # via markdown-it-py -narwhals==1.24.0 +narwhals==1.24.1 # via altair nodeenv==1.9.1 # via pre-commit @@ -103,10 +97,10 @@ numpy==2.2.2 # pandas # scikit-learn # scipy - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub orjson==3.10.15 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) packaging==24.2 # via # altair @@ -118,24 +112,24 @@ packaging==24.2 # skrub pandas==2.2.3 # via - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub pillow==11.1.0 # via # matplotlib - # skore (pyproject.toml) + # skore (skore/pyproject.toml) platformdirs==4.3.6 # via virtualenv plotly==5.24.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pluggy==1.5.0 # via pytest polars==1.21.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pre-commit==4.1.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pyarrow==19.0.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pydantic==2.10.6 # via fastapi pydantic-core==2.27.2 @@ -150,15 +144,15 @@ pytest==8.3.4 # pytest-order # pytest-randomly # pytest-xdist - # skore (pyproject.toml) + # skore (skore/pyproject.toml) pytest-cov==6.0.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-order==1.3.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-randomly==3.16.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-xdist==3.6.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) python-dateutil==2.9.0.post0 # via # matplotlib @@ -178,17 +172,17 @@ requests==2.32.3 # huggingface-hub # skrub rich==13.9.4 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) rpds-py==0.22.3 # via # jsonschema # referencing ruff==0.9.3 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) scikit-learn==1.4.2 # via # skops - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub scipy==1.15.1 # via @@ -197,9 +191,9 @@ scipy==1.15.1 six==1.17.0 # via python-dateutil skops==0.11.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) skrub==0.5.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) sniffio==1.3.1 # via anyio starlette==0.45.3 @@ -226,6 +220,6 @@ tzdata==2025.1 urllib3==2.3.0 # via requests uvicorn==0.34.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit diff --git a/skore/ci/requirements/python-3.12/scikit-learn-1.5-test-requirements.txt b/skore/ci/requirements/python-3.12-scikit-learn-1.5-test-requirements.txt similarity index 75% rename from skore/ci/requirements/python-3.12/scikit-learn-1.5-test-requirements.txt rename to skore/ci/requirements/python-3.12-scikit-learn-1.5-test-requirements.txt index 157abbfa6..9ddda2767 100644 --- a/skore/ci/requirements/python-3.12/scikit-learn-1.5-test-requirements.txt +++ b/skore/ci/requirements/python-3.12-scikit-learn-1.5-test-requirements.txt @@ -1,11 +1,5 @@ -# -# This file is autogenerated by pip-compile with Python 3.12 -# by the following command: -# -# pip-compile --extra=test --output-file=ci/requirements/python-3.12/scikit-learn-1.5-test-requirements.txt pyproject.toml -# altair==5.5.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) annotated-types==0.7.0 # via pydantic anyio==4.8.0 @@ -34,18 +28,18 @@ coverage[toml]==7.6.10 cycler==0.12.1 # via matplotlib diskcache==5.6.3 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv execnet==2.1.1 # via pytest-xdist fastapi==0.115.7 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) filelock==3.17.0 # via # huggingface-hub # virtualenv -fonttools==4.55.6 +fonttools==4.55.8 # via matplotlib fsspec==2024.12.0 # via huggingface-hub @@ -56,8 +50,8 @@ h11==0.14.0 httpcore==1.0.7 # via httpx httpx==0.28.1 - # via skore (pyproject.toml) -huggingface-hub==0.27.1 + # via skore (skore/pyproject.toml) +huggingface-hub==0.28.0 # via skops identify==2.6.6 # via pre-commit @@ -75,7 +69,7 @@ jinja2==3.1.5 joblib==1.4.2 # via # scikit-learn - # skore (pyproject.toml) + # skore (skore/pyproject.toml) jsonschema==4.23.0 # via altair jsonschema-specifications==2024.10.1 @@ -88,11 +82,11 @@ markupsafe==3.0.2 # via jinja2 matplotlib==3.10.0 # via - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub mdurl==0.1.2 # via markdown-it-py -narwhals==1.24.0 +narwhals==1.24.1 # via altair nodeenv==1.9.1 # via pre-commit @@ -103,10 +97,10 @@ numpy==2.2.2 # pandas # scikit-learn # scipy - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub orjson==3.10.15 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) packaging==24.2 # via # altair @@ -118,24 +112,24 @@ packaging==24.2 # skrub pandas==2.2.3 # via - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub pillow==11.1.0 # via # matplotlib - # skore (pyproject.toml) + # skore (skore/pyproject.toml) platformdirs==4.3.6 # via virtualenv plotly==5.24.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pluggy==1.5.0 # via pytest polars==1.21.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pre-commit==4.1.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pyarrow==19.0.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pydantic==2.10.6 # via fastapi pydantic-core==2.27.2 @@ -150,15 +144,15 @@ pytest==8.3.4 # pytest-order # pytest-randomly # pytest-xdist - # skore (pyproject.toml) + # skore (skore/pyproject.toml) pytest-cov==6.0.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-order==1.3.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-randomly==3.16.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) pytest-xdist==3.6.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) python-dateutil==2.9.0.post0 # via # matplotlib @@ -178,17 +172,17 @@ requests==2.32.3 # huggingface-hub # skrub rich==13.9.4 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) rpds-py==0.22.3 # via # jsonschema # referencing ruff==0.9.3 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) scikit-learn==1.5.2 # via # skops - # skore (pyproject.toml) + # skore (skore/pyproject.toml) # skrub scipy==1.15.1 # via @@ -197,9 +191,9 @@ scipy==1.15.1 six==1.17.0 # via python-dateutil skops==0.11.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) skrub==0.5.1 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) sniffio==1.3.1 # via anyio starlette==0.45.3 @@ -226,6 +220,6 @@ tzdata==2025.1 urllib3==2.3.0 # via requests uvicorn==0.34.0 - # via skore (pyproject.toml) + # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit diff --git a/skore/ci/requirements/python-3.12-scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.12-scikit-learn-1.6-test-requirements.txt new file mode 100644 index 000000000..98d0221b3 --- /dev/null +++ b/skore/ci/requirements/python-3.12-scikit-learn-1.6-test-requirements.txt @@ -0,0 +1,225 @@ +altair==5.5.0 + # via skore (skore/pyproject.toml) +annotated-types==0.7.0 + # via pydantic +anyio==4.8.0 + # via + # httpx + # starlette +attrs==25.1.0 + # via + # jsonschema + # referencing +certifi==2024.12.14 + # via + # httpcore + # httpx + # requests +cfgv==3.4.0 + # via pre-commit +charset-normalizer==3.4.1 + # via requests +click==8.1.8 + # via uvicorn +contourpy==1.3.1 + # via matplotlib +coverage[toml]==7.6.10 + # via pytest-cov +cycler==0.12.1 + # via matplotlib +diskcache==5.6.3 + # via skore (skore/pyproject.toml) +distlib==0.3.9 + # via virtualenv +execnet==2.1.1 + # via pytest-xdist +fastapi==0.115.7 + # via skore (skore/pyproject.toml) +filelock==3.17.0 + # via + # huggingface-hub + # virtualenv +fonttools==4.55.8 + # via matplotlib +fsspec==2024.12.0 + # via huggingface-hub +h11==0.14.0 + # via + # httpcore + # uvicorn +httpcore==1.0.7 + # via httpx +httpx==0.28.1 + # via skore (skore/pyproject.toml) +huggingface-hub==0.28.0 + # via skops +identify==2.6.6 + # via pre-commit +idna==3.10 + # via + # anyio + # httpx + # requests +iniconfig==2.0.0 + # via pytest +jinja2==3.1.5 + # via + # altair + # skrub +joblib==1.4.2 + # via + # scikit-learn + # skore (skore/pyproject.toml) +jsonschema==4.23.0 + # via altair +jsonschema-specifications==2024.10.1 + # via jsonschema +kiwisolver==1.4.8 + # via matplotlib +markdown-it-py==3.0.0 + # via rich +markupsafe==3.0.2 + # via jinja2 +matplotlib==3.10.0 + # via + # skore (skore/pyproject.toml) + # skrub +mdurl==0.1.2 + # via markdown-it-py +narwhals==1.24.1 + # via altair +nodeenv==1.9.1 + # via pre-commit +numpy==2.2.2 + # via + # contourpy + # matplotlib + # pandas + # scikit-learn + # scipy + # skore (skore/pyproject.toml) + # skrub +orjson==3.10.15 + # via skore (skore/pyproject.toml) +packaging==24.2 + # via + # altair + # huggingface-hub + # matplotlib + # plotly + # pytest + # skops + # skrub +pandas==2.2.3 + # via + # skore (skore/pyproject.toml) + # skrub +pillow==11.1.0 + # via + # matplotlib + # skore (skore/pyproject.toml) +platformdirs==4.3.6 + # via virtualenv +plotly==5.24.1 + # via skore (skore/pyproject.toml) +pluggy==1.5.0 + # via pytest +polars==1.21.0 + # via skore (skore/pyproject.toml) +pre-commit==4.1.0 + # via skore (skore/pyproject.toml) +pyarrow==19.0.0 + # via skore (skore/pyproject.toml) +pydantic==2.10.6 + # via fastapi +pydantic-core==2.27.2 + # via pydantic +pygments==2.19.1 + # via rich +pyparsing==3.2.1 + # via matplotlib +pytest==8.3.4 + # via + # pytest-cov + # pytest-order + # pytest-randomly + # pytest-xdist + # skore (skore/pyproject.toml) +pytest-cov==6.0.0 + # via skore (skore/pyproject.toml) +pytest-order==1.3.0 + # via skore (skore/pyproject.toml) +pytest-randomly==3.16.0 + # via skore (skore/pyproject.toml) +pytest-xdist==3.6.1 + # via skore (skore/pyproject.toml) +python-dateutil==2.9.0.post0 + # via + # matplotlib + # pandas +pytz==2024.2 + # via pandas +pyyaml==6.0.2 + # via + # huggingface-hub + # pre-commit +referencing==0.36.2 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 + # via + # huggingface-hub + # skrub +rich==13.9.4 + # via skore (skore/pyproject.toml) +rpds-py==0.22.3 + # via + # jsonschema + # referencing +ruff==0.9.3 + # via skore (skore/pyproject.toml) +scikit-learn==1.6.1 + # via + # skops + # skore (skore/pyproject.toml) + # skrub +scipy==1.15.1 + # via + # scikit-learn + # skrub +six==1.17.0 + # via python-dateutil +skops==0.11.0 + # via skore (skore/pyproject.toml) +skrub==0.5.1 + # via skore (skore/pyproject.toml) +sniffio==1.3.1 + # via anyio +starlette==0.45.3 + # via fastapi +tabulate==0.9.0 + # via skops +tenacity==9.0.0 + # via plotly +threadpoolctl==3.5.0 + # via scikit-learn +tqdm==4.67.1 + # via huggingface-hub +typing-extensions==4.12.2 + # via + # altair + # anyio + # fastapi + # huggingface-hub + # pydantic + # pydantic-core + # referencing +tzdata==2025.1 + # via pandas +urllib3==2.3.0 + # via requests +uvicorn==0.34.0 + # via skore (skore/pyproject.toml) +virtualenv==20.29.1 + # via pre-commit diff --git a/skore/ci/requirements/python-3.9-scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.9-scikit-learn-1.6-test-requirements.txt new file mode 100644 index 000000000..98d0221b3 --- /dev/null +++ b/skore/ci/requirements/python-3.9-scikit-learn-1.6-test-requirements.txt @@ -0,0 +1,225 @@ +altair==5.5.0 + # via skore (skore/pyproject.toml) +annotated-types==0.7.0 + # via pydantic +anyio==4.8.0 + # via + # httpx + # starlette +attrs==25.1.0 + # via + # jsonschema + # referencing +certifi==2024.12.14 + # via + # httpcore + # httpx + # requests +cfgv==3.4.0 + # via pre-commit +charset-normalizer==3.4.1 + # via requests +click==8.1.8 + # via uvicorn +contourpy==1.3.1 + # via matplotlib +coverage[toml]==7.6.10 + # via pytest-cov +cycler==0.12.1 + # via matplotlib +diskcache==5.6.3 + # via skore (skore/pyproject.toml) +distlib==0.3.9 + # via virtualenv +execnet==2.1.1 + # via pytest-xdist +fastapi==0.115.7 + # via skore (skore/pyproject.toml) +filelock==3.17.0 + # via + # huggingface-hub + # virtualenv +fonttools==4.55.8 + # via matplotlib +fsspec==2024.12.0 + # via huggingface-hub +h11==0.14.0 + # via + # httpcore + # uvicorn +httpcore==1.0.7 + # via httpx +httpx==0.28.1 + # via skore (skore/pyproject.toml) +huggingface-hub==0.28.0 + # via skops +identify==2.6.6 + # via pre-commit +idna==3.10 + # via + # anyio + # httpx + # requests +iniconfig==2.0.0 + # via pytest +jinja2==3.1.5 + # via + # altair + # skrub +joblib==1.4.2 + # via + # scikit-learn + # skore (skore/pyproject.toml) +jsonschema==4.23.0 + # via altair +jsonschema-specifications==2024.10.1 + # via jsonschema +kiwisolver==1.4.8 + # via matplotlib +markdown-it-py==3.0.0 + # via rich +markupsafe==3.0.2 + # via jinja2 +matplotlib==3.10.0 + # via + # skore (skore/pyproject.toml) + # skrub +mdurl==0.1.2 + # via markdown-it-py +narwhals==1.24.1 + # via altair +nodeenv==1.9.1 + # via pre-commit +numpy==2.2.2 + # via + # contourpy + # matplotlib + # pandas + # scikit-learn + # scipy + # skore (skore/pyproject.toml) + # skrub +orjson==3.10.15 + # via skore (skore/pyproject.toml) +packaging==24.2 + # via + # altair + # huggingface-hub + # matplotlib + # plotly + # pytest + # skops + # skrub +pandas==2.2.3 + # via + # skore (skore/pyproject.toml) + # skrub +pillow==11.1.0 + # via + # matplotlib + # skore (skore/pyproject.toml) +platformdirs==4.3.6 + # via virtualenv +plotly==5.24.1 + # via skore (skore/pyproject.toml) +pluggy==1.5.0 + # via pytest +polars==1.21.0 + # via skore (skore/pyproject.toml) +pre-commit==4.1.0 + # via skore (skore/pyproject.toml) +pyarrow==19.0.0 + # via skore (skore/pyproject.toml) +pydantic==2.10.6 + # via fastapi +pydantic-core==2.27.2 + # via pydantic +pygments==2.19.1 + # via rich +pyparsing==3.2.1 + # via matplotlib +pytest==8.3.4 + # via + # pytest-cov + # pytest-order + # pytest-randomly + # pytest-xdist + # skore (skore/pyproject.toml) +pytest-cov==6.0.0 + # via skore (skore/pyproject.toml) +pytest-order==1.3.0 + # via skore (skore/pyproject.toml) +pytest-randomly==3.16.0 + # via skore (skore/pyproject.toml) +pytest-xdist==3.6.1 + # via skore (skore/pyproject.toml) +python-dateutil==2.9.0.post0 + # via + # matplotlib + # pandas +pytz==2024.2 + # via pandas +pyyaml==6.0.2 + # via + # huggingface-hub + # pre-commit +referencing==0.36.2 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 + # via + # huggingface-hub + # skrub +rich==13.9.4 + # via skore (skore/pyproject.toml) +rpds-py==0.22.3 + # via + # jsonschema + # referencing +ruff==0.9.3 + # via skore (skore/pyproject.toml) +scikit-learn==1.6.1 + # via + # skops + # skore (skore/pyproject.toml) + # skrub +scipy==1.15.1 + # via + # scikit-learn + # skrub +six==1.17.0 + # via python-dateutil +skops==0.11.0 + # via skore (skore/pyproject.toml) +skrub==0.5.1 + # via skore (skore/pyproject.toml) +sniffio==1.3.1 + # via anyio +starlette==0.45.3 + # via fastapi +tabulate==0.9.0 + # via skops +tenacity==9.0.0 + # via plotly +threadpoolctl==3.5.0 + # via scikit-learn +tqdm==4.67.1 + # via huggingface-hub +typing-extensions==4.12.2 + # via + # altair + # anyio + # fastapi + # huggingface-hub + # pydantic + # pydantic-core + # referencing +tzdata==2025.1 + # via pandas +urllib3==2.3.0 + # via requests +uvicorn==0.34.0 + # via skore (skore/pyproject.toml) +virtualenv==20.29.1 + # via pre-commit diff --git a/skore/ci/requirements/python-3.9/scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.9/scikit-learn-1.6-test-requirements.txt deleted file mode 100644 index 9005b6985..000000000 --- a/skore/ci/requirements/python-3.9/scikit-learn-1.6-test-requirements.txt +++ /dev/null @@ -1,250 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --extra=test --output-file=ci/requirements/python-3.9/scikit-learn-1.6-test-requirements.txt pyproject.toml -# -altair==5.5.0 - # via skore (pyproject.toml) -annotated-types==0.7.0 - # via pydantic -anyio==4.8.0 - # via - # httpx - # starlette -attrs==25.1.0 - # via - # jsonschema - # referencing -certifi==2024.12.14 - # via - # httpcore - # httpx - # requests -cfgv==3.4.0 - # via pre-commit -charset-normalizer==3.4.1 - # via requests -click==8.1.8 - # via uvicorn -contourpy==1.3.0 - # via matplotlib -coverage[toml]==7.6.10 - # via pytest-cov -cycler==0.12.1 - # via matplotlib -diskcache==5.6.3 - # via skore (pyproject.toml) -distlib==0.3.9 - # via virtualenv -exceptiongroup==1.2.2 - # via - # anyio - # pytest -execnet==2.1.1 - # via pytest-xdist -fastapi==0.115.7 - # via skore (pyproject.toml) -filelock==3.17.0 - # via - # huggingface-hub - # virtualenv -fonttools==4.55.6 - # via matplotlib -fsspec==2024.12.0 - # via huggingface-hub -h11==0.14.0 - # via - # httpcore - # uvicorn -httpcore==1.0.7 - # via httpx -httpx==0.28.1 - # via skore (pyproject.toml) -huggingface-hub==0.27.1 - # via skops -identify==2.6.6 - # via pre-commit -idna==3.10 - # via - # anyio - # httpx - # requests -importlib-metadata==8.6.1 - # via pytest-randomly -importlib-resources==6.5.2 - # via matplotlib -iniconfig==2.0.0 - # via pytest -jinja2==3.1.5 - # via - # altair - # skrub -joblib==1.4.2 - # via - # scikit-learn - # skore (pyproject.toml) -jsonschema==4.23.0 - # via altair -jsonschema-specifications==2024.10.1 - # via jsonschema -kiwisolver==1.4.7 - # via matplotlib -markdown-it-py==3.0.0 - # via rich -markupsafe==3.0.2 - # via jinja2 -matplotlib==3.9.4 - # via - # skore (pyproject.toml) - # skrub -mdurl==0.1.2 - # via markdown-it-py -narwhals==1.24.0 - # via altair -nodeenv==1.9.1 - # via pre-commit -numpy==2.0.2 - # via - # contourpy - # matplotlib - # pandas - # scikit-learn - # scipy - # skore (pyproject.toml) - # skrub -orjson==3.10.15 - # via skore (pyproject.toml) -packaging==24.2 - # via - # altair - # huggingface-hub - # matplotlib - # plotly - # pytest - # skops - # skrub -pandas==2.2.3 - # via - # skore (pyproject.toml) - # skrub -pillow==11.1.0 - # via - # matplotlib - # skore (pyproject.toml) -platformdirs==4.3.6 - # via virtualenv -plotly==5.24.1 - # via skore (pyproject.toml) -pluggy==1.5.0 - # via pytest -polars==1.21.0 - # via skore (pyproject.toml) -pre-commit==4.1.0 - # via skore (pyproject.toml) -pyarrow==19.0.0 - # via skore (pyproject.toml) -pydantic==2.10.6 - # via fastapi -pydantic-core==2.27.2 - # via pydantic -pygments==2.19.1 - # via rich -pyparsing==3.2.1 - # via matplotlib -pytest==8.3.4 - # via - # pytest-cov - # pytest-order - # pytest-randomly - # pytest-xdist - # skore (pyproject.toml) -pytest-cov==6.0.0 - # via skore (pyproject.toml) -pytest-order==1.3.0 - # via skore (pyproject.toml) -pytest-randomly==3.16.0 - # via skore (pyproject.toml) -pytest-xdist==3.6.1 - # via skore (pyproject.toml) -python-dateutil==2.9.0.post0 - # via - # matplotlib - # pandas -pytz==2024.2 - # via pandas -pyyaml==6.0.2 - # via - # huggingface-hub - # pre-commit -referencing==0.36.2 - # via - # jsonschema - # jsonschema-specifications -requests==2.32.3 - # via - # huggingface-hub - # skrub -rich==13.9.4 - # via skore (pyproject.toml) -rpds-py==0.22.3 - # via - # jsonschema - # referencing -ruff==0.9.3 - # via skore (pyproject.toml) -scikit-learn==1.6.1 - # via - # skops - # skore (pyproject.toml) - # skrub -scipy==1.13.1 - # via - # scikit-learn - # skrub -six==1.17.0 - # via python-dateutil -skops==0.11.0 - # via skore (pyproject.toml) -skrub==0.5.1 - # via skore (pyproject.toml) -sniffio==1.3.1 - # via anyio -starlette==0.45.3 - # via fastapi -tabulate==0.9.0 - # via skops -tenacity==9.0.0 - # via plotly -threadpoolctl==3.5.0 - # via scikit-learn -tomli==2.2.1 - # via - # coverage - # pytest -tqdm==4.67.1 - # via huggingface-hub -typing-extensions==4.12.2 - # via - # altair - # anyio - # fastapi - # huggingface-hub - # pydantic - # pydantic-core - # referencing - # rich - # starlette - # uvicorn -tzdata==2025.1 - # via pandas -urllib3==2.3.0 - # via requests -uvicorn==0.34.0 - # via skore (pyproject.toml) -virtualenv==20.29.1 - # via pre-commit -zipp==3.21.0 - # via - # importlib-metadata - # importlib-resources From 9b851f3342b7e29d04151f506311f063c6779ecd Mon Sep 17 00:00:00 2001 From: Thomas S Date: Thu, 30 Jan 2025 14:29:21 +0100 Subject: [PATCH 04/14] Use requirements in GH workflow --- .github/workflows/backend.yml | 30 +++++++++++++----------------- skore/ci/pip-compile.sh | 2 +- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index a683a86ad..5d543d6d5 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -77,7 +77,11 @@ jobs: id: cache-python-venv with: path: 'skore/venv' - key: python-venv-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.scikit-learn }}-${{ hashFiles('skore/pyproject.toml') }} + key: >- + python-venv + -${{ matrix.os }} + -${{ matrix.python }} + -${{ hashFiles(format('skore/ci/requirements/python-{0}-scikit-learn-{1}-test-requirements.txt', matrix.python, matrix.scikit-learn)) }} - name: Setup python-venv working-directory: "skore/" @@ -97,20 +101,14 @@ jobs: fi - name: Install dependencies in python-venv - working-directory: "skore/" + working-directory: skore/ci/requirements if: steps.cache-python-venv.outputs.cache-hit != 'true' run: | - python -m pip install --upgrade "pip" - python -m pip install --upgrade "build" - # adding `.*` to the version ensures that we install the latest version of - # scikit-learn that is compatible with the specified version - python -m pip install --upgrade "scikit-learn ==${{ matrix.scikit-learn }}.*" - - # Install `skore` and its dependencies - python -m pip install --upgrade --upgrade-strategy=eager ".[test]" - - # Uninstall the `skore` package itself - python -m pip uninstall -y "skore" + python -m pip install --upgrade pip build + python -m pip install --requirement python-${PYTHON}-scikit-learn-${SCIKITLEARN}-test-requirements.txt + env: + PYTHON: ${{ matrix.python }} + SCIKITLEARN: ${{ matrix.scikit-learn }} - name: Save python-venv uses: actions/cache/save@v4 @@ -124,10 +122,8 @@ jobs: run: python -m build - name: Install - working-directory: skore/ - run: | - # Install `skore` without its dependencies, which are present in the venv - wheel=(dist/*.whl); python -m pip install --force-reinstall --no-deps "${wheel}" + working-directory: skore/dist/ + run: wheel=(*.whl); python -m pip install --force-reinstall --no-deps "${wheel}" - name: Show dependencies versions working-directory: skore/ diff --git a/skore/ci/pip-compile.sh b/skore/ci/pip-compile.sh index bb21522dc..374c0afd9 100644 --- a/skore/ci/pip-compile.sh +++ b/skore/ci/pip-compile.sh @@ -37,7 +37,7 @@ set -eu echo "Generating requirements: python ==${python} | scikit-learn ==${scikit_learn}" - python -m pip install pip pip-tools --quiet + python -m pip install --upgrade pip pip-tools --quiet python -m piptools compile \ --quiet \ --no-strip-extras \ From 8081db0ad15b26a1050c814efc9ae5d89aa79824 Mon Sep 17 00:00:00 2001 From: Thomas S Date: Thu, 30 Jan 2025 15:03:17 +0100 Subject: [PATCH 05/14] Update requirements --- ....10-scikit-learn-1.6-test-requirements.txt | 31 +++++++++++++++---- ....11-scikit-learn-1.6-test-requirements.txt | 31 +++++++++++++++---- ....12-scikit-learn-1.4-test-requirements.txt | 31 +++++++++++++++---- ....12-scikit-learn-1.5-test-requirements.txt | 31 +++++++++++++++---- ....12-scikit-learn-1.6-test-requirements.txt | 31 +++++++++++++++---- ...3.9-scikit-learn-1.6-test-requirements.txt | 31 +++++++++++++++---- 6 files changed, 150 insertions(+), 36 deletions(-) diff --git a/skore/ci/requirements/python-3.10-scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.10-scikit-learn-1.6-test-requirements.txt index 98d0221b3..9dd739996 100644 --- a/skore/ci/requirements/python-3.10-scikit-learn-1.6-test-requirements.txt +++ b/skore/ci/requirements/python-3.10-scikit-learn-1.6-test-requirements.txt @@ -21,7 +21,7 @@ charset-normalizer==3.4.1 # via requests click==8.1.8 # via uvicorn -contourpy==1.3.1 +contourpy==1.3.0 # via matplotlib coverage[toml]==7.6.10 # via pytest-cov @@ -31,6 +31,10 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv +exceptiongroup==1.2.2 + # via + # anyio + # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.7 @@ -51,7 +55,7 @@ httpcore==1.0.7 # via httpx httpx==0.28.1 # via skore (skore/pyproject.toml) -huggingface-hub==0.28.0 +huggingface-hub==0.28.1 # via skops identify==2.6.6 # via pre-commit @@ -60,6 +64,10 @@ idna==3.10 # anyio # httpx # requests +importlib-metadata==8.6.1 + # via pytest-randomly +importlib-resources==6.5.2 + # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -74,13 +82,13 @@ jsonschema==4.23.0 # via altair jsonschema-specifications==2024.10.1 # via jsonschema -kiwisolver==1.4.8 +kiwisolver==1.4.7 # via matplotlib markdown-it-py==3.0.0 # via rich markupsafe==3.0.2 # via jinja2 -matplotlib==3.10.0 +matplotlib==3.9.4 # via # skore (skore/pyproject.toml) # skrub @@ -90,7 +98,7 @@ narwhals==1.24.1 # via altair nodeenv==1.9.1 # via pre-commit -numpy==2.2.2 +numpy==2.0.2 # via # contourpy # matplotlib @@ -184,7 +192,7 @@ scikit-learn==1.6.1 # skops # skore (skore/pyproject.toml) # skrub -scipy==1.15.1 +scipy==1.13.1 # via # scikit-learn # skrub @@ -204,6 +212,10 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn +tomli==2.2.1 + # via + # coverage + # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -215,6 +227,9 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing + # rich + # starlette + # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -223,3 +238,7 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit +zipp==3.21.0 + # via + # importlib-metadata + # importlib-resources diff --git a/skore/ci/requirements/python-3.11-scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.11-scikit-learn-1.6-test-requirements.txt index 98d0221b3..9dd739996 100644 --- a/skore/ci/requirements/python-3.11-scikit-learn-1.6-test-requirements.txt +++ b/skore/ci/requirements/python-3.11-scikit-learn-1.6-test-requirements.txt @@ -21,7 +21,7 @@ charset-normalizer==3.4.1 # via requests click==8.1.8 # via uvicorn -contourpy==1.3.1 +contourpy==1.3.0 # via matplotlib coverage[toml]==7.6.10 # via pytest-cov @@ -31,6 +31,10 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv +exceptiongroup==1.2.2 + # via + # anyio + # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.7 @@ -51,7 +55,7 @@ httpcore==1.0.7 # via httpx httpx==0.28.1 # via skore (skore/pyproject.toml) -huggingface-hub==0.28.0 +huggingface-hub==0.28.1 # via skops identify==2.6.6 # via pre-commit @@ -60,6 +64,10 @@ idna==3.10 # anyio # httpx # requests +importlib-metadata==8.6.1 + # via pytest-randomly +importlib-resources==6.5.2 + # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -74,13 +82,13 @@ jsonschema==4.23.0 # via altair jsonschema-specifications==2024.10.1 # via jsonschema -kiwisolver==1.4.8 +kiwisolver==1.4.7 # via matplotlib markdown-it-py==3.0.0 # via rich markupsafe==3.0.2 # via jinja2 -matplotlib==3.10.0 +matplotlib==3.9.4 # via # skore (skore/pyproject.toml) # skrub @@ -90,7 +98,7 @@ narwhals==1.24.1 # via altair nodeenv==1.9.1 # via pre-commit -numpy==2.2.2 +numpy==2.0.2 # via # contourpy # matplotlib @@ -184,7 +192,7 @@ scikit-learn==1.6.1 # skops # skore (skore/pyproject.toml) # skrub -scipy==1.15.1 +scipy==1.13.1 # via # scikit-learn # skrub @@ -204,6 +212,10 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn +tomli==2.2.1 + # via + # coverage + # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -215,6 +227,9 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing + # rich + # starlette + # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -223,3 +238,7 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit +zipp==3.21.0 + # via + # importlib-metadata + # importlib-resources diff --git a/skore/ci/requirements/python-3.12-scikit-learn-1.4-test-requirements.txt b/skore/ci/requirements/python-3.12-scikit-learn-1.4-test-requirements.txt index 8901a48a4..d82ef81ae 100644 --- a/skore/ci/requirements/python-3.12-scikit-learn-1.4-test-requirements.txt +++ b/skore/ci/requirements/python-3.12-scikit-learn-1.4-test-requirements.txt @@ -21,7 +21,7 @@ charset-normalizer==3.4.1 # via requests click==8.1.8 # via uvicorn -contourpy==1.3.1 +contourpy==1.3.0 # via matplotlib coverage[toml]==7.6.10 # via pytest-cov @@ -31,6 +31,10 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv +exceptiongroup==1.2.2 + # via + # anyio + # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.7 @@ -51,7 +55,7 @@ httpcore==1.0.7 # via httpx httpx==0.28.1 # via skore (skore/pyproject.toml) -huggingface-hub==0.28.0 +huggingface-hub==0.28.1 # via skops identify==2.6.6 # via pre-commit @@ -60,6 +64,10 @@ idna==3.10 # anyio # httpx # requests +importlib-metadata==8.6.1 + # via pytest-randomly +importlib-resources==6.5.2 + # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -74,13 +82,13 @@ jsonschema==4.23.0 # via altair jsonschema-specifications==2024.10.1 # via jsonschema -kiwisolver==1.4.8 +kiwisolver==1.4.7 # via matplotlib markdown-it-py==3.0.0 # via rich markupsafe==3.0.2 # via jinja2 -matplotlib==3.10.0 +matplotlib==3.9.4 # via # skore (skore/pyproject.toml) # skrub @@ -90,7 +98,7 @@ narwhals==1.24.1 # via altair nodeenv==1.9.1 # via pre-commit -numpy==2.2.2 +numpy==2.0.2 # via # contourpy # matplotlib @@ -184,7 +192,7 @@ scikit-learn==1.4.2 # skops # skore (skore/pyproject.toml) # skrub -scipy==1.15.1 +scipy==1.13.1 # via # scikit-learn # skrub @@ -204,6 +212,10 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn +tomli==2.2.1 + # via + # coverage + # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -215,6 +227,9 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing + # rich + # starlette + # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -223,3 +238,7 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit +zipp==3.21.0 + # via + # importlib-metadata + # importlib-resources diff --git a/skore/ci/requirements/python-3.12-scikit-learn-1.5-test-requirements.txt b/skore/ci/requirements/python-3.12-scikit-learn-1.5-test-requirements.txt index 9ddda2767..003d6f81d 100644 --- a/skore/ci/requirements/python-3.12-scikit-learn-1.5-test-requirements.txt +++ b/skore/ci/requirements/python-3.12-scikit-learn-1.5-test-requirements.txt @@ -21,7 +21,7 @@ charset-normalizer==3.4.1 # via requests click==8.1.8 # via uvicorn -contourpy==1.3.1 +contourpy==1.3.0 # via matplotlib coverage[toml]==7.6.10 # via pytest-cov @@ -31,6 +31,10 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv +exceptiongroup==1.2.2 + # via + # anyio + # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.7 @@ -51,7 +55,7 @@ httpcore==1.0.7 # via httpx httpx==0.28.1 # via skore (skore/pyproject.toml) -huggingface-hub==0.28.0 +huggingface-hub==0.28.1 # via skops identify==2.6.6 # via pre-commit @@ -60,6 +64,10 @@ idna==3.10 # anyio # httpx # requests +importlib-metadata==8.6.1 + # via pytest-randomly +importlib-resources==6.5.2 + # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -74,13 +82,13 @@ jsonschema==4.23.0 # via altair jsonschema-specifications==2024.10.1 # via jsonschema -kiwisolver==1.4.8 +kiwisolver==1.4.7 # via matplotlib markdown-it-py==3.0.0 # via rich markupsafe==3.0.2 # via jinja2 -matplotlib==3.10.0 +matplotlib==3.9.4 # via # skore (skore/pyproject.toml) # skrub @@ -90,7 +98,7 @@ narwhals==1.24.1 # via altair nodeenv==1.9.1 # via pre-commit -numpy==2.2.2 +numpy==2.0.2 # via # contourpy # matplotlib @@ -184,7 +192,7 @@ scikit-learn==1.5.2 # skops # skore (skore/pyproject.toml) # skrub -scipy==1.15.1 +scipy==1.13.1 # via # scikit-learn # skrub @@ -204,6 +212,10 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn +tomli==2.2.1 + # via + # coverage + # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -215,6 +227,9 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing + # rich + # starlette + # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -223,3 +238,7 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit +zipp==3.21.0 + # via + # importlib-metadata + # importlib-resources diff --git a/skore/ci/requirements/python-3.12-scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.12-scikit-learn-1.6-test-requirements.txt index 98d0221b3..9dd739996 100644 --- a/skore/ci/requirements/python-3.12-scikit-learn-1.6-test-requirements.txt +++ b/skore/ci/requirements/python-3.12-scikit-learn-1.6-test-requirements.txt @@ -21,7 +21,7 @@ charset-normalizer==3.4.1 # via requests click==8.1.8 # via uvicorn -contourpy==1.3.1 +contourpy==1.3.0 # via matplotlib coverage[toml]==7.6.10 # via pytest-cov @@ -31,6 +31,10 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv +exceptiongroup==1.2.2 + # via + # anyio + # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.7 @@ -51,7 +55,7 @@ httpcore==1.0.7 # via httpx httpx==0.28.1 # via skore (skore/pyproject.toml) -huggingface-hub==0.28.0 +huggingface-hub==0.28.1 # via skops identify==2.6.6 # via pre-commit @@ -60,6 +64,10 @@ idna==3.10 # anyio # httpx # requests +importlib-metadata==8.6.1 + # via pytest-randomly +importlib-resources==6.5.2 + # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -74,13 +82,13 @@ jsonschema==4.23.0 # via altair jsonschema-specifications==2024.10.1 # via jsonschema -kiwisolver==1.4.8 +kiwisolver==1.4.7 # via matplotlib markdown-it-py==3.0.0 # via rich markupsafe==3.0.2 # via jinja2 -matplotlib==3.10.0 +matplotlib==3.9.4 # via # skore (skore/pyproject.toml) # skrub @@ -90,7 +98,7 @@ narwhals==1.24.1 # via altair nodeenv==1.9.1 # via pre-commit -numpy==2.2.2 +numpy==2.0.2 # via # contourpy # matplotlib @@ -184,7 +192,7 @@ scikit-learn==1.6.1 # skops # skore (skore/pyproject.toml) # skrub -scipy==1.15.1 +scipy==1.13.1 # via # scikit-learn # skrub @@ -204,6 +212,10 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn +tomli==2.2.1 + # via + # coverage + # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -215,6 +227,9 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing + # rich + # starlette + # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -223,3 +238,7 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit +zipp==3.21.0 + # via + # importlib-metadata + # importlib-resources diff --git a/skore/ci/requirements/python-3.9-scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.9-scikit-learn-1.6-test-requirements.txt index 98d0221b3..9dd739996 100644 --- a/skore/ci/requirements/python-3.9-scikit-learn-1.6-test-requirements.txt +++ b/skore/ci/requirements/python-3.9-scikit-learn-1.6-test-requirements.txt @@ -21,7 +21,7 @@ charset-normalizer==3.4.1 # via requests click==8.1.8 # via uvicorn -contourpy==1.3.1 +contourpy==1.3.0 # via matplotlib coverage[toml]==7.6.10 # via pytest-cov @@ -31,6 +31,10 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv +exceptiongroup==1.2.2 + # via + # anyio + # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.7 @@ -51,7 +55,7 @@ httpcore==1.0.7 # via httpx httpx==0.28.1 # via skore (skore/pyproject.toml) -huggingface-hub==0.28.0 +huggingface-hub==0.28.1 # via skops identify==2.6.6 # via pre-commit @@ -60,6 +64,10 @@ idna==3.10 # anyio # httpx # requests +importlib-metadata==8.6.1 + # via pytest-randomly +importlib-resources==6.5.2 + # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -74,13 +82,13 @@ jsonschema==4.23.0 # via altair jsonschema-specifications==2024.10.1 # via jsonschema -kiwisolver==1.4.8 +kiwisolver==1.4.7 # via matplotlib markdown-it-py==3.0.0 # via rich markupsafe==3.0.2 # via jinja2 -matplotlib==3.10.0 +matplotlib==3.9.4 # via # skore (skore/pyproject.toml) # skrub @@ -90,7 +98,7 @@ narwhals==1.24.1 # via altair nodeenv==1.9.1 # via pre-commit -numpy==2.2.2 +numpy==2.0.2 # via # contourpy # matplotlib @@ -184,7 +192,7 @@ scikit-learn==1.6.1 # skops # skore (skore/pyproject.toml) # skrub -scipy==1.15.1 +scipy==1.13.1 # via # scikit-learn # skrub @@ -204,6 +212,10 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn +tomli==2.2.1 + # via + # coverage + # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -215,6 +227,9 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing + # rich + # starlette + # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -223,3 +238,7 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit +zipp==3.21.0 + # via + # importlib-metadata + # importlib-resources From 43f6df67e25156a2ea66b608b757dbd4296f378b Mon Sep 17 00:00:00 2001 From: Thomas S Date: Thu, 30 Jan 2025 15:44:51 +0100 Subject: [PATCH 06/14] Use directories instead of flat files --- .github/workflows/backend.yml | 9 +++---- skore/ci/pip-compile.sh | 26 ++++++++++++++++--- .../scikit-learn-1.6/test-requirements.txt} | 2 +- .../scikit-learn-1.6/test-requirements.txt} | 2 +- .../scikit-learn-1.4/test-requirements.txt} | 2 +- .../scikit-learn-1.5/test-requirements.txt} | 2 +- .../scikit-learn-1.6/test-requirements.txt} | 2 +- .../scikit-learn-1.6/test-requirements.txt} | 2 +- 8 files changed, 31 insertions(+), 16 deletions(-) rename skore/ci/requirements/{python-3.10-scikit-learn-1.6-test-requirements.txt => python-3.10/scikit-learn-1.6/test-requirements.txt} (99%) rename skore/ci/requirements/{python-3.11-scikit-learn-1.6-test-requirements.txt => python-3.11/scikit-learn-1.6/test-requirements.txt} (99%) rename skore/ci/requirements/{python-3.12-scikit-learn-1.4-test-requirements.txt => python-3.12/scikit-learn-1.4/test-requirements.txt} (99%) rename skore/ci/requirements/{python-3.12-scikit-learn-1.5-test-requirements.txt => python-3.12/scikit-learn-1.5/test-requirements.txt} (99%) rename skore/ci/requirements/{python-3.12-scikit-learn-1.6-test-requirements.txt => python-3.12/scikit-learn-1.6/test-requirements.txt} (99%) rename skore/ci/requirements/{python-3.9-scikit-learn-1.6-test-requirements.txt => python-3.9/scikit-learn-1.6/test-requirements.txt} (99%) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 5d543d6d5..9a489ae9d 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -81,7 +81,7 @@ jobs: python-venv -${{ matrix.os }} -${{ matrix.python }} - -${{ hashFiles(format('skore/ci/requirements/python-{0}-scikit-learn-{1}-test-requirements.txt', matrix.python, matrix.scikit-learn)) }} + -${{ hashFiles(format('skore/ci/requirements/python-{0}/scikit-learn-{1}/test-requirements.txt', matrix.python, matrix.scikit-learn)) }} - name: Setup python-venv working-directory: "skore/" @@ -101,14 +101,11 @@ jobs: fi - name: Install dependencies in python-venv - working-directory: skore/ci/requirements + working-directory: ${{ format('skore/ci/requirements/python-{0}/scikit-learn-{1}', matrix.python, matrix.scikit-learn) }} if: steps.cache-python-venv.outputs.cache-hit != 'true' run: | python -m pip install --upgrade pip build - python -m pip install --requirement python-${PYTHON}-scikit-learn-${SCIKITLEARN}-test-requirements.txt - env: - PYTHON: ${{ matrix.python }} - SCIKITLEARN: ${{ matrix.scikit-learn }} + python -m pip install --requirement test-requirements.txt - name: Save python-venv uses: actions/cache/save@v4 diff --git a/skore/ci/pip-compile.sh b/skore/ci/pip-compile.sh index 374c0afd9..f73a23f35 100644 --- a/skore/ci/pip-compile.sh +++ b/skore/ci/pip-compile.sh @@ -1,8 +1,18 @@ #!/bin/bash +# +# This script compiles all the `test-requirements.txt` files, based on combinations of +# `python` and `scikit-learn` versions. +# +# The combinations mirror those defined in the GitHub `backend` workflow. +# CWD="$PWD" -TMPDIR=$(mktemp -d); trap 'rm -rf ${TMPDIR}' 0 +TMPDIR=$(mktemp -d) +# Make sure that `TMPDIR` is removed on exit, whatever the signal +trap 'rm -rf ${TMPDIR}' 0 + +# Declare the combinations of `python` and `scikit-learn` versions declare -a COMBINATIONS COMBINATIONS[0]='3.9;1.6' @@ -15,10 +25,12 @@ COMBINATIONS[5]='3.12;1.6' set -eu ( + # Copy everything necessary to compile requirements in `TMPDIR` cp -r .. "${TMPDIR}/skore" cp ../../LICENSE "${TMPDIR}/LICENSE" cp ../../README.md "${TMPDIR}/README.md" + # Move to `TMPDIR` to avoid absolute paths in requirements file cd "${TMPDIR}" for combination in "${COMBINATIONS[@]}" @@ -27,16 +39,22 @@ set -eu python="${combination[0]}" scikit_learn="${combination[1]}" - filepath="${CWD}/requirements/python-${python}-scikit-learn-${scikit_learn}-test-requirements.txt" + filepath="${CWD}/requirements/python-${python}/scikit-learn-${scikit_learn}/test-requirements.txt" - sed -i "s/scikit-learn.*/scikit-learn==${scikit_learn}.*/g" skore/test-requirements.in + echo "Generating requirements: python ==${python} | scikit-learn ==${scikit_learn}" + # Force the `python` version by creating the appropriate virtual environment pyenv local "${python}" python -m venv "python-${python}" source "python-${python}/bin/activate" - echo "Generating requirements: python ==${python} | scikit-learn ==${scikit_learn}" + # Force the `scikit-learn` version by overloading test requirements + sed -i "s/scikit-learn.*/scikit-learn==${scikit_learn}.*/g" skore/test-requirements.in + + # Create the requirements file tree + mkdir -p $(dirname "${filepath}") + # Create the requirements file python -m pip install --upgrade pip pip-tools --quiet python -m piptools compile \ --quiet \ diff --git a/skore/ci/requirements/python-3.10-scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.10/scikit-learn-1.6/test-requirements.txt similarity index 99% rename from skore/ci/requirements/python-3.10-scikit-learn-1.6-test-requirements.txt rename to skore/ci/requirements/python-3.10/scikit-learn-1.6/test-requirements.txt index 9dd739996..db7fb0e9b 100644 --- a/skore/ci/requirements/python-3.10-scikit-learn-1.6-test-requirements.txt +++ b/skore/ci/requirements/python-3.10/scikit-learn-1.6/test-requirements.txt @@ -37,7 +37,7 @@ exceptiongroup==1.2.2 # pytest execnet==2.1.1 # via pytest-xdist -fastapi==0.115.7 +fastapi==0.115.8 # via skore (skore/pyproject.toml) filelock==3.17.0 # via diff --git a/skore/ci/requirements/python-3.11-scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.11/scikit-learn-1.6/test-requirements.txt similarity index 99% rename from skore/ci/requirements/python-3.11-scikit-learn-1.6-test-requirements.txt rename to skore/ci/requirements/python-3.11/scikit-learn-1.6/test-requirements.txt index 9dd739996..db7fb0e9b 100644 --- a/skore/ci/requirements/python-3.11-scikit-learn-1.6-test-requirements.txt +++ b/skore/ci/requirements/python-3.11/scikit-learn-1.6/test-requirements.txt @@ -37,7 +37,7 @@ exceptiongroup==1.2.2 # pytest execnet==2.1.1 # via pytest-xdist -fastapi==0.115.7 +fastapi==0.115.8 # via skore (skore/pyproject.toml) filelock==3.17.0 # via diff --git a/skore/ci/requirements/python-3.12-scikit-learn-1.4-test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.4/test-requirements.txt similarity index 99% rename from skore/ci/requirements/python-3.12-scikit-learn-1.4-test-requirements.txt rename to skore/ci/requirements/python-3.12/scikit-learn-1.4/test-requirements.txt index d82ef81ae..927cd482d 100644 --- a/skore/ci/requirements/python-3.12-scikit-learn-1.4-test-requirements.txt +++ b/skore/ci/requirements/python-3.12/scikit-learn-1.4/test-requirements.txt @@ -37,7 +37,7 @@ exceptiongroup==1.2.2 # pytest execnet==2.1.1 # via pytest-xdist -fastapi==0.115.7 +fastapi==0.115.8 # via skore (skore/pyproject.toml) filelock==3.17.0 # via diff --git a/skore/ci/requirements/python-3.12-scikit-learn-1.5-test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.5/test-requirements.txt similarity index 99% rename from skore/ci/requirements/python-3.12-scikit-learn-1.5-test-requirements.txt rename to skore/ci/requirements/python-3.12/scikit-learn-1.5/test-requirements.txt index 003d6f81d..164e20051 100644 --- a/skore/ci/requirements/python-3.12-scikit-learn-1.5-test-requirements.txt +++ b/skore/ci/requirements/python-3.12/scikit-learn-1.5/test-requirements.txt @@ -37,7 +37,7 @@ exceptiongroup==1.2.2 # pytest execnet==2.1.1 # via pytest-xdist -fastapi==0.115.7 +fastapi==0.115.8 # via skore (skore/pyproject.toml) filelock==3.17.0 # via diff --git a/skore/ci/requirements/python-3.12-scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.6/test-requirements.txt similarity index 99% rename from skore/ci/requirements/python-3.12-scikit-learn-1.6-test-requirements.txt rename to skore/ci/requirements/python-3.12/scikit-learn-1.6/test-requirements.txt index 9dd739996..db7fb0e9b 100644 --- a/skore/ci/requirements/python-3.12-scikit-learn-1.6-test-requirements.txt +++ b/skore/ci/requirements/python-3.12/scikit-learn-1.6/test-requirements.txt @@ -37,7 +37,7 @@ exceptiongroup==1.2.2 # pytest execnet==2.1.1 # via pytest-xdist -fastapi==0.115.7 +fastapi==0.115.8 # via skore (skore/pyproject.toml) filelock==3.17.0 # via diff --git a/skore/ci/requirements/python-3.9-scikit-learn-1.6-test-requirements.txt b/skore/ci/requirements/python-3.9/scikit-learn-1.6/test-requirements.txt similarity index 99% rename from skore/ci/requirements/python-3.9-scikit-learn-1.6-test-requirements.txt rename to skore/ci/requirements/python-3.9/scikit-learn-1.6/test-requirements.txt index 9dd739996..db7fb0e9b 100644 --- a/skore/ci/requirements/python-3.9-scikit-learn-1.6-test-requirements.txt +++ b/skore/ci/requirements/python-3.9/scikit-learn-1.6/test-requirements.txt @@ -37,7 +37,7 @@ exceptiongroup==1.2.2 # pytest execnet==2.1.1 # via pytest-xdist -fastapi==0.115.7 +fastapi==0.115.8 # via skore (skore/pyproject.toml) filelock==3.17.0 # via From 3dbc4e495bff00b12d7443f308e92d294896452e Mon Sep 17 00:00:00 2001 From: Thomas S Date: Thu, 30 Jan 2025 15:55:38 +0100 Subject: [PATCH 07/14] Update dependabot --- .github/dependabot.yml | 9 ++++++++- .gitignore | 1 + skore/ci/requirements/python-3.10/.python-version | 1 + skore/ci/requirements/python-3.11/.python-version | 1 + skore/ci/requirements/python-3.12/.python-version | 1 + skore/ci/requirements/python-3.9/.python-version | 1 + 6 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 skore/ci/requirements/python-3.10/.python-version create mode 100644 skore/ci/requirements/python-3.11/.python-version create mode 100644 skore/ci/requirements/python-3.12/.python-version create mode 100644 skore/ci/requirements/python-3.9/.python-version diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a12cb4c42..fb4e34713 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -18,6 +18,13 @@ updates: - package-ecosystem: "pip" directory: "/" schedule: - interval: "monthly" + interval: "weekly" commit-message: prefix: "chore(dependencies): PIP" + groups: + test-dependencies: + patterns: + - "*" + + # It uses `skore/ci/requirements/python*/.python-version` to specify the python + # version to used to update `skore/ci/requirements/**/test-requirements.txt` diff --git a/.gitignore b/.gitignore index f6b1ce625..f1ca3a0ed 100644 --- a/.gitignore +++ b/.gitignore @@ -191,6 +191,7 @@ examples/plot_*.png # Include excluded directories from github-actions !/.github/**/build/ +!/skore/ci/**/.python-version # Exclude hatch artifacts skore/LICENSE diff --git a/skore/ci/requirements/python-3.10/.python-version b/skore/ci/requirements/python-3.10/.python-version new file mode 100644 index 000000000..c8cfe3959 --- /dev/null +++ b/skore/ci/requirements/python-3.10/.python-version @@ -0,0 +1 @@ +3.10 diff --git a/skore/ci/requirements/python-3.11/.python-version b/skore/ci/requirements/python-3.11/.python-version new file mode 100644 index 000000000..2c0733315 --- /dev/null +++ b/skore/ci/requirements/python-3.11/.python-version @@ -0,0 +1 @@ +3.11 diff --git a/skore/ci/requirements/python-3.12/.python-version b/skore/ci/requirements/python-3.12/.python-version new file mode 100644 index 000000000..e4fba2183 --- /dev/null +++ b/skore/ci/requirements/python-3.12/.python-version @@ -0,0 +1 @@ +3.12 diff --git a/skore/ci/requirements/python-3.9/.python-version b/skore/ci/requirements/python-3.9/.python-version new file mode 100644 index 000000000..bd28b9c5c --- /dev/null +++ b/skore/ci/requirements/python-3.9/.python-version @@ -0,0 +1 @@ +3.9 From e09c65eda777b59691d4bee000b41c627b871512 Mon Sep 17 00:00:00 2001 From: Thomas S Date: Thu, 30 Jan 2025 16:34:51 +0100 Subject: [PATCH 08/14] Clean docstring --- skore/ci/pip-compile.sh | 7 +++- skore/hatch/metadata.py | 87 +++++++++++++++++++++++++---------------- skore/pyproject.toml | 10 ++--- 3 files changed, 63 insertions(+), 41 deletions(-) diff --git a/skore/ci/pip-compile.sh b/skore/ci/pip-compile.sh index f73a23f35..b6d48e615 100644 --- a/skore/ci/pip-compile.sh +++ b/skore/ci/pip-compile.sh @@ -1,9 +1,12 @@ #!/bin/bash # # This script compiles all the `test-requirements.txt` files, based on combinations of -# `python` and `scikit-learn` versions. +# `python` and `scikit-learn` versions. These combinations mirror those defined in the +# GitHub `backend` workflow. # -# The combinations mirror those defined in the GitHub `backend` workflow. +# You can pass any piptools parameter: +# +# $ bash pip-compile.sh --upgrade # CWD="$PWD" diff --git a/skore/hatch/metadata.py b/skore/hatch/metadata.py index c3bc1c473..bc8da2ab2 100644 --- a/skore/hatch/metadata.py +++ b/skore/hatch/metadata.py @@ -1,14 +1,8 @@ -import shutil from pathlib import Path -from contextlib import ExitStack, suppress from hatchling.metadata.plugin.interface import MetadataHookInterface -# @dataclasses.dataclass -# class Configuration: - - def readlines(filepath): with open(filepath) as file: yield from file @@ -16,37 +10,62 @@ def readlines(filepath): class MetadataHook(MetadataHookInterface): def update(self, metadata): - license_path = Path(self.root, self.config["license-file"]) - license = license_path.read_text(encoding="utf-8") - readme = Path(self.root, self.config["readme-file"]).read_text(encoding="utf-8") - version = self.config["version-default"] + """ + Notes + ----- + Example of configuration: + + { + 'path': 'hatch/metadata.py', + 'version-default': '0.0.0+unknown', + 'license': {'file': '../LICENSE'}, + 'readme': {'file': '../README.md'}, + 'dependencies': {'file': 'requirements.in'}, + 'optional-dependencies': { + 'test': {'file': 'test-requirements.in'}, + 'sphinx': {'file': 'sphinx-requirements.in'}, + } + } + """ + + # Retrieve LICENCE from root files + license_filepath = self.config["license"]["file"] + license = Path(self.root, license_filepath).read_text(encoding="utf-8") + + # Copy LICENCE file in `sdist` + with open(Path(self.root, "LICENSE"), "w") as f: + f.write(license) - with suppress(FileNotFoundError): + # Retrieve README from root files + readme_filepath = self.config["readme"]["file"] + readme = Path(self.root, readme_filepath).read_text(encoding="utf-8") + + # Retrieve VERSION from file created by the CI + try: version = Path(self.root, "VERSION.txt").read_text(encoding="utf-8") + except FileNotFoundError: + version = self.config["version-default"] + + # Retrieve dependencies from requirements.in + dependencies_filepath = self.config["dependencies"]["file"] + dependencies = list(map(str.strip, readlines(dependencies_filepath))) + + # Retrieve optional dependencies from *-requirements.in + optional_dependencies_label_to_filepath = self.config["optional-dependencies"] + optional_dependencies = {} + for label, filepath in optional_dependencies_label_to_filepath.items(): + optional_dependencies_filepath = filepath["file"] + optional_dependencies[label] = list( + map( + str.strip, + readlines(optional_dependencies_filepath), + ) + ) + + # Update metadata metadata["license"] = {"text": license, "content-type": "text/plain"} metadata["readme"] = {"text": readme, "content-type": "text/markdown"} metadata["version"] = version - - license_dest = Path(self.root, license_path.name) - shutil.copy2(license_path, license_dest) - - # { - # 'path': 'hatch/metadata.py', - # 'license-file': '../LICENSE', - # 'readme-file': '../README.md', - # 'version-default': '0.0.0+unknown', - # 'dependencies': {'file': 'requirements.in'}, - # 'optional-dependencies': { - # 'test': {'file': 'test-requirements.in'}, - # 'sphinx': {'file': 'sphinx-requirements.in'} - # } - # } - - metadata["dependencies"] = list( - map(str.strip, readlines(self.config["dependencies"])) - ) - metadata["optional-dependencies"] = { - label: list(map(str.strip, readlines(filepath))) - for label, filepath in self.config["optional-dependencies"].items() - } + metadata["dependencies"] = dependencies + metadata["optional-dependencies"] = optional_dependencies diff --git a/skore/pyproject.toml b/skore/pyproject.toml index c300e1be3..7e8352315 100644 --- a/skore/pyproject.toml +++ b/skore/pyproject.toml @@ -45,12 +45,12 @@ build-backend = "hatchling.build" [tool.hatch.metadata.hooks.custom] path = "hatch/metadata.py" -license-file = "../LICENSE" -readme-file = "../README.md" version-default = "0.0.0+unknown" -dependencies = "requirements.in" -optional-dependencies.test = "test-requirements.in" -optional-dependencies.sphinx = "sphinx-requirements.in" +license = { "file" = "../LICENSE" } +readme = { "file" = "../README.md" } +dependencies = { "file" = "requirements.in" } +optional-dependencies.test = { "file" = "test-requirements.in" } +optional-dependencies.sphinx = { "file" = "sphinx-requirements.in" } [tool.hatch.build.targets.sdist] only-include = ["src/", "hatch/"] From 95bd0a7b139da2e5c25d8c5a44bba28b7e106c3b Mon Sep 17 00:00:00 2001 From: Thomas S Date: Thu, 30 Jan 2025 17:50:50 +0100 Subject: [PATCH 09/14] Update test-requirements.txt after rebase --- .../scikit-learn-1.6/test-requirements.txt | 25 ++++--------------- .../scikit-learn-1.6/test-requirements.txt | 25 ++++--------------- .../scikit-learn-1.4/test-requirements.txt | 25 ++++--------------- .../scikit-learn-1.5/test-requirements.txt | 25 ++++--------------- .../scikit-learn-1.6/test-requirements.txt | 25 ++++--------------- .../scikit-learn-1.6/test-requirements.txt | 25 ++++--------------- 6 files changed, 30 insertions(+), 120 deletions(-) diff --git a/skore/ci/requirements/python-3.10/scikit-learn-1.6/test-requirements.txt b/skore/ci/requirements/python-3.10/scikit-learn-1.6/test-requirements.txt index db7fb0e9b..fd89bac25 100644 --- a/skore/ci/requirements/python-3.10/scikit-learn-1.6/test-requirements.txt +++ b/skore/ci/requirements/python-3.10/scikit-learn-1.6/test-requirements.txt @@ -31,10 +31,6 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv -exceptiongroup==1.2.2 - # via - # anyio - # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.8 @@ -64,10 +60,6 @@ idna==3.10 # anyio # httpx # requests -importlib-metadata==8.6.1 - # via pytest-randomly -importlib-resources==6.5.2 - # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -127,7 +119,9 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via virtualenv + # via + # skore (skore/pyproject.toml) + # virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -136,6 +130,8 @@ polars==1.21.0 # via skore (skore/pyproject.toml) pre-commit==4.1.0 # via skore (skore/pyproject.toml) +psutil==6.1.1 + # via skore (skore/pyproject.toml) pyarrow==19.0.0 # via skore (skore/pyproject.toml) pydantic==2.10.6 @@ -212,10 +208,6 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn -tomli==2.2.1 - # via - # coverage - # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -227,9 +219,6 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing - # rich - # starlette - # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -238,7 +227,3 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit -zipp==3.21.0 - # via - # importlib-metadata - # importlib-resources diff --git a/skore/ci/requirements/python-3.11/scikit-learn-1.6/test-requirements.txt b/skore/ci/requirements/python-3.11/scikit-learn-1.6/test-requirements.txt index db7fb0e9b..fd89bac25 100644 --- a/skore/ci/requirements/python-3.11/scikit-learn-1.6/test-requirements.txt +++ b/skore/ci/requirements/python-3.11/scikit-learn-1.6/test-requirements.txt @@ -31,10 +31,6 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv -exceptiongroup==1.2.2 - # via - # anyio - # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.8 @@ -64,10 +60,6 @@ idna==3.10 # anyio # httpx # requests -importlib-metadata==8.6.1 - # via pytest-randomly -importlib-resources==6.5.2 - # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -127,7 +119,9 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via virtualenv + # via + # skore (skore/pyproject.toml) + # virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -136,6 +130,8 @@ polars==1.21.0 # via skore (skore/pyproject.toml) pre-commit==4.1.0 # via skore (skore/pyproject.toml) +psutil==6.1.1 + # via skore (skore/pyproject.toml) pyarrow==19.0.0 # via skore (skore/pyproject.toml) pydantic==2.10.6 @@ -212,10 +208,6 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn -tomli==2.2.1 - # via - # coverage - # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -227,9 +219,6 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing - # rich - # starlette - # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -238,7 +227,3 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit -zipp==3.21.0 - # via - # importlib-metadata - # importlib-resources diff --git a/skore/ci/requirements/python-3.12/scikit-learn-1.4/test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.4/test-requirements.txt index 927cd482d..28c3fdc4b 100644 --- a/skore/ci/requirements/python-3.12/scikit-learn-1.4/test-requirements.txt +++ b/skore/ci/requirements/python-3.12/scikit-learn-1.4/test-requirements.txt @@ -31,10 +31,6 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv -exceptiongroup==1.2.2 - # via - # anyio - # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.8 @@ -64,10 +60,6 @@ idna==3.10 # anyio # httpx # requests -importlib-metadata==8.6.1 - # via pytest-randomly -importlib-resources==6.5.2 - # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -127,7 +119,9 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via virtualenv + # via + # skore (skore/pyproject.toml) + # virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -136,6 +130,8 @@ polars==1.21.0 # via skore (skore/pyproject.toml) pre-commit==4.1.0 # via skore (skore/pyproject.toml) +psutil==6.1.1 + # via skore (skore/pyproject.toml) pyarrow==19.0.0 # via skore (skore/pyproject.toml) pydantic==2.10.6 @@ -212,10 +208,6 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn -tomli==2.2.1 - # via - # coverage - # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -227,9 +219,6 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing - # rich - # starlette - # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -238,7 +227,3 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit -zipp==3.21.0 - # via - # importlib-metadata - # importlib-resources diff --git a/skore/ci/requirements/python-3.12/scikit-learn-1.5/test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.5/test-requirements.txt index 164e20051..43792f379 100644 --- a/skore/ci/requirements/python-3.12/scikit-learn-1.5/test-requirements.txt +++ b/skore/ci/requirements/python-3.12/scikit-learn-1.5/test-requirements.txt @@ -31,10 +31,6 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv -exceptiongroup==1.2.2 - # via - # anyio - # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.8 @@ -64,10 +60,6 @@ idna==3.10 # anyio # httpx # requests -importlib-metadata==8.6.1 - # via pytest-randomly -importlib-resources==6.5.2 - # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -127,7 +119,9 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via virtualenv + # via + # skore (skore/pyproject.toml) + # virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -136,6 +130,8 @@ polars==1.21.0 # via skore (skore/pyproject.toml) pre-commit==4.1.0 # via skore (skore/pyproject.toml) +psutil==6.1.1 + # via skore (skore/pyproject.toml) pyarrow==19.0.0 # via skore (skore/pyproject.toml) pydantic==2.10.6 @@ -212,10 +208,6 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn -tomli==2.2.1 - # via - # coverage - # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -227,9 +219,6 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing - # rich - # starlette - # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -238,7 +227,3 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit -zipp==3.21.0 - # via - # importlib-metadata - # importlib-resources diff --git a/skore/ci/requirements/python-3.12/scikit-learn-1.6/test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.6/test-requirements.txt index db7fb0e9b..fd89bac25 100644 --- a/skore/ci/requirements/python-3.12/scikit-learn-1.6/test-requirements.txt +++ b/skore/ci/requirements/python-3.12/scikit-learn-1.6/test-requirements.txt @@ -31,10 +31,6 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv -exceptiongroup==1.2.2 - # via - # anyio - # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.8 @@ -64,10 +60,6 @@ idna==3.10 # anyio # httpx # requests -importlib-metadata==8.6.1 - # via pytest-randomly -importlib-resources==6.5.2 - # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -127,7 +119,9 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via virtualenv + # via + # skore (skore/pyproject.toml) + # virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -136,6 +130,8 @@ polars==1.21.0 # via skore (skore/pyproject.toml) pre-commit==4.1.0 # via skore (skore/pyproject.toml) +psutil==6.1.1 + # via skore (skore/pyproject.toml) pyarrow==19.0.0 # via skore (skore/pyproject.toml) pydantic==2.10.6 @@ -212,10 +208,6 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn -tomli==2.2.1 - # via - # coverage - # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -227,9 +219,6 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing - # rich - # starlette - # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -238,7 +227,3 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit -zipp==3.21.0 - # via - # importlib-metadata - # importlib-resources diff --git a/skore/ci/requirements/python-3.9/scikit-learn-1.6/test-requirements.txt b/skore/ci/requirements/python-3.9/scikit-learn-1.6/test-requirements.txt index db7fb0e9b..fd89bac25 100644 --- a/skore/ci/requirements/python-3.9/scikit-learn-1.6/test-requirements.txt +++ b/skore/ci/requirements/python-3.9/scikit-learn-1.6/test-requirements.txt @@ -31,10 +31,6 @@ diskcache==5.6.3 # via skore (skore/pyproject.toml) distlib==0.3.9 # via virtualenv -exceptiongroup==1.2.2 - # via - # anyio - # pytest execnet==2.1.1 # via pytest-xdist fastapi==0.115.8 @@ -64,10 +60,6 @@ idna==3.10 # anyio # httpx # requests -importlib-metadata==8.6.1 - # via pytest-randomly -importlib-resources==6.5.2 - # via matplotlib iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -127,7 +119,9 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via virtualenv + # via + # skore (skore/pyproject.toml) + # virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -136,6 +130,8 @@ polars==1.21.0 # via skore (skore/pyproject.toml) pre-commit==4.1.0 # via skore (skore/pyproject.toml) +psutil==6.1.1 + # via skore (skore/pyproject.toml) pyarrow==19.0.0 # via skore (skore/pyproject.toml) pydantic==2.10.6 @@ -212,10 +208,6 @@ tenacity==9.0.0 # via plotly threadpoolctl==3.5.0 # via scikit-learn -tomli==2.2.1 - # via - # coverage - # pytest tqdm==4.67.1 # via huggingface-hub typing-extensions==4.12.2 @@ -227,9 +219,6 @@ typing-extensions==4.12.2 # pydantic # pydantic-core # referencing - # rich - # starlette - # uvicorn tzdata==2025.1 # via pandas urllib3==2.3.0 @@ -238,7 +227,3 @@ uvicorn==0.34.0 # via skore (skore/pyproject.toml) virtualenv==20.29.1 # via pre-commit -zipp==3.21.0 - # via - # importlib-metadata - # importlib-resources From 7feafe07ea3a99342f3ca4454de6ce8f081b9616 Mon Sep 17 00:00:00 2001 From: Thomas S Date: Fri, 31 Jan 2025 10:45:04 +0100 Subject: [PATCH 10/14] Fix typing mistake --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fb4e34713..fed1b2c99 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -27,4 +27,4 @@ updates: - "*" # It uses `skore/ci/requirements/python*/.python-version` to specify the python - # version to used to update `skore/ci/requirements/**/test-requirements.txt` + # version used to update `skore/ci/requirements/**/test-requirements.txt` From fa59a38c52b6ed6177fcce0754181ad523896529 Mon Sep 17 00:00:00 2001 From: Thomas S Date: Fri, 31 Jan 2025 14:38:30 +0100 Subject: [PATCH 11/14] Add GH job to check if lockfiles are outdated --- .github/workflows/backend.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 9a489ae9d..02bf3b717 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -43,6 +43,27 @@ jobs: working-directory: skore/ run: pre-commit run --all-files ruff + backend-lockfiles: + runs-on: "ubuntu-latest" + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Check lockfiles are not obsolete + run: | + changes=$(git diff --name-only HEAD^1 HEAD) + + if + (echo "${changes}" | grep -qE 'skore/(test-)?requirements.in') && + (echo "${changes}" | (! grep -qE "skore/ci/requirements/.*/test-requirements.txt")) + then + echo '::error title=backend-lockfiles:: Lockfiles obsolete, please execute `$ cd skore/ci; bash pip-compile.sh`' + exit 1 + fi + backend-test: strategy: fail-fast: false From 83de7af0d504135c077106e833c404062d28e93e Mon Sep 17 00:00:00 2001 From: Thomas S Date: Fri, 31 Jan 2025 15:30:08 +0100 Subject: [PATCH 12/14] Start to write ADR --- .../0004-cache-python-dependencies-in-ci.md | 14 ++++++++++++++ docs/design/0005-use-python-lockfiles-in-ci.md | 15 +++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 docs/design/0004-cache-python-dependencies-in-ci.md create mode 100644 docs/design/0005-use-python-lockfiles-in-ci.md diff --git a/docs/design/0004-cache-python-dependencies-in-ci.md b/docs/design/0004-cache-python-dependencies-in-ci.md new file mode 100644 index 000000000..48da3e77a --- /dev/null +++ b/docs/design/0004-cache-python-dependencies-in-ci.md @@ -0,0 +1,14 @@ +--- +date: 2025-01-09 +decision-makers: ["@thomass-dev"] +--- + +# Cache python dependencies in CI + +## Context and Problem Statement + +## Decision Outcome + +## More Information + +Implementation in pull-request [#916](https://github.com/probabl-ai/skore/pull/916). diff --git a/docs/design/0005-use-python-lockfiles-in-ci.md b/docs/design/0005-use-python-lockfiles-in-ci.md new file mode 100644 index 000000000..31da35afe --- /dev/null +++ b/docs/design/0005-use-python-lockfiles-in-ci.md @@ -0,0 +1,15 @@ +--- +date: 2025-01-31 +decision-makers: ["@thomass-dev"] +--- + +# Use python `test-requirements.txt` lockfiles in CI + +## Context and Problem Statement + +## Decision Outcome + + +## More Information + +Implementation in pull-request [#916](https://github.com/probabl-ai/skore/pull/1238). From 6ef929368fe1f087194d1a1a458f2f8a9cbf16bd Mon Sep 17 00:00:00 2001 From: Thomas S Date: Fri, 31 Jan 2025 16:47:26 +0100 Subject: [PATCH 13/14] Write 0004-cache-python-dependencies-in-ci.md --- .../0004-cache-python-dependencies-in-ci.md | 32 +++++++++++++++++++ .../design/0005-use-python-lockfiles-in-ci.md | 3 +- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/docs/design/0004-cache-python-dependencies-in-ci.md b/docs/design/0004-cache-python-dependencies-in-ci.md index 48da3e77a..a4babffff 100644 --- a/docs/design/0004-cache-python-dependencies-in-ci.md +++ b/docs/design/0004-cache-python-dependencies-in-ci.md @@ -7,8 +7,40 @@ decision-makers: ["@thomass-dev"] ## Context and Problem Statement +The choice was made to support the 3 latests versions of `scikit-learn`, jointly with +the OS team. + +To date, we already have a CI running `skore` tests with 2 OS, and 4 python versions. +The CI therefore runs the same job 2*4=8 times. To limit the installation time each time +we run the test, we use a native GH mechanism to persist the pip cache. That way, python +packages can be installed without the need to be re-download from PyPI. It's better than +nothing, but installation time is incompressibly slow. + +Supporting 3 versions of `scikit-learn` means adding at least 2 additional test runs: +- the latest version is test on each OS/python versions (no additonal test run), +- the 2 older versions of scikit-learn are tested on ubuntu-latest python 3.12 (2 + additional test runs) + +The CI is becoming very long, we need to find a way to reduce its duration. + ## Decision Outcome +Speed-up tests by installing python dependencies in virtual environments and caching it: + +* pros: reduction of one minute per job when the cache is already built, otherwise + equivalent. +* cons: cache must be purged manually to install a new version of a dependency. It's not + a big deal for now, since the gain is higher than the constraint. + +Dependencies no longer need to be installed at each step, as they are already present in +the cached venv. + +We base the construction of the cache on the n-tuple OS, python, scikit-learn, and the +hash of the `pyproject.toml` file. This way, if the dependencies list changes, a new +cache is automatically built. + +Each test run knows which cache to use, depending on its context. + ## More Information Implementation in pull-request [#916](https://github.com/probabl-ai/skore/pull/916). diff --git a/docs/design/0005-use-python-lockfiles-in-ci.md b/docs/design/0005-use-python-lockfiles-in-ci.md index 31da35afe..2823915ab 100644 --- a/docs/design/0005-use-python-lockfiles-in-ci.md +++ b/docs/design/0005-use-python-lockfiles-in-ci.md @@ -9,7 +9,6 @@ decision-makers: ["@thomass-dev"] ## Decision Outcome - ## More Information -Implementation in pull-request [#916](https://github.com/probabl-ai/skore/pull/1238). +Implementation in pull-request [#1238](https://github.com/probabl-ai/skore/pull/1238). From a34de25d120c3c15c6bce7ec4fd2a608e6fbe463 Mon Sep 17 00:00:00 2001 From: Thomas S Date: Fri, 31 Jan 2025 17:26:12 +0100 Subject: [PATCH 14/14] Write 0005-use-python-lockfiles-in-ci.md --- .../0004-cache-python-dependencies-in-ci.md | 2 ++ .../design/0005-use-python-lockfiles-in-ci.md | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/docs/design/0004-cache-python-dependencies-in-ci.md b/docs/design/0004-cache-python-dependencies-in-ci.md index a4babffff..4033dcbc4 100644 --- a/docs/design/0004-cache-python-dependencies-in-ci.md +++ b/docs/design/0004-cache-python-dependencies-in-ci.md @@ -41,6 +41,8 @@ cache is automatically built. Each test run knows which cache to use, depending on its context. +Unused cache is automatically purged by GH after 90 days. + ## More Information Implementation in pull-request [#916](https://github.com/probabl-ai/skore/pull/916). diff --git a/docs/design/0005-use-python-lockfiles-in-ci.md b/docs/design/0005-use-python-lockfiles-in-ci.md index 2823915ab..4394902ad 100644 --- a/docs/design/0005-use-python-lockfiles-in-ci.md +++ b/docs/design/0005-use-python-lockfiles-in-ci.md @@ -7,8 +7,29 @@ decision-makers: ["@thomass-dev"] ## Context and Problem Statement +With the pull-request [#916](https://github.com/probabl-ai/skore/pull/916), we cache now +the python dependencies to speed-up CI. However, to update in the cache the version of a +dependency, for example, to take advantage of a bugfix, we have to manually purge the GH +cache from the GH cli. It's not scallable. + +Moreover, in state of the CI, we can't control what version of a dependency is used. It +can lead to inconsistent tests, in particular when between two runs, a new version of a +dependency is released. + +We therefore want to define the dependencies versions in the CI, while leaving the user +free to install what he wants. + ## Decision Outcome +We can't fix dependencies version in the `pyproject.toml` file without impacting users. +Instead, we fix the versions in separate requirement files, intended to be used only by +the CI. These files must be rebuilt after each change in the dependencies list, to stay +in sync at all times with the `pyproject.toml` file. + +These files are now used to construct the python cache in the CI. +These files are automatically managed by `dependabot`, to take account of new weekly +bugfixes. It produces pull-requests that must be accepted by maintainers. + ## More Information Implementation in pull-request [#1238](https://github.com/probabl-ai/skore/pull/1238).