# Task input fields (internal API)

class debusine.tasks.inputs.SingleInput(*, categories: Collection[ArtifactCategory] | None = None, **kwargs: Unpack[DataFieldInputKwargs])

  Bases: `BaseArtifactInput`[`int` | `str`, `InputArtifactSingle`]

  One single input artifact specified in a task data field.

  get_artifact_ids(value: InputArtifactSingle) → list[int]

    Return artifact IDs.

  lookup_type: type[LookupType] = int | str
  resolve(resolver: FieldResolver) → InputArtifactSingle

    Resolve the input from task data.

  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.PydanticSerializer object>

class debusine.tasks.inputs.OptionalSingleInput(*, categories: Collection[ArtifactCategory] | None = None, **kwargs: Unpack[DataFieldInputKwargs])

  Bases: `BaseArtifactInput`[`int` | `str`, `InputArtifactSingle` | `None`]

  One optional single input artifact specified in a task data field.

  get_artifact_ids(value: InputArtifactSingle | None) → list[int]

    Return artifact IDs.

  lookup_type: type[LookupType] = int | str
  resolve(resolver: FieldResolver) → InputArtifactSingle | None

    Resolve the input from task data.

  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.OptionalPydanticSerializer object>

class debusine.tasks.inputs.SingleInputList(*, categories: Collection[ArtifactCategory] | None = None, **kwargs: Unpack[DataFieldInputKwargs])

  Bases: `ArtifactListInput`[`int` | `str`, `list`[`InputArtifactSingle`]]

  A list of single input artifact lookups in a task data field.

  get_artifact_ids(value: list[InputArtifactSingle]) → list[int]

    Return artifact IDs.

  item_type: type[LookupType] = int | str
  lookup_type

    alias of `Collection`

  resolve(resolver: FieldResolver) → list[InputArtifactSingle]

    Resolve the input from task data.

  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.PydanticListSerializer object>

class debusine.tasks.inputs.MultiInput(*, categories: Collection[ArtifactCategory] | None = None, **kwargs: Unpack[DataFieldInputKwargs])

  Bases: `BaseArtifactInput`[`LookupMultiple`, `InputArtifactMultiple`]

  A list of multiple artifacts lookups specified in a task data field.

  get_artifact_ids(value: InputArtifactMultiple) → list[int]

    Return artifact IDs.

  lookup_type

    alias of `LookupMultiple`

  resolve(resolver: FieldResolver) → InputArtifactMultiple

    Resolve the input from task data.

  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.PydanticSerializer object>

class debusine.tasks.inputs.MultiInputList(*, categories: Collection[ArtifactCategory] | None = None, **kwargs: Unpack[DataFieldInputKwargs])

  Bases: `ArtifactListInput`[`LookupMultiple`, `list`[`InputArtifactMultiple`]]

  A multiple artifacts lookup specified in a task data field.

  get_artifact_ids(value: list[InputArtifactMultiple]) → list[int]

    Return artifact IDs.

  item_type

    alias of `LookupMultiple`

  lookup_type

    alias of `Collection`

  resolve(resolver: FieldResolver) → list[InputArtifactMultiple]

    Resolve the input from task data.

  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.MultiInputListSerializer object>

class debusine.tasks.inputs.UploadArtifactsInput(**kwargs: Unpack[BaseArtifactInputKwargs])

  Bases: `BaseArtifactInput`[`LookupMultiple`, `InputArtifactMultiple`]

  A multiple artifact lookup finding all related binaries in an upload.

  __init__(**kwargs: Unpack[BaseArtifactInputKwargs]) → None

    Look up artifacts enforcing their type.

    Parameters:

      - field – dot-separated list of lookup names in task data

      - categories – list of acceptable artifact categories

  lookup_type

    alias of `LookupMultiple`

  resolve(resolver: FieldResolver) → InputArtifactMultiple

    Resolve the input from task data.

  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.PydanticSerializer object>

class debusine.tasks.inputs.EnvironmentInput(*, image_category: ExecutorImageCategory | None = None, set_backend: bool = True, try_variant: bool = True, **kwargs: Unpack[BaseArtifactInputKwargs])

  Bases: `BaseArtifactInput`[`int` | `str`, `InputArtifactSingle`]

  One environment artifact specified in a task data field.

  __init__(*, image_category: ExecutorImageCategory | None = None, set_backend: bool = True, try_variant: bool = True, **kwargs: Unpack[BaseArtifactInputKwargs]) → None

    Look up artifacts enforcing their type.

    Parameters:

      - field – dot-separated list of lookup names in task data

      - categories – list of acceptable artifact categories

      - image_category – try to use an environment with this image category; defaults to the image category needed by the executor for self.backend

      - set_backend – if True (default), try to use an environment matching self.backend

      - try_variant – if True (default), try to use an environment whose variant is self.name, but fall back to looking up an environment without a variant if the first lookup fails

  get_artifact_ids(value: InputArtifactSingle) → list[int]

    Return artifact IDs.

  get_resolver_method(resolver: FieldResolver) → Callable[[Self], InputArtifactSingle]

    Override this to forward to a FieldResolver method.

  lookup_type: type[LookupType] = int | str
  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.PydanticSerializer object>

class debusine.tasks.inputs.OptionalEnvironmentInput(*, categories: Collection[ArtifactCategory] | None = None, **kwargs: Unpack[DataFieldInputKwargs])

  Bases: `BaseArtifactInput`[`int` | `str`, `InputArtifactSingle` | `None`]

  One optional environment artifact specified in a task data field.

  get_resolver_method(resolver: FieldResolver) → Callable[[Self], InputArtifactSingle | None]

    Override this to forward to a FieldResolver method.

  lookup_type: type[LookupType] = int | str
  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.OptionalPydanticSerializer object>

class debusine.tasks.inputs.SuiteArchiveInput(field: str | None = None, **kwargs: Unpack[TaskInputKwargs])

  Bases: `DataFieldInput`[`int` | `str`, `tuple`[`InputCollectionSingle`, `InputCollectionSingle` | `None`]]

  Look up a suite and an archive based on a task data field.

  get_resolver_method(resolver: FieldResolver) → Callable[[Self], tuple[InputCollectionSingle, InputCollectionSingle | None]]

    Override this to forward to a FieldResolver method.

  lookup_type: type[LookupType] = int | str
  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.SuiteArchiveInputSerializer object>

class debusine.tasks.inputs.ExtraRepositoriesInput(field: str | None = None, **kwargs: Unpack[TaskInputKwargs])

  Bases: `DataFieldInput`[`list`[`ExtraDebusineRepository` | `ExtraExternalRepository`], `list`[`ExtraExternalRepository`] | `None`]

  Look up extra repositories.

  get_resolver_method(resolver: FieldResolver) → Callable[[Self], list[ExtraExternalRepository] | None]

    Override this to forward to a FieldResolver method.

  lookup_type

    alias of `list`

  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.ExtraRepositoriesSerializer object>

class debusine.tasks.inputs.DebusineFQDNInput(stage: Stage = Stage.RUNNING, verbose_name: str | None = None, help_text: str | None = None, hidden: bool = False, internal: bool = False)

  Bases: `TaskInput`[`str`]

  Resolve to the Debusine FQDN.

  resolve(resolver: FieldResolver) → str

    Resolve the input from task data.

  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.ScalarSerializer object>

class debusine.tasks.inputs.BuildArchitectureInput(field: str | None = None, **kwargs: Unpack[TaskInputKwargs])

  Bases: `DataFieldInput`[`str`, `str`]

  Build architecture for the task.

  This currently looks up a value in the task data, and uses a fallback value if it is not set.

  lookup_type

    alias of `str`

  resolve(resolver: FieldResolver) → str

    Resolve the input from task data.

  serializer: ClassVar[TaskInputSerializer] = <debusine.tasks.inputs.serializers.ScalarSerializer object>