Skip to content

Commit fbb5b05

Browse files
Update hatch.json schema (SchemaStore#5126)
* Update `hatch.json` schema * Add tests
1 parent f47ddbb commit fbb5b05

File tree

4 files changed

+38
-4
lines changed

4 files changed

+38
-4
lines changed

src/schemas/json/hatch.json

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@
5757
}
5858
},
5959
"type": "boolean"
60+
},
61+
"hooks": {
62+
"title": "Metadata Hook Plugins",
63+
"description": "Configuration for plugin hooks that allow for the modification of project metadata after it has been loaded",
64+
"x-taplo": {
65+
"links": {
66+
"key": "https://hatch.pypa.io/latest/plugins/metadata-hook"
67+
}
68+
},
69+
"type": "object",
70+
"additionalProperties": true
6071
}
6172
}
6273
},
@@ -528,6 +539,17 @@
528539
"additionalProperties": {
529540
"type": "string"
530541
}
542+
},
543+
"bypass-selection": {
544+
"title": "Bypass Selection",
545+
"description": "Whether or not to suppress the error when one has not defined any file selection options and all heuristics have failed to determine what to ship",
546+
"x-taplo": {
547+
"links": {
548+
"key": "https://hatch.pypa.io/latest/plugins/builder/wheel/#options"
549+
}
550+
},
551+
"type": "boolean",
552+
"default": false
531553
}
532554
}
533555
},
@@ -598,9 +620,9 @@
598620
}
599621
}
600622
},
601-
"Hooks": {
602-
"title": "Hooks",
603-
"description": "Build hooks",
623+
"BuildHooks": {
624+
"title": "Build Hook Plugins",
625+
"description": "Configuration for plugin hooks that will be executed at various stages of the build process",
604626
"x-taplo": {
605627
"links": {
606628
"key": "https://hatch.pypa.io/latest/config/build/#build-hooks"
@@ -726,13 +748,14 @@
726748
"$ref": "#/definitions/CustomTargets"
727749
},
728750
"hooks": {
729-
"$ref": "#/definitions/Hooks"
751+
"$ref": "#/definitions/BuildHooks"
730752
}
731753
}
732754
},
733755
"Version": {
734756
"title": "Version",
735757
"description": "Version configuration",
758+
"additionalProperties": true,
736759
"x-taplo": {
737760
"links": {
738761
"key": "https://hatch.pypa.io/latest/version/#configuration"

src/test/hatch/metadata-hooks.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#:schema ../../schemas/json/hatch.json
2+
[metadata.hooks]
3+
custom = { readme-path = "README.adoc" }
4+
docstring-description = {}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#:schema ../../schemas/json/hatch.json
2+
[version]
3+
raw-options = { local_scheme = "no-local-version", version_scheme = "python-simplified-semver" }
4+
source = "vcs"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#:schema ../../schemas/json/hatch.json
2+
[build.targets.wheel]
3+
bypass-selection = true

0 commit comments

Comments
 (0)