Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions api/specs/web-server/_computations.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
from models_library.api_schemas_webserver.computations import (
ComputationGet,
ComputationPathParams,
ComputationRunIterationsLatestListQueryParams,
ComputationRunIterationsListQueryParams,
ComputationRunPathParams,
ComputationRunRestGet,
ComputationRunWithFiltersListQueryParams,
ComputationStart,
ComputationStarted,
ComputationTaskRestGet,
)
from models_library.generics import Envelope
from simcore_service_webserver._meta import API_VTAG
from simcore_service_webserver.director_v2._controller.computations_rest import (
ComputationRunListQueryParams,
ComputationTaskListQueryParams,
ComputationTaskPathParams,
)
Expand Down Expand Up @@ -71,7 +71,9 @@ async def stop_computation(_path: Annotated[ComputationPathParams, Depends()]):
response_model=Page[ComputationRunRestGet],
)
async def list_computations_latest_iteration(
_query: Annotated[as_query(ComputationRunWithFiltersListQueryParams), Depends()],
_query: Annotated[
as_query(ComputationRunIterationsLatestListQueryParams), Depends()
],
): ...


Expand All @@ -80,7 +82,7 @@ async def list_computations_latest_iteration(
response_model=Page[ComputationRunRestGet],
)
async def list_computation_iterations(
_query: Annotated[as_query(ComputationRunListQueryParams), Depends()],
_query: Annotated[as_query(ComputationRunIterationsListQueryParams), Depends()],
_path: Annotated[ComputationRunPathParams, Depends()],
): ...

Expand Down
116 changes: 0 additions & 116 deletions api/specs/web-server/_projects_comments.py

This file was deleted.

1 change: 0 additions & 1 deletion api/specs/web-server/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"_nih_sparc_redirections",
"_projects",
"_projects_access_rights",
"_projects_comments",
"_projects_conversations",
"_projects_folders",
"_projects_metadata",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,20 @@ class ComputationRunListQueryParams(
): ...


class ComputationRunWithFiltersListQueryParams(ComputationRunListQueryParams):
class ComputationRunIterationsLatestListQueryParams(ComputationRunListQueryParams):
filter_only_running: bool = Field(
default=False,
description="If true, only running computations are returned",
)


class ComputationRunIterationsListQueryParams(ComputationRunListQueryParams):
include_children: bool = Field(
default=False,
description="If true, all tasks of the project and its children are returned (Currently supported only for root projects)",
)


class ComputationRunRestGet(OutputSchema):
project_uuid: ProjectID
iteration: int
Expand Down Expand Up @@ -128,7 +135,11 @@ class ComputationTaskPathParams(BaseModel):
class ComputationTaskListQueryParams(
PageQueryParameters,
ComputationTaskListOrderParams, # type: ignore[misc, valid-type]
): ...
):
include_children: bool = Field(
default=False,
description="If true, all tasks of the project and its children are returned (Currently supported only for root projects)",
)


class ComputationTaskRestGet(OutputSchema):
Expand Down
17 changes: 17 additions & 0 deletions packages/models-library/src/models_library/projects_metadata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from datetime import datetime
from typing import Any

from pydantic import BaseModel

from .projects import ProjectID


class ProjectsMetadataDBGet(BaseModel):
project_uuid: ProjectID
custom: dict[str, Any]
created: datetime
modified: datetime
parent_project_uuid: ProjectID
parent_node_id: ProjectID
root_parent_project_uuid: ProjectID
root_parent_node_id: ProjectID
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""add index to projects_metadata

Revision ID: 4e7d8719855b
Revises: e98c45ff314f
Create Date: 2025-05-21 11:48:34.062860+00:00

"""

from alembic import op

# revision identifiers, used by Alembic.
revision = "4e7d8719855b"
down_revision = "e98c45ff314f"
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_index(
"idx_projects_metadata_root_parent_project_uuid",
"projects_metadata",
["root_parent_project_uuid"],
unique=False,
)
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(
"idx_projects_metadata_root_parent_project_uuid", table_name="projects_metadata"
)
# ### end Alembic commands ###
Loading
Loading