Skip to content
Merged
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
7 changes: 4 additions & 3 deletions conda_recipe_v2_schema/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ class BaseSource(StrictBaseModel):
target_directory: NonEmptyStr | None = Field(
None, description="The location in the working directory to place the source"
)
filter: Glob = Field(
None,
description="Glob patterns to include or exclude files from the extracted source.",
)


class AttestationConfig(StrictBaseModel):
Expand Down Expand Up @@ -165,9 +169,6 @@ class LocalSource(BaseSource):
None,
description="A file name to rename the file to (does not apply to archives).",
)
filter: Glob = Field(
None, description="Glob patterns to include or exclude files from the package."
)


Source = UrlSource | GitSource | LocalSource
Expand Down
217 changes: 186 additions & 31 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,37 @@
"description": "The location in the working directory to place the source",
"title": "Target Directory"
},
"filter": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
},
{
"items": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
}
]
},
"type": "array"
},
{
"$ref": "#/$defs/GlobDict"
}
],
"default": null,
"description": "Glob patterns to include or exclude files from the extracted source.",
"title": "Filter"
},
"git": {
"anyOf": [
{
Expand Down Expand Up @@ -1719,6 +1750,37 @@
"description": "The location in the working directory to place the source",
"title": "Target Directory"
},
"filter": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
},
{
"items": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
}
]
},
"type": "array"
},
{
"$ref": "#/$defs/GlobDict"
}
],
"default": null,
"description": "Glob patterns to include or exclude files from the extracted source.",
"title": "Filter"
},
"git": {
"anyOf": [
{
Expand Down Expand Up @@ -1836,6 +1898,37 @@
"description": "The location in the working directory to place the source",
"title": "Target Directory"
},
"filter": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
},
{
"items": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
}
]
},
"type": "array"
},
{
"$ref": "#/$defs/GlobDict"
}
],
"default": null,
"description": "Glob patterns to include or exclude files from the extracted source.",
"title": "Filter"
},
"git": {
"anyOf": [
{
Expand Down Expand Up @@ -1953,6 +2046,37 @@
"description": "The location in the working directory to place the source",
"title": "Target Directory"
},
"filter": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
},
{
"items": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
}
]
},
"type": "array"
},
{
"$ref": "#/$defs/GlobDict"
}
],
"default": null,
"description": "Glob patterns to include or exclude files from the extracted source.",
"title": "Filter"
},
"git": {
"anyOf": [
{
Expand Down Expand Up @@ -2528,6 +2652,37 @@
"description": "The location in the working directory to place the source",
"title": "Target Directory"
},
"filter": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
},
{
"items": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
}
]
},
"type": "array"
},
{
"$ref": "#/$defs/GlobDict"
}
],
"default": null,
"description": "Glob patterns to include or exclude files from the extracted source.",
"title": "Filter"
},
"path": {
"description": "A path on the local machine that contains the source.",
"title": "Path",
Expand Down Expand Up @@ -2592,37 +2747,6 @@
"default": null,
"description": "A file name to rename the file to (does not apply to archives).",
"title": "File Name"
},
"filter": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
},
{
"items": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
}
]
},
"type": "array"
},
{
"$ref": "#/$defs/GlobDict"
}
],
"default": null,
"description": "Glob patterns to include or exclude files from the package.",
"title": "Filter"
}
},
"required": [
Expand Down Expand Up @@ -4594,6 +4718,37 @@
"description": "The location in the working directory to place the source",
"title": "Target Directory"
},
"filter": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
},
{
"items": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"$ref": "#/$defs/IfStatement"
}
]
},
"type": "array"
},
{
"$ref": "#/$defs/GlobDict"
}
],
"default": null,
"description": "Glob patterns to include or exclude files from the extracted source.",
"title": "Filter"
},
"url": {
"anyOf": [
{
Expand Down