Skip to content

Dumps

Dump models differ from their Read counterpart in that: * They are directly JSON-able, without any additional encoder. * They may include only a subset of the available fields.

These models are used in at least two situations: 1. In the "*_dump" attributes of Job models; 2. In the history items, to trim their size.

CLASS DESCRIPTION
DatasetDump

We do not include 'model_config = ConfigDict(extra="forbid")' because

TaskDump

We keep version: str | None to support task dumps created with

TaskGroupDump

We keep version: str | None to support task-group dumps created with

WorkflowTaskDump

We do not include 'model_config = ConfigDict(extra="forbid")'

Classes

DatasetDump pydantic-model

Bases: BaseModel

We do not include 'model_config = ConfigDict(extra="forbid")' because legacy data may include 'type_filters' or 'attribute_filters' and we want to avoid response-validation errors.

Fields:

  • id (int)
  • name (str)
  • project_id (int)
  • timestamp_created (str)
  • zarr_dir (str)
Source code in fractal_server/app/schemas/v2/dumps.py
class DatasetDump(BaseModel):
    """
    We do not include 'model_config = ConfigDict(extra="forbid")' because
    legacy data may include 'type_filters' or 'attribute_filters' and we
    want to avoid response-validation errors.
    """

    id: int
    name: str
    project_id: int
    timestamp_created: str
    zarr_dir: str

TaskDump pydantic-model

Bases: BaseModel

We keep version: str | None to support task dumps created with fractal-server 2.22.* (where version was nullable).

Fields:

Source code in fractal_server/app/schemas/v2/dumps.py
class TaskDump(BaseModel):
    """
    We keep `version: str | None` to support task dumps created with
    fractal-server 2.22.* (where `version` was nullable).
    """

    id: int
    name: str
    type: TaskType

    command_non_parallel: str | None = None
    command_parallel: str | None = None
    version: str | None = None

    input_types: dict[str, bool]
    output_types: dict[str, bool]

TaskGroupDump pydantic-model

Bases: BaseModel

We keep version: str | None to support task-group dumps created with fractal-server 2.22.* (where version was nullable).

Fields:

  • id (int)
  • origin (TaskGroupOriginEnum)
  • pkg_name (str)
  • version (str | None)
  • python_version (str | None)
  • pip_extras (str | None)
  • pinned_package_versions_pre (dict[str, str])
  • pinned_package_versions_post (dict[str, str])
  • path (str | None)
  • venv_path (str | None)
  • archive_path (str | None)
Source code in fractal_server/app/schemas/v2/dumps.py
class TaskGroupDump(BaseModel):
    """
    We keep `version: str | None` to support task-group dumps created with
    fractal-server 2.22.* (where `version` was nullable).
    """

    id: int
    origin: TaskGroupOriginEnum
    pkg_name: str
    version: str | None = None
    python_version: str | None = None
    pip_extras: str | None = None
    pinned_package_versions_pre: dict[str, str] = Field(default_factory=dict)
    pinned_package_versions_post: dict[str, str] = Field(default_factory=dict)

    path: str | None = None
    venv_path: str | None = None
    archive_path: str | None = None

WorkflowTaskDump pydantic-model

Bases: BaseModel

We do not include 'model_config = ConfigDict(extra="forbid")' because legacy data may include 'input_filters' field and we want to avoid response-validation errors for the endpoints that GET datasets.

Fields:

Source code in fractal_server/app/schemas/v2/dumps.py
class WorkflowTaskDump(BaseModel):
    """
    We do not include 'model_config = ConfigDict(extra="forbid")'
    because legacy data may include 'input_filters' field and we want to avoid
    response-validation errors for the endpoints that GET datasets.
    """

    id: int
    workflow_id: int
    order: int | None = None

    type_filters: dict[str, bool]

    task_id: int | None = None
    task: TaskDump | None = None