Skip to content
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

[fractal-server v2.7] Update GET for tasks (for tasks page) #579

Open
tcompa opened this issue Oct 9, 2024 · 1 comment
Open

[fractal-server v2.7] Update GET for tasks (for tasks page) #579

tcompa opened this issue Oct 9, 2024 · 1 comment

Comments

@tcompa
Copy link
Collaborator

tcompa commented Oct 9, 2024

No description provided.

@tcompa
Copy link
Collaborator Author

tcompa commented Oct 9, 2024

  • Call GET /api/v2/task-group/
  • Backend will only include task groups which the user has access to
  • Each object in the response-body list is a TaskGroupReadV2:
class TaskGroupReadV2(BaseModel):

    id: int
    task_list: list[TaskReadV2]

    user_id: int
    user_group_id: Optional[int] = None

    origin: Literal["pypi", "wheel-file", "other"]
    pkg_name: str
    version: Optional[str] = None
    python_version: Optional[str] = None
    path: Optional[str] = None
    venv_path: Optional[str] = None
    pip_extras: Optional[str] = None

    active: bool
    timestamp_created: datetime
  • Attributes that should be there in the first view:

    • pkg_name
    • version
    • active
    • group name associated to user_group_id (if any)
  • Items with the same pkg_name should be aggregated for different version

  • To the right of the table row, we can "info" (show all attributes), "edit" (ref [fractal-server v2.7] PATCH task-group (unit) #580), or "delete" a taskgroup.

  • Task list is available but not shown by default. It can be expanded.

  • TaskReadV2 is like this

class TaskReadV2(BaseModel):
    id: int
    name: str
    type: Literal["parallel", "non_parallel", "compound"]
    source: str
    version: Optional[str] = None

    command_non_parallel: Optional[str] = None
    command_parallel: Optional[str] = None
    meta_parallel: dict[str, Any]
    meta_non_parallel: dict[str, Any]
    args_schema_non_parallel: Optional[dict[str, Any]] = None
    args_schema_parallel: Optional[dict[str, Any]] = None
    args_schema_version: Optional[str] = None
    docs_info: Optional[str] = None
    docs_link: Optional[HttpUrl] = None
    input_types: dict[str, bool]
    output_types: dict[str, bool]

    taskgroupv2_id: Optional[int] = None

    category: Optional[str] = None
    modality: Optional[str] = None
    authors: Optional[str] = None
    tags: list[str]
  • The version of single tasks and of task group must be identical, this has to be guaranteed backend-side. If not, it's a fractal-server bug.

  • Ordering: primarily ordered by pkg_name


Disambiguation of multiple copies of the same taskgroup (ref fractal-analytics-platform/fractal-server#1859) is TBD in a different issue.

@tcompa tcompa changed the title [fractal-server v2.7] Update GET for tasks (for tasks page) / placeholder [fractal-server v2.7] Update GET for tasks (for tasks page) Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant