Skip to content

Commit

Permalink
[skip ci] remove unecessary cli integration tests and remove open pro…
Browse files Browse the repository at this point in the history
…ject's function
  • Loading branch information
thomass-dev committed Jan 28, 2025
1 parent 6ddcda1 commit a10abe5
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 123 deletions.
3 changes: 1 addition & 2 deletions skore/src/skore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from rich.console import Console
from rich.theme import Theme

from skore.project import Project, open
from skore.project import Project
from skore.sklearn import (
CrossValidationReport,
CrossValidationReporter,
Expand All @@ -19,7 +19,6 @@
"CrossValidationReporter",
"CrossValidationReport",
"EstimatorReport",
"open",
"Project",
"show_versions",
"train_test_split",
Expand Down
2 changes: 1 addition & 1 deletion skore/src/skore/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def argumentparser():

parser.add_argument(
"project_name",
help="the name or path of the project to open",
help="the name or path of the project to be created or opened",
)

parser.add_argument(
Expand Down
3 changes: 1 addition & 2 deletions skore/src/skore/project/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Alias top level function and class of the project submodule."""

from .project import Project, open
from .project import Project

__all__ = [
"open",
"Project",
]
11 changes: 0 additions & 11 deletions skore/src/skore/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@
logger.setLevel(INFO)


def open(path: Optional[Union[str, Path]] = "project.skore"):
path = Path(path)
path = path.with_suffix(".skore")
path = path.resolve()

if not path.exists():
raise FileNotFoundError

return Project(path, exist_ok=True)


class Project:
"""
A collection of items arranged in views and stored in a storage.
Expand Down
7 changes: 1 addition & 6 deletions skore/src/skore/ui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from fastapi.staticfiles import StaticFiles
from starlette.types import Lifespan

from skore.project import Project, open
from skore.project import Project
from skore.ui.dependencies import get_static_path
from skore.ui.project_routes import router as project_router

Expand All @@ -20,11 +20,6 @@ def create_app(
) -> FastAPI:
"""FastAPI factory used to create the API to interact with `stores`."""
app = FastAPI(lifespan=lifespan)

# Give the app access to the project
if not project:
project = open("project.skore")

app.state.project = project

# Enable CORS support on all routes, for all origins and methods.
Expand Down
33 changes: 0 additions & 33 deletions skore/tests/integration/cli/test_cli.py

This file was deleted.

43 changes: 0 additions & 43 deletions skore/tests/integration/cli/test_create.py

This file was deleted.

25 changes: 0 additions & 25 deletions skore/tests/integration/cli/test_quickstart.py

This file was deleted.

0 comments on commit a10abe5

Please sign in to comment.