Skip to content

Commit

Permalink
docs: Refine the docstring of open (#1149)
Browse files Browse the repository at this point in the history
*Very small PR*
  • Loading branch information
sylvaincom authored Jan 17, 2025
1 parent 0214b92 commit 4bd8f2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion examples/getting_started/plot_quick_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

# %%
# This will create a skore project directory named ``quick_start.skore`` in your
# current working directory.
# current working directory and overwrite any pre-existing project with the
# same path.

# %%
# Evaluate your model using skore's :class:`~skore.CrossValidationReporter`:
Expand Down
9 changes: 6 additions & 3 deletions skore/src/skore/project/open.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ def open(
) -> Project:
"""Open a project given a project name or path.
This function creates the project if it does not exist, and it overwrites
a pre-existing project if ``overwrite`` is set to ``True``.
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, default="project.skore"
The relative or absolute path of the project.
create: bool, default=True
Create the project if it does not exist.
Whether or not to create the project, if it does not already exist.
overwrite: bool, default=False
Overwrite the project file if it already exists and ``create`` is ``True``.
Has no effect otherwise.
Expand Down

0 comments on commit 4bd8f2f

Please sign in to comment.