diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fed1b2c99..fcaea8b12 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,13 +8,6 @@ updates: commit-message: prefix: "chore(dependencies): GITHUB-ACTIONS" - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "monthly" - commit-message: - prefix: "chore(dependencies): NPM" - - package-ecosystem: "pip" directory: "/" schedule: diff --git a/.github/workflows/pr-display-frontend-coverage.yml b/.github/workflows/pr-display-frontend-coverage.yml deleted file mode 100644 index 6dc1517cb..000000000 --- a/.github/workflows/pr-display-frontend-coverage.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: display frontend coverage in PR - -on: - workflow_run: - workflows: [frontend] - types: [completed] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: {} - -jobs: - display-frontend-coverage: - if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - pull-requests: write - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Acquire PR context - id: acquire-pr-context - uses: ./.github/actions/workflow-run/context - - - name: Download coverage reports - uses: actions/download-artifact@v4 - with: - name: frontend-coverage - path: coverage/ - github-token: ${{ github.token }} - run-id: ${{ github.event.workflow_run.id }} - - - name: Display coverage reports - uses: davelosert/vitest-coverage-report-action@v2 - with: - pr-number: ${{ steps.acquire-pr-context.outputs.pr-number }} - name: frontend 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 fd89bac25..c4daf4d69 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 @@ -1,26 +1,15 @@ 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 + # via 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 @@ -33,8 +22,6 @@ distlib==0.3.9 # via virtualenv execnet==2.1.1 # via pytest-xdist -fastapi==0.115.8 - # via skore (skore/pyproject.toml) filelock==3.17.0 # via # huggingface-hub @@ -43,23 +30,12 @@ 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.1 # via skops identify==2.6.6 # via pre-commit idna==3.10 - # via - # anyio - # httpx - # requests + # via requests iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -99,8 +75,6 @@ numpy==2.0.2 # scipy # skore (skore/pyproject.toml) # skrub -orjson==3.10.15 - # via skore (skore/pyproject.toml) packaging==24.2 # via # altair @@ -119,9 +93,7 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via - # skore (skore/pyproject.toml) - # virtualenv + # via virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -130,14 +102,6 @@ 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 - # via fastapi -pydantic-core==2.27.2 - # via pydantic pygments==2.19.1 # via rich pyparsing==3.2.1 @@ -198,10 +162,6 @@ 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 @@ -213,17 +173,11 @@ tqdm==4.67.1 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.11/scikit-learn-1.6/test-requirements.txt b/skore/ci/requirements/python-3.11/scikit-learn-1.6/test-requirements.txt index fd89bac25..c4daf4d69 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,26 +1,15 @@ 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 + # via 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 @@ -33,8 +22,6 @@ distlib==0.3.9 # via virtualenv execnet==2.1.1 # via pytest-xdist -fastapi==0.115.8 - # via skore (skore/pyproject.toml) filelock==3.17.0 # via # huggingface-hub @@ -43,23 +30,12 @@ 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.1 # via skops identify==2.6.6 # via pre-commit idna==3.10 - # via - # anyio - # httpx - # requests + # via requests iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -99,8 +75,6 @@ numpy==2.0.2 # scipy # skore (skore/pyproject.toml) # skrub -orjson==3.10.15 - # via skore (skore/pyproject.toml) packaging==24.2 # via # altair @@ -119,9 +93,7 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via - # skore (skore/pyproject.toml) - # virtualenv + # via virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -130,14 +102,6 @@ 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 - # via fastapi -pydantic-core==2.27.2 - # via pydantic pygments==2.19.1 # via rich pyparsing==3.2.1 @@ -198,10 +162,6 @@ 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 @@ -213,17 +173,11 @@ tqdm==4.67.1 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.12/scikit-learn-1.4/test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.4/test-requirements.txt index 28c3fdc4b..215267d75 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,26 +1,15 @@ 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 + # via 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 @@ -33,8 +22,6 @@ distlib==0.3.9 # via virtualenv execnet==2.1.1 # via pytest-xdist -fastapi==0.115.8 - # via skore (skore/pyproject.toml) filelock==3.17.0 # via # huggingface-hub @@ -43,23 +30,12 @@ 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.1 # via skops identify==2.6.6 # via pre-commit idna==3.10 - # via - # anyio - # httpx - # requests + # via requests iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -99,8 +75,6 @@ numpy==2.0.2 # scipy # skore (skore/pyproject.toml) # skrub -orjson==3.10.15 - # via skore (skore/pyproject.toml) packaging==24.2 # via # altair @@ -119,9 +93,7 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via - # skore (skore/pyproject.toml) - # virtualenv + # via virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -130,14 +102,6 @@ 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 - # via fastapi -pydantic-core==2.27.2 - # via pydantic pygments==2.19.1 # via rich pyparsing==3.2.1 @@ -198,10 +162,6 @@ 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 @@ -213,17 +173,11 @@ tqdm==4.67.1 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.12/scikit-learn-1.5/test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.5/test-requirements.txt index 43792f379..aa863dd8b 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,26 +1,15 @@ 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 + # via 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 @@ -33,8 +22,6 @@ distlib==0.3.9 # via virtualenv execnet==2.1.1 # via pytest-xdist -fastapi==0.115.8 - # via skore (skore/pyproject.toml) filelock==3.17.0 # via # huggingface-hub @@ -43,23 +30,12 @@ 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.1 # via skops identify==2.6.6 # via pre-commit idna==3.10 - # via - # anyio - # httpx - # requests + # via requests iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -99,8 +75,6 @@ numpy==2.0.2 # scipy # skore (skore/pyproject.toml) # skrub -orjson==3.10.15 - # via skore (skore/pyproject.toml) packaging==24.2 # via # altair @@ -119,9 +93,7 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via - # skore (skore/pyproject.toml) - # virtualenv + # via virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -130,14 +102,6 @@ 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 - # via fastapi -pydantic-core==2.27.2 - # via pydantic pygments==2.19.1 # via rich pyparsing==3.2.1 @@ -198,10 +162,6 @@ 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 @@ -213,17 +173,11 @@ tqdm==4.67.1 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.12/scikit-learn-1.6/test-requirements.txt b/skore/ci/requirements/python-3.12/scikit-learn-1.6/test-requirements.txt index fd89bac25..c4daf4d69 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 @@ -1,26 +1,15 @@ 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 + # via 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 @@ -33,8 +22,6 @@ distlib==0.3.9 # via virtualenv execnet==2.1.1 # via pytest-xdist -fastapi==0.115.8 - # via skore (skore/pyproject.toml) filelock==3.17.0 # via # huggingface-hub @@ -43,23 +30,12 @@ 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.1 # via skops identify==2.6.6 # via pre-commit idna==3.10 - # via - # anyio - # httpx - # requests + # via requests iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -99,8 +75,6 @@ numpy==2.0.2 # scipy # skore (skore/pyproject.toml) # skrub -orjson==3.10.15 - # via skore (skore/pyproject.toml) packaging==24.2 # via # altair @@ -119,9 +93,7 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via - # skore (skore/pyproject.toml) - # virtualenv + # via virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -130,14 +102,6 @@ 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 - # via fastapi -pydantic-core==2.27.2 - # via pydantic pygments==2.19.1 # via rich pyparsing==3.2.1 @@ -198,10 +162,6 @@ 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 @@ -213,17 +173,11 @@ tqdm==4.67.1 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 index fd89bac25..c4daf4d69 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 @@ -1,26 +1,15 @@ 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 + # via 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 @@ -33,8 +22,6 @@ distlib==0.3.9 # via virtualenv execnet==2.1.1 # via pytest-xdist -fastapi==0.115.8 - # via skore (skore/pyproject.toml) filelock==3.17.0 # via # huggingface-hub @@ -43,23 +30,12 @@ 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.1 # via skops identify==2.6.6 # via pre-commit idna==3.10 - # via - # anyio - # httpx - # requests + # via requests iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -99,8 +75,6 @@ numpy==2.0.2 # scipy # skore (skore/pyproject.toml) # skrub -orjson==3.10.15 - # via skore (skore/pyproject.toml) packaging==24.2 # via # altair @@ -119,9 +93,7 @@ pillow==11.1.0 # matplotlib # skore (skore/pyproject.toml) platformdirs==4.3.6 - # via - # skore (skore/pyproject.toml) - # virtualenv + # via virtualenv plotly==5.24.1 # via skore (skore/pyproject.toml) pluggy==1.5.0 @@ -130,14 +102,6 @@ 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 - # via fastapi -pydantic-core==2.27.2 - # via pydantic pygments==2.19.1 # via rich pyparsing==3.2.1 @@ -198,10 +162,6 @@ 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 @@ -213,17 +173,11 @@ tqdm==4.67.1 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/pyproject.toml b/skore/pyproject.toml index d497630a0..824948da4 100644 --- a/skore/pyproject.toml +++ b/skore/pyproject.toml @@ -36,9 +36,6 @@ Download = "https://pypi.org/project/skore/#files" Issues = "https://github.com/probabl-ai/skore/issues" "Release notes" = "https://github.com/probabl-ai/skore/releases" -[project.scripts] -skore-ui = "skore.__main__:main" - [build-system] requires = ["hatchling"] build-backend = "hatchling.build" @@ -54,11 +51,9 @@ optional-dependencies.sphinx = { "file" = "sphinx-requirements.in" } [tool.hatch.build.targets.sdist] only-include = ["src/", "hatch/"] -artifacts = ["src/skore/ui/static/"] [tool.hatch.build.targets.wheel] package = ["src/skore/"] -artifacts = ["src/skore/ui/static/"] [tool.pytest.ini_options] addopts = [ diff --git a/skore/requirements.in b/skore/requirements.in index 56f2c0a1b..93acf1642 100644 --- a/skore/requirements.in +++ b/skore/requirements.in @@ -1,15 +1,8 @@ diskcache -fastapi joblib matplotlib numpy -orjson pandas -platformdirs -plotly>=5,<6 -psutil -pyarrow rich scikit-learn skops -uvicorn diff --git a/skore/sphinx-requirements.in b/skore/sphinx-requirements.in index a177e08b8..c80b70793 100644 --- a/skore/sphinx-requirements.in +++ b/skore/sphinx-requirements.in @@ -1,15 +1,16 @@ IPython altair +kaleido numpydoc +plotly>=5,<6 polars -kaleido pydata-sphinx-theme seaborn sentence-transformers -sphinx<8.2.0 -sphinx_autosummary_accessors +skrub +sphinx-copybutton sphinx-design sphinx-gallery -sphinx-copybutton sphinx-tabs -skrub +sphinx<8.2.0 +sphinx_autosummary_accessors diff --git a/skore/src/skore/__init__.py b/skore/src/skore/__init__.py index b8d06f5cf..8708167f0 100644 --- a/skore/src/skore/__init__.py +++ b/skore/src/skore/__init__.py @@ -6,7 +6,7 @@ from rich.theme import Theme from skore._config import config_context, get_config, set_config -from skore.project import Project, open +from skore.project import Project from skore.sklearn import ( ComparisonReport, CrossValidationReport, @@ -27,7 +27,6 @@ "PredictionErrorDisplay", "Project", "RocCurveDisplay", - "open", "show_versions", "train_test_split", "config_context", diff --git a/skore/src/skore/__main__.py b/skore/src/skore/__main__.py deleted file mode 100644 index ca00e85ca..000000000 --- a/skore/src/skore/__main__.py +++ /dev/null @@ -1,19 +0,0 @@ -"""Entry point to Skore CLI.""" - -import sys - -from skore.cli.cli import cli - - -def main() -> None: - """Entry point to Skore CLI.""" - import rich.traceback - - # Display error tracebacks with Rich - rich.traceback.install(show_locals=True) - - sys.exit(cli(sys.argv[1:])) - - -if __name__ == "__main__": - main() diff --git a/skore/src/skore/project/__init__.py b/skore/src/skore/project/__init__.py index e02110f5b..777f082de 100644 --- a/skore/src/skore/project/__init__.py +++ b/skore/src/skore/project/__init__.py @@ -1,9 +1,5 @@ """Alias top level function and class of the project submodule.""" -from ._open import open from .project import Project -__all__ = [ - "open", - "Project", -] +__all__ = ["Project"] diff --git a/skore/src/skore/project/_open.py b/skore/src/skore/project/_open.py deleted file mode 100644 index 3636a1ede..000000000 --- a/skore/src/skore/project/_open.py +++ /dev/null @@ -1,41 +0,0 @@ -"""Helper to open a project.""" - -from pathlib import Path -from typing import Literal, Optional, Union - -from skore.project.project import Project - - -def open( - project_path: Union[str, Path] = "project.skore", - *, - if_exists: Optional[Literal["raise", "load"]] = "raise", -) -> Project: - """Open a project given a project name or path and launch skore UI. - - This function : - - opens the project if it already exists, - - creates the project if it does not exist, - - and creates by overwriting a pre-existing project if ``overwrite`` is set to - ``True``. - - Parameters - ---------- - project_path: Path-like, optional - The relative or absolute path of the project, default "project.skore". - if_exists: Literal["raise", "load"], optional - Raise an exception if the project already exists, or load it, default "raise". - - Returns - ------- - Project - The opened Project instance. - - Raises - ------ - FileNotFoundError - If path is not found and ``create`` is set to ``False`` - ProjectCreationError - If project creation fails for some reason (e.g. if the project path is invalid) - """ - return Project(project_path, if_exists=if_exists) diff --git a/skore/src/skore/project/project.py b/skore/src/skore/project/project.py index d77dd5f77..9e21cfad4 100644 --- a/skore/src/skore/project/project.py +++ b/skore/src/skore/project/project.py @@ -133,9 +133,8 @@ def clear(self, delete_project: bool = False) -> None: .. warning:: Clearing the project with `delete_project=True` will invalidate the whole - `Project` instance, making it unusable. - A new Project instance can be created using the :class:`skore.Project` - constructor or the :func:`skore.open` function. + `Project` instance, making it unusable. A new Project instance can be created + using the :class:`skore.Project` constructor. Parameters ---------- diff --git a/skore/src/skore/utils/_show_versions.py b/skore/src/skore/utils/_show_versions.py index 75ece74ed..8f63304fd 100644 --- a/skore/src/skore/utils/_show_versions.py +++ b/skore/src/skore/utils/_show_versions.py @@ -45,7 +45,7 @@ def _get_deps_info() -> dict[str, Any]: """ from importlib.metadata import PackageNotFoundError, version - deps = ["pip", "setuptools"] + deps = ["pip"] raw_requirements = importlib.metadata.requires("skore") requirements: list[str] = [] if raw_requirements is None else raw_requirements diff --git a/skore/test-requirements.in b/skore/test-requirements.in index 1dbcf182e..3d6bcdca0 100644 --- a/skore/test-requirements.in +++ b/skore/test-requirements.in @@ -1,7 +1,6 @@ altair>=5,<6 -httpx pillow -plotly +plotly>=5,<6 polars pre-commit pytest diff --git a/skore/tests/unit/project/test_project.py b/skore/tests/unit/project/test_project.py index 37257013a..d8327f095 100644 --- a/skore/tests/unit/project/test_project.py +++ b/skore/tests/unit/project/test_project.py @@ -11,7 +11,7 @@ from matplotlib.testing.compare import compare_images from PIL import Image from sklearn.ensemble import RandomForestClassifier -from skore import Project, open +from skore import Project from skore.project.project import ProjectDeletedError @@ -307,11 +307,3 @@ def test_put_wrong_key_and_value_raise(in_memory_project): """When `on_error` is "raise", raise the first error that occurs.""" with pytest.raises(TypeError): in_memory_project.put(0, (lambda: "unsupported object")) - - -def test_open(tmp_path): - dirpath = tmp_path / "my-project.skore" - - open(dirpath) - assert dirpath.exists() - assert (dirpath / "items").exists() diff --git a/skore/tests/unit/utils/test_show_versions.py b/skore/tests/unit/utils/test_show_versions.py index f8c10b86a..ede233089 100644 --- a/skore/tests/unit/utils/test_show_versions.py +++ b/skore/tests/unit/utils/test_show_versions.py @@ -13,7 +13,6 @@ def test_get_deps_info(): deps_info = _get_deps_info() assert isinstance(deps_info, dict) assert "pip" in deps_info - assert "setuptools" in deps_info assert "skore" in deps_info @@ -33,13 +32,8 @@ def test_show_versions(capfd): assert "machine:" in captured.out assert "skore:" in captured.out assert "pip:" in captured.out - assert "setuptools:" in captured.out assert "diskcache:" in captured.out - assert "fastapi:" in captured.out assert "numpy:" in captured.out - assert "plotly:" in captured.out - assert "pyarrow:" in captured.out assert "rich:" in captured.out assert "scikit-learn:" in captured.out assert "skops:" in captured.out - assert "uvicorn:" in captured.out