Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
11 changes: 11 additions & 0 deletions schema/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ class Workspace(StrictBaseModel):
description="The required version spec for pixi itself to resolve and build the project.",
examples=[">=0.40"],
)
target: dict[TargetName, WorkspaceTarget] | None = Field(
None, description="The workspace targets"
)


########################
Expand Down Expand Up @@ -480,6 +483,14 @@ class Activation(StrictBaseModel):
TargetName = NonEmptyStr


class WorkspaceTarget(StrictBaseModel):
"""Target-specific configuration for a workspace"""

build_variants: dict[NonEmptyStr, list[str]] | None = Field(
None, description="The build variants for this workspace target"
)


class Target(StrictBaseModel):
"""A machine-specific configuration of dependencies and tasks"""

Expand Down
33 changes: 33 additions & 0 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2311,6 +2311,17 @@
"$ref": "#/$defs/S3Options"
}
},
"target": {
"title": "Target",
"description": "The workspace targets",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/WorkspaceTarget"
},
"propertyNames": {
"minLength": 1
}
},
"version": {
"title": "Version",
"description": "The version of the project; we advise use of [SemVer](https://semver.org)",
Expand Down Expand Up @@ -2338,6 +2349,28 @@
"const": true
}
}
},
"WorkspaceTarget": {
"title": "WorkspaceTarget",
"description": "Target-specific configuration for a workspace",
"type": "object",
"additionalProperties": false,
"properties": {
"build-variants": {
"title": "Build-Variants",
"description": "The build variants for this workspace target",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
},
"propertyNames": {
"minLength": 1
}
}
}
}
}
}
Loading