-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
412 user guide and api documentation #503
Closed
Closed
Changes from 6 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
15c4452
First push of the doc
sylvaincom bb23763
Merge branch 'main' into 412-user-guide-and-api-documentation
sylvaincom 14bbfd4
finishing the first push
sylvaincom ec9ad2f
remove "pip-tools" from pyproject.toml
sylvaincom 4302fd0
writing and updating some doc
sylvaincom 5f97540
Merge branch 'main' into 412-user-guide-and-api-documentation
sylvaincom 38c33a2
Merge branch 'main' into 412-user-guide-and-api-documentation
sylvaincom a0238b7
deleting old notebooks
sylvaincom 11a9b34
WIP
sylvaincom a8e77fe
Merge branch 'main' into 412-user-guide-and-api-documentation
sylvaincom a7ef55a
Merge branch 'main' into 412-user-guide-and-api-documentation
sylvaincom fc5d1b4
update
sylvaincom 5d4500c
Merge branch 'main' into 412-user-guide-and-api-documentation
sylvaincom b6952cb
Update plot_1_getting_started.py
sylvaincom 15f05c5
update
sylvaincom 899dc7f
Update plot_1_getting_started.py
sylvaincom b776978
update
sylvaincom 175e959
Merge branch 'main' into 412-user-guide-and-api-documentation
sylvaincom dc1220e
update
sylvaincom 0a8afc3
update
sylvaincom 5e46ec3
update
sylvaincom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- test-ci* | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
push_doc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- run: pip install .[doc] | ||
|
||
- name: Sphinx build | ||
run: sphinx-build doc build | ||
|
||
- name: Save the PR number | ||
env: | ||
GITHUB_PULL_REQUEST_NUMBER: ${{github.event.number}} | ||
run: | | ||
echo "Storing PR number ${{github.event.number}} to 'pull_request_number' file" | ||
echo ${{github.event.number}} > pull_request_number | ||
|
||
- name: Upload doc preview | ||
# The publication of the preview itself happens in pr-doc-preview.yml | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: doc-preview | ||
path: | | ||
./build | ||
pull_request_number | ||
|
||
- name: Deploy | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./build | ||
commit_message: "[ci skip] ${{ github.event.head_commit.message }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
div.docutils.container.index-features { | ||
width: 300px; | ||
} | ||
|
||
div.docutils.container.index-box { | ||
background-color: var(--pst-color-white-highlight); | ||
border-radius: 10px; | ||
color: black; | ||
padding: 5px; | ||
margin-left: 15px; | ||
float: right; | ||
width: 400px; | ||
} | ||
|
||
/* Need to be able to have absolute positioning for the div inside */ | ||
.bd-main .bd-content .bd-article-container .bd-article { | ||
position: relative; | ||
} | ||
|
||
@media (min-width: 792px) { | ||
div.docutils.container.index-features { | ||
position: absolute; | ||
top: 10px; | ||
right: 0px; | ||
} | ||
} | ||
|
||
@media (min-width: 1092px) { | ||
div.docutils.container.index-box { | ||
margin-left: 30px; | ||
margin-right: -15px; | ||
} | ||
} | ||
|
||
@media (max-width: 892px) { | ||
div.docutils.container.index-box { | ||
max-width: 500px; | ||
width: unset; | ||
float: unset; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
} |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
:mod:`{{module}}`.{{objname}} | ||
{{ underline }}============== | ||
|
||
.. rst-class:: side_comment | ||
|
||
Usage examples at the bottom of this page. | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. autoclass:: {{ objname }} | ||
:inherited-members: | ||
|
||
{% block methods %} | ||
|
||
{% endblock %} | ||
|
||
.. raw:: html | ||
|
||
<div class="clearer"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
:mod:`{{module}}`.{{objname}} | ||
{{ underline }}==================== | ||
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. autofunction:: {{ objname }} | ||
|
||
.. raw:: html | ||
|
||
<div class="clearer"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
API | ||
=== | ||
|
||
.. currentmodule:: skore | ||
|
||
This page lists all the public functions and classes of the ``skore`` | ||
package. | ||
|
||
Project | ||
------- | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
:template: class.rst | ||
:nosignatures: | ||
|
||
Project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = "skore" | ||
copyright = "2024, Probabl team" | ||
author = "Probabl team" | ||
release = "0.1.1" | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
"sphinx_gallery.gen_gallery", | ||
"sphinx.ext.autosummary", | ||
"sphinx.ext.intersphinx", | ||
"numpydoc", | ||
"sphinx_design", | ||
] | ||
templates_path = ["_templates"] | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ["_templates"] | ||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = "pydata_sphinx_theme" | ||
html_static_path = ["_static"] | ||
|
||
html_css_files = [ | ||
"css/custom.css", | ||
] | ||
html_js_files = [] | ||
|
||
# sphinx_gallery options | ||
sphinx_gallery_conf = { | ||
"examples_dirs": "../examples", # path to example scripts | ||
"gallery_dirs": "auto_examples", # path to gallery generated output | ||
} | ||
|
||
# intersphinx configuration | ||
intersphinx_mapping = { | ||
"sklearn": ("https://scikit-learn.org/stable/", None), | ||
} | ||
|
||
numpydoc_show_class_members = False | ||
|
||
html_title = "skore" | ||
|
||
html_theme_options = { | ||
"announcement": ( | ||
"https://raw.githubusercontent.com/soda-inria/hazardous/main/doc/announcement.html" | ||
), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
:mod:`skore`.Project | ||
=========================== | ||
|
||
.. rst-class:: side_comment | ||
|
||
Usage examples at the bottom of this page. | ||
|
||
.. currentmodule:: skore | ||
|
||
.. autoclass:: Project | ||
:inherited-members: | ||
|
||
|
||
|
||
|
||
|
||
.. raw:: html | ||
|
||
<div class="clearer"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. _getting_started: | ||
|
||
Getting started | ||
=============== | ||
|
||
.. currentmodule:: skore | ||
|
||
From your shell, initialize a skore project, here named ``project.skore``, that | ||
will be in your current working directory: | ||
|
||
.. code:: console | ||
|
||
python -m skore create "project.skore" | ||
|
||
Then, from your Python code (in the same directory), load the project and store | ||
an integer for example: | ||
|
||
.. code-block:: python | ||
|
||
from skore import load | ||
project = load("project.skore") | ||
project.put("my_int", 3) | ||
|
||
Finally, from your shell (in the same directory), start the UI locally: | ||
|
||
.. code:: console | ||
|
||
python -m skore launch project.skore | ||
|
||
This will automatically open a browser at the UI's location: | ||
|
||
#. On the top left, create a new ``View``. | ||
#. From the ``Elements`` section on the bottom left, you can add stored items to this view, either by double-cliking on them or by doing drag-and-drop. | ||
|
||
.. image:: https://raw.githubusercontent.com/sylvaincom/sylvaincom.github.io/master/files/probabl/skore/2024_10_14_skore_demo.gif | ||
:alt: Getting started with ``skore`` demo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.. You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
|
||
Welcome to ``skore`` | ||
==================== | ||
|
||
#OwnYourDataScience | ||
------------------- | ||
|
||
.. container:: index-features | ||
|
||
* track and visualize your objects from a user-friendly dashboard | ||
|
||
* scikit-learn compatible | ||
|
||
With ``skore``, data scientists can: | ||
|
||
#. Store objects of different types from their Python code: python lists, ``scikit-learn`` fitted pipelines, ``plotly`` figures, and more. | ||
#. **Track** and **visualize** these stored objects on a user-friendly dashboard. | ||
#. Export the dashboard to a HTML file. | ||
|
||
These are only the first features: skore is a work in progress and aims to be | ||
an end-to-end library for data scientists. | ||
Stay tuned! | ||
|
||
- License: BSD | ||
- GitHub repository: https://github.com/probabl-ai/skore | ||
- Discord: http://discord.probabl.ai | ||
- Status: under development, API is subject to change without notice. | ||
|
||
.. image:: https://raw.githubusercontent.com/sylvaincom/sylvaincom.github.io/master/files/probabl/skore/2024_10_14_skore_demo.gif | ||
:alt: Getting started with ``skore`` demo | ||
|
||
.. currentmodule:: skore | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
install | ||
getting_started | ||
auto_examples/index | ||
user_guide | ||
api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. _install: | ||
|
||
Install | ||
======= | ||
|
||
.. currentmodule:: skore | ||
|
||
First of all, we recommend using a `virtual environment (venv) <https://docs.python.org/3/tutorial/venv.html>`_. | ||
You need ``python>=3.9``. | ||
|
||
Then, you can install ``skore`` by using `pip``: | ||
|
||
.. code:: console | ||
|
||
pip install -U skore | ||
|
||
You can check ``skore``'s latest version on `PyPI <https://pypi.org/project/skore/>`_. | ||
|
||
🚨 For Windows users, the encoding must be set to | ||
`UTF-8 <https://docs.python.org/3/using/windows.html#utf-8-mode>`_: | ||
see `PYTHONUTF8 <https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUTF8>`_. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a file called
.gitkeep
would achieve the same result?