Skip to content

Commit

Permalink
Merge branch 'main' into some_docs_improv
Browse files Browse the repository at this point in the history
  • Loading branch information
rouk1 authored Jan 22, 2025
2 parents 2483627 + cde3193 commit 82c1501
Show file tree
Hide file tree
Showing 17 changed files with 616 additions and 96 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
SKRUB_DATA_URL: https://skore.probabl.ai/f355443be646d49eab1aa76e29dfd0a8/skrub-data.tar.gz
HOME: ${{ github.workspace }}
- uses: ./.github/actions/sphinx/build
timeout-minutes: 10
timeout-minutes: 60
with:
SPHINX_VERSION: ${{ needs.sphinx-version.outputs.SPHINX_VERSION }}
SPHINX_RELEASE: ${{ needs.sphinx-version.outputs.SPHINX_RELEASE }}
Expand Down
11 changes: 10 additions & 1 deletion examples/getting_started/plot_quick_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# %%
import skore

my_project = skore.open("quick_start", overwrite=True)
my_project = skore.open("my_project", create=True)

# %%
# This will create a skore project directory named ``quick_start.skore`` in your
Expand Down Expand Up @@ -69,3 +69,12 @@
# .. admonition:: What's next?
#
# For a more in-depth guide, see our :ref:`example_skore_getting_started` page!

# %%
# Cleanup the project
# -------------------
#
# Let's clear the skore project (to avoid any conflict with other documentation examples).

# %%
my_project.clear()
33 changes: 4 additions & 29 deletions examples/getting_started/plot_skore_getting_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,38 +34,13 @@
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

# %%
# .. note::
#
# If we do not wish for our skore project to be stored in a *temporary* folder, we
# can simply create and load the project in the current directory with:
#
# .. code-block:: python
#
# import skore
#
# my_project = skore.open("my_project")
#
# This would create a skore project directory named ``my_project.skore`` in our
# Let's start by creating a skore project directory named ``my_project.skore`` in our
# current directory.

# %%
# Here, we start by creating a temporary directory to store our project so that we can
# easily clean it after executing this example:

# %%
import tempfile
from pathlib import Path

temp_dir = tempfile.TemporaryDirectory(prefix="skore_example_")
temp_dir_path = Path(temp_dir.name)

# %%
# Then, we create and load the skore project from this temporary directory:

# %%
import skore

my_project = skore.open(temp_dir_path / "my_project")
my_project = skore.open("my_project", create=True)

# %%
# Now that the project exists, we can write some Python code (in the same
Expand Down Expand Up @@ -347,7 +322,7 @@
# Cleanup the project
# -------------------
#
# Removing the temporary directory:
# Let's clear the skore project (to avoid conflict with other documentation examples).

# %%
temp_dir.cleanup()
my_project.clear()
19 changes: 4 additions & 15 deletions examples/getting_started/plot_tracking_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,12 @@
# ======================================

# %%
# We start by creating a temporary directory to store our project so that we can
# easily clean it after executing this example:

# %%
import tempfile
from pathlib import Path

temp_dir = tempfile.TemporaryDirectory(prefix="skore_example_")
temp_dir_path = Path(temp_dir.name)

# %%
# We create and load the skore project from this temporary directory:
# We create and load the skore project in the current directory:

# %%
import skore

my_project = skore.open(temp_dir_path / "my_project")
my_project = skore.open("my_project", create=True)

# %%
# Tracking an integer
Expand Down Expand Up @@ -130,7 +119,7 @@
# Cleanup the project
# -------------------
#
# Removing the temporary directory:
# Let's clear the skore project (to avoid any conflict with other documentation examples).

# %%
temp_dir.cleanup()
my_project.clear()
19 changes: 4 additions & 15 deletions examples/getting_started/plot_working_with_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,12 @@
# ======================================

# %%
# We start by creating a temporary directory to store our project so that we can
# easily clean it after executing this example:

# %%
import tempfile
from pathlib import Path

temp_dir = tempfile.TemporaryDirectory(prefix="skore_example_")
temp_dir_path = Path(temp_dir.name)

# %%
# We create and load the skore project from this temporary directory:
# We create and load the skore project from the current directory:

# %%
import skore

my_project = skore.open(temp_dir_path / "my_project")
my_project = skore.open("my_project", create=True)

# %%
# Storing integers
Expand Down Expand Up @@ -369,7 +358,7 @@ def my_func(x):
# Cleanup the project
# -------------------
#
# Removing the temporary directory:
# Let's clean the skore project to avoid conflict with other examples.

# %%
temp_dir.cleanup()
my_project.clear()
19 changes: 4 additions & 15 deletions examples/model_evaluation/plot_cross_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,12 @@
# ======================================

# %%
# We start by creating a temporary directory to store our project so that we can
# easily clean it after executing this example:

# %%
import tempfile
from pathlib import Path

temp_dir = tempfile.TemporaryDirectory(prefix="skore_example_")
temp_dir_path = Path(temp_dir.name)

# %%
# We create and load the skore project from this temporary directory:
# We create and load the skore project from the current directory:

# %%
import skore

my_project = skore.open(temp_dir_path / "my_project")
my_project = skore.open("my_project", create=True)

# %%
# Cross-validation in scikit-learn
Expand Down Expand Up @@ -170,7 +159,7 @@
# Cleanup the project
# -------------------
#
# Removing the temporary directory:
# Let's clear the skore project (to avoid any conflict with other documentation examples).

# %%
temp_dir.cleanup()
my_project.clear()
20 changes: 4 additions & 16 deletions examples/model_evaluation/plot_train_test_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,13 @@
# %%
# Creating and loading the skore project
# ======================================

# %%
# We start by creating a temporary directory to store our project so that we can
# easily clean it after executing this example:

# %%
import tempfile
from pathlib import Path

temp_dir = tempfile.TemporaryDirectory(prefix="skore_example_")
temp_dir_path = Path(temp_dir.name)

# %%
# We create and load the skore project from this temporary directory:
# We create and load the skore project from the current directory:

# %%
import skore

my_project = skore.open(temp_dir_path / "my_project")
my_project = skore.open("my_project", create=True)

# %%
# Train-test split in scikit-learn
Expand Down Expand Up @@ -258,7 +246,7 @@
# Cleanup the project
# -------------------
#
# Removing the temporary directory:
# Let's clear the skore project (to avoid any conflict with other documentation examples).

# %%
temp_dir.cleanup()
my_project.clear()
5 changes: 5 additions & 0 deletions examples/technical_details/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Technical details
-----------------

These examples shows some technical details at the core of `skore` to better understand
some of the mechanic under the hood.
Loading

0 comments on commit 82c1501

Please sign in to comment.