diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index eeeb301..7a75db0 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -16,9 +16,9 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: prefix-dev/setup-pixi@v0.6.0 + - uses: prefix-dev/setup-pixi@v0.7.0 with: - pixi-version: v0.20.1 + pixi-version: v0.22.0 environments: doc frozen: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d6a3474..f61e034 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,9 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: prefix-dev/setup-pixi@v0.6.0 + - uses: prefix-dev/setup-pixi@v0.7.0 with: - pixi-version: v0.20.1 + pixi-version: v0.22.0 environments: lint frozen: true diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 3b4e4ea..7c0cde9 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -17,9 +17,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: prefix-dev/setup-pixi@v0.6.0 + - uses: prefix-dev/setup-pixi@v0.7.0 with: - pixi-version: v0.20.1 + pixi-version: v0.22.0 environments: ${{ matrix.environment }} frozen: true diff --git a/doc/_static/css/project-template.css b/doc/_static/css/project-template.css index e39d786..62b416b 100644 --- a/doc/_static/css/project-template.css +++ b/doc/_static/css/project-template.css @@ -16,75 +16,44 @@ margin-bottom: 1em; } - /* Main index page overview cards */ - - .intro-card { - padding: 30px 10px 20px 10px; - } - - .intro-card .sd-card-img-top { - margin: 10px; - height: 52px; - background: none !important; - } - - .intro-card .sd-card-title { - color: var(--pst-color-primary); - font-size: var(--pst-font-size-h5); - padding: 1rem 0rem 0.5rem 0rem; - } - - .intro-card .sd-card-footer { - border: none !important; - } - - .intro-card .sd-card-footer p.sd-card-text { - max-width: 220px; - margin-left: auto; - margin-right: auto; - } - - .intro-card .sd-btn-secondary { - background-color: #6c757d !important; - border-color: #6c757d !important; - } - - .intro-card .sd-btn-secondary:hover { - background-color: #5a6268 !important; - border-color: #545b62 !important; - } - - .card { - margin-top: 1em; - margin-bottom: 1em; - } - - .card, - .card img { - background-color: var(--pst-color-background); - } - - .custom-button { - background-color: #dcdcdc; - border: none; - color: #484848; - text-align: center; - text-decoration: none; - display: inline-block; - font-size: 0.9rem; - border-radius: 0.5rem; - max-width: 220px; - padding: 0.5rem 0rem; - } - - .custom-button a { - color: #484848; - } - - .custom-button p { - margin-top: 0; - margin-bottom: 0rem; - padding-left: 0.5rem; - padding-right: 0.5rem; - color: #484848; - } +/* Main index page overview cards */ + +.intro-card { + padding: 30px 10px 20px 10px; +} + +.intro-card .sd-card-img-top { + margin: 10px; + height: 52px; + background: none !important; +} + +.intro-card .sd-card-title { + color: var(--pst-color-primary); + font-size: var(--pst-font-size-h5); + padding: 1rem 0rem 0.5rem 0rem; +} + +.intro-card .sd-card-footer { + border: none !important; +} + +.intro-card .sd-card-footer p.sd-card-text { + max-width: 220px; + margin-left: auto; + margin-right: auto; +} + +.intro-card .sd-btn-secondary { + background-color: #6c757d !important; + border-color: #6c757d !important; +} + +.intro-card .sd-btn-secondary:hover { + background-color: #5a6268 !important; + border-color: #545b62 !important; +} + +.card, .card img { + background-color: var(--pst-color-background); +} diff --git a/doc/_static/img/index_api.svg b/doc/_static/img/index_api.svg new file mode 100644 index 0000000..69f7ba1 --- /dev/null +++ b/doc/_static/img/index_api.svg @@ -0,0 +1,97 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/doc/_static/img/index_examples.svg b/doc/_static/img/index_examples.svg new file mode 100644 index 0000000..de3d902 --- /dev/null +++ b/doc/_static/img/index_examples.svg @@ -0,0 +1,76 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/doc/_static/img/index_getting_started.svg b/doc/_static/img/index_getting_started.svg new file mode 100644 index 0000000..2d36622 --- /dev/null +++ b/doc/_static/img/index_getting_started.svg @@ -0,0 +1,66 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/doc/_static/img/index_user_guide.svg b/doc/_static/img/index_user_guide.svg new file mode 100644 index 0000000..bd17053 --- /dev/null +++ b/doc/_static/img/index_user_guide.svg @@ -0,0 +1,67 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/doc/api.rst b/doc/api.rst index 0bbac09..108342c 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -1,3 +1,5 @@ +.. _api: + ############# API Reference ############# diff --git a/doc/conf.py b/doc/conf.py index d9f5655..eff1283 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -26,6 +26,7 @@ "sphinx.ext.autodoc", "sphinx.ext.autosummary", "sphinx.ext.intersphinx", + "sphinx_design", "sphinx-prompt", "sphinx_gallery.gen_gallery", "numpydoc", diff --git a/doc/index.rst b/doc/index.rst index 7a5a8a7..2c66c59 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -19,83 +19,82 @@ This is the documentation for the `project-template` to help at extending `scikit-learn`. It provides some information on how to build your own custom `scikit-learn` compatible estimators as well as a template to package them. -.. raw:: html - -
-
-
-
-
- -
Getting started
-

Information regarding this template and how - to modify it for your own project.

- -.. container:: custom-button - - :ref:`To the getting started guideline` - -.. raw:: html - -
-
-
-
-
-
- -
User guide
-

An example of narrative documentation. - Here, we will explain how to create your own scikit-learn - estimator.

- -.. container:: custom-button - - :ref:`To the user guide` - -.. raw:: html - -
-
-
-
-
-
- -
API reference
-

An example of API documentation. This - is an example how to use sphinx to automatically generate - reference API page.

- -.. container:: custom-button - - :ref:`To the reference guide` - -.. raw:: html - -
-
-
-
-
-
- -
Examples
-

A set of examples. It complements the User - Guide and it is the right place to show how to use your compatible - estimator.

- -.. container:: custom-button - - :ref:`To the gallery of examples` - -.. raw:: html - -
-
-
-
-
+ +.. grid:: 1 2 2 2 + :gutter: 4 + :padding: 2 2 0 0 + :class-container: sd-text-center + + .. grid-item-card:: Getting started + :img-top: _static/img/index_getting_started.svg + :class-card: intro-card + :shadow: md + + Information regarding this template and how to modify it for your own project. + + +++ + + .. button-ref:: quick_start + :ref-type: ref + :click-parent: + :color: secondary + :expand: + + To the getting started guideline + + .. grid-item-card:: User guide + :img-top: _static/img/index_user_guide.svg + :class-card: intro-card + :shadow: md + + An example of narrative documentation. Here, we will explain how to create your + own `scikit-learn` estimator. + + +++ + + .. button-ref:: user_guide + :ref-type: ref + :click-parent: + :color: secondary + :expand: + + To the user guide + + .. grid-item-card:: API reference + :img-top: _static/img/index_api.svg + :class-card: intro-card + :shadow: md + + An example of API documentation. This is an example how to use `sphinx` to + automatically generate reference API page. + + +++ + + .. button-ref:: api + :ref-type: ref + :click-parent: + :color: secondary + :expand: + + To the reference guide + + .. grid-item-card:: Examples + :img-top: _static/img/index_examples.svg + :class-card: intro-card + :shadow: md + + A set of examples. It complements the User Guide and it is the right place to + show how to use your compatible estimator. + + +++ + + .. button-ref:: general_examples + :ref-type: ref + :click-parent: + :color: secondary + :expand: + + To the gallery of examples .. toctree:: diff --git a/doc/quick_start.rst b/doc/quick_start.rst index ca169c5..0807e40 100644 --- a/doc/quick_start.rst +++ b/doc/quick_start.rst @@ -1,3 +1,5 @@ +.. _quick_start: + ############### Getting started ############### diff --git a/pixi.lock b/pixi.lock index d823524..8916d4a 100644 --- a/pixi.lock +++ b/pixi.lock @@ -1,8 +1,10 @@ -version: 4 +version: 5 environments: default: channels: - url: https://conda.anaconda.org/conda-forge/ + indexes: + - https://pypi.org/simple packages: linux-64: - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 @@ -138,6 +140,8 @@ environments: doc: channels: - url: https://conda.anaconda.org/conda-forge/ + indexes: + - https://pypi.org/simple packages: linux-64: - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 @@ -286,6 +290,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/snowballstemmer-2.2.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/soupsieve-2.5-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-7.3.7-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-design-0.5.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-gallery-0.16.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-prompt-1.4.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-1.0.8-pyhd8ed1ab_0.conda @@ -404,6 +409,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/snowballstemmer-2.2.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/soupsieve-2.5-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-7.3.7-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-design-0.5.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-gallery-0.16.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-prompt-1.4.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-1.0.8-pyhd8ed1ab_0.conda @@ -504,6 +510,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/snowballstemmer-2.2.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/soupsieve-2.5-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-7.3.7-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-design-0.5.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-gallery-0.16.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-prompt-1.4.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-1.0.8-pyhd8ed1ab_0.conda @@ -633,6 +640,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/snowballstemmer-2.2.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/soupsieve-2.5-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-7.3.7-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-design-0.5.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-gallery-0.16.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-prompt-1.4.0-pyhd8ed1ab_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-1.0.8-pyhd8ed1ab_0.conda @@ -666,6 +674,8 @@ environments: lint: channels: - url: https://conda.anaconda.org/conda-forge/ + indexes: + - https://pypi.org/simple packages: linux-64: - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 @@ -830,6 +840,8 @@ environments: test: channels: - url: https://conda.anaconda.org/conda-forge/ + indexes: + - https://pypi.org/simple packages: linux-64: - conda: https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2 @@ -7432,9 +7444,9 @@ packages: timestamp: 1620240338595 - kind: pypi name: skltemplate - version: 0.1.1.dev7+g74ad88d + version: 0.1.2.dev0+g85a5969.d20240518 path: . - sha256: 83da9479016c85c52f79d636215d65781720cec119b8312538870e422e82b47a + sha256: 93aaf8dd3a094e08333e87ddae0faa75cc5c75b99d8be04cf81c83a93a6ef2e9 requires_dist: - scikit-learn>=1.4.2 requires_python: '>=3.9' @@ -7509,6 +7521,24 @@ packages: - pkg:pypi/sphinx size: 1345378 timestamp: 1713555005540 +- kind: conda + name: sphinx-design + version: 0.5.0 + build: pyhd8ed1ab_0 + subdir: noarch + noarch: python + url: https://conda.anaconda.org/conda-forge/noarch/sphinx-design-0.5.0-pyhd8ed1ab_0.conda + sha256: 5333c50f3687da5b59dd8df24094d8c0e834922ceabc1f525e54735e06d0bd52 + md5: 264b3c697fa9cdade87eb0abe4440d54 + depends: + - python >=3.8 + - sphinx >=5,<8 + license: MIT + license_family: MIT + purls: + - pkg:pypi/sphinx-design + size: 879349 + timestamp: 1690472687410 - kind: conda name: sphinx-gallery version: 0.16.0 diff --git a/pyproject.toml b/pyproject.toml index a26c652..25e51ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,7 @@ numpydoc = "*" pydata-sphinx-theme = "*" setuptools-scm = ">=8" # needed for the versioning sphinx = "*" +sphinx-design = "*" sphinx-gallery = "*" sphinx-prompt = "*"