{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://json.schemastore.org/hatch.json", "additionalProperties": false, "definitions": { "Platform": { "enum": ["linux", "windows", "macos"] }, "Format": { "title": "Format", "description": "Options for static analysis and formatting", "x-taplo": { "links": { "key": "https://hatch.pypa.io/dev/config/static-analysis/" } }, "type": "object", "properties": { "config-path": { "title": "Config-Path", "description": "Path to default configuration", "x-taplo": { "links": { "key": "https://hatch.pypa.io/dev/config/static-analysis/#persistent-config" } }, "type": "string" } } }, "Metadata": { "title": "Metadata", "description": "Metadata for the project", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/metadata/#metadata-options" } }, "type": "object", "properties": { "allow-direct-references": { "title": "Allow-Direct-References", "description": "Whether to allow direct references", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/metadata/#allowing-direct-references" } }, "type": "boolean" }, "allow-ambiguous-features": { "title": "Allow-Ambiguous-Features", "description": "Whether to allow ambiguous features", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/metadata/#allowing-ambiguous-features" } }, "type": "boolean" }, "hooks": { "title": "Metadata Hook Plugins", "description": "Configuration for plugin hooks that allow for the modification of project metadata after it has been loaded", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/plugins/metadata-hook" } }, "type": "object", "additionalProperties": true } } }, "Override": { "title": "Override", "description": "TODO" }, "Overrides": { "title": "Overrides", "description": "Overrides depending on things like platform, matrix variables, or environment variables", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/advanced/#option-overrides" } }, "type": "object", "patternProperties": { "env|matrix|name": { "type": "object", "additionalProperties": { "$ref": "#/definitions/Override" } } }, "properties": { "platform": { "type": "object", "propertyNames": { "$ref": "#/definitions/Platform" }, "additionalProperties": { "$ref": "#/definitions/Override" } } } }, "Env": { "title": "Env", "type": "object", "properties": { "template": { "title": "Template", "description": "Template environment to inherit from. Set to own name to make self referential (disable inheritance from “default”)", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#inheritance" } }, "type": "string", "default": "default" }, "detached": { "title": "Detached", "description": "Make the environment self-referential and skip project install", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#detached-environments" } }, "type": "boolean", "default": false }, "dependencies": { "title": "Dependencies", "description": "List of dependencies to install in the environment", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#dependencies" } }, "type": "array", "items": { "type": "string" } }, "extra-dependencies": { "title": "Extra dependencies", "description": "List of extra dependencies to install in the environment in addition to the template environment’s dependencies", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#dependencies" } }, "type": "array", "items": { "type": "string" } }, "features": { "title": "Features (extras)", "description": "List of optional dependency groups (extras) to install", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#features" } }, "type": "array", "items": { "type": "string" } }, "dev-mode": { "title": "Dev mode", "description": "Whether to install the project in development mode", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#dev-mode" } }, "type": "boolean", "default": true }, "skip-install": { "title": "Skip install", "description": "Whether to skip installing the project", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#skip-install" } }, "type": "boolean", "default": false }, "env-vars": { "title": "Environment variables", "description": "Environment variables to set", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#defined" } }, "type": "object", "additionalProperties": { "type": "string" } }, "env-include": { "title": "Environment variable include", "description": "Glob patterns of environment variables to include", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#filters" } }, "type": "array", "items": { "type": "string" } }, "env-exclude": { "title": "Environment variable exclude", "description": "Glob patterns of environment variables to exclude", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#filters" } }, "type": "array", "items": { "type": "string" } }, "scripts": { "title": "Scripts", "description": "Dictionary of scripts to run", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#scripts" } }, "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } }, "pre-install-commands": { "title": "Pre-install commands", "description": "List of commands to run before installing the project", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#pre-install" } }, "type": "array", "items": { "type": "string" } }, "post-install-commands": { "title": "Post-install commands", "description": "List of commands to run after installing the project", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#post-install" } }, "type": "array", "items": { "type": "string" } }, "python": { "title": "Python version", "description": "Python version to use or an absolute path to a python interpreter", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#python-version" } }, "type": "string" }, "platforms": { "title": "Platforms", "description": "List of platforms to build for", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#supported-platforms" } }, "type": "array", "items": { "$ref": "#/definitions/Platform" } }, "description": { "title": "Description", "description": "Description of the environment for the `env show` command", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#description" } }, "type": "string" }, "type": { "title": "Type", "description": "Type of environment. Without plugins, the only supported type is \"virtual\"", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/#type" } }, "type": "string", "default": "virtual" }, "matrix": { "title": "Matrix", "description": "Matrix of environments", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/advanced/#matrix" } }, "type": "array", "items": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } } }, "matrix-name-format": { "title": "Matrix name format", "description": "Format string for matrix names, supporting {variable} and {value} placeholders", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/advanced/#name-formatting" } }, "type": "string", "default": "{value}" }, "overrides": { "$ref": "#/definitions/Overrides" }, "requires": { "title": "Requires", "description": "Required environment plugins", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/plugins/environment/reference/#installation" } }, "type": "array", "items": { "type": "string" } } } }, "Envs": { "title": "Envs", "description": "Dictionary of environments", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/environment/overview/" } }, "type": "object", "additionalProperties": { "$ref": "#/definitions/Env" } }, "CollectorEnv": { "title": "CollectorEnv", "description": "Environment collector plugin configuration", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/plugins/environment-collector/" } }, "type": "object", "properties": { "collectors": { "title": "Collectors", "description": "Custom environment collectors", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/plugins/environment-collector/custom/" } }, "type": "object", "additionalProperties": { "type": "object" } }, "requires": { "title": "Requires", "description": "Required environment collectors for automatic management", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/plugins/environment-collector/reference/#installation" } }, "type": "array", "items": { "type": "string" } } } }, "Target": { "title": "Target", "type": "object", "properties": { "ignore-vcs": { "$ref": "#/definitions/IgnoreVcs" }, "include": { "$ref": "#/definitions/Include" }, "exclude": { "$ref": "#/definitions/Exclude" }, "artifacts": { "$ref": "#/definitions/Artifacts" }, "only-include": { "$ref": "#/definitions/OnlyInclude" }, "hooks": { "$ref": "#/definitions/BuildHooks" }, "dependencies": { "title": "Dependencies", "description": "Additional dependencies to install in the environment", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#dependencies" } }, "type": "array", "items": { "type": "string" } }, "require-runtime-dependencies": { "title": "Require runtime dependencies", "description": "Whether to install the project’s runtime dependencies", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#dependencies" } }, "type": "boolean", "default": false }, "require-runtime-features": { "title": "Required runtime features", "description": "A list of the project’s runtime features to install", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#dependencies" } }, "type": "array", "items": { "type": "string" } }, "versions": { "title": "Versions", "description": "List of versions to build", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#versions" } }, "type": "array", "items": { "type": "string" } }, "packages": { "title": "Packages", "description": "List of packages to build", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#packages" } }, "type": "array", "items": { "type": "string" } }, "force-include": { "title": "Force include", "description": "Whether to force include files", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#force-include" } }, "type": "object", "additionalProperties": { "type": "string" } }, "only-packages": { "title": "Only packages", "description": "Whether to only include non-artifact files in packages", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#excluding-files-outside-packages" } }, "type": "boolean" }, "sources": { "title": "Sources", "description": "Rewrite relative paths", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#rewriting-paths" } }, "type": "object", "additionalProperties": { "type": "string" } }, "bypass-selection": { "title": "Bypass Selection", "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", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/plugins/builder/wheel/#options" } }, "type": "boolean", "default": false } } }, "CustomTargets": { "title": "CustomTargets", "description": "Build targets", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#build-targets" } }, "type": "object", "additionalProperties": { "$ref": "#/definitions/Target" }, "x-tombi-additional-key-label": "target_name" }, "Hook": { "title": "Build hook", "type": "object", "properties": { "dependencies": { "title": "Dependencies", "description": "Additional dependencies installed in the build environment", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#dependencies_1" } }, "type": "array", "items": { "type": "string" } }, "require-runtime-dependencies": { "title": "Require runtime dependencies", "description": "Whether to install the project’s runtime dependencies", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#dependencies_1" } }, "type": "boolean", "default": false }, "require-runtime-features": { "title": "Required runtime features", "description": "A list of the project’s runtime features to install", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#dependencies_1" } }, "type": "array", "items": { "type": "string" } }, "enable-by-default": { "title": "Conditional execution", "description": "Whether to enable current hook (disable to control activation using environment variables)", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#conditional-execution" } }, "type": "boolean", "default": true } }, "additionalProperties": true }, "BuildHooks": { "title": "Build Hook Plugins", "description": "Configuration for plugin hooks that will be executed at various stages of the build process", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#build-hooks" } }, "type": "object", "additionalProperties": { "$ref": "#/definitions/Hook" }, "x-tombi-additional-key-label": "hook_name" }, "Build": { "title": "Build", "description": "Build configuration", "type": "object", "anyOf": [ { "properties": { "dev-mode-dirs": false } }, { "properties": { "dev-mode-exact": false } } ], "properties": { "ignore-vcs": { "$ref": "#/definitions/IgnoreVcs" }, "include": { "$ref": "#/definitions/Include" }, "exclude": { "$ref": "#/definitions/Exclude" }, "artifacts": { "$ref": "#/definitions/Artifacts" }, "only-packages": { "title": "Excluding files outside packages", "description": "Whether to only include non-artifact files in packages", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#excluding-files-outside-packages" } }, "type": "boolean", "default": false }, "sources": { "title": "Sources", "description": "Rewrite relative paths", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#rewriting-paths" } }, "anyOf": [ { "type": "object", "additionalProperties": { "type": "string" } }, { "type": "array", "items": { "type": "string" } } ] }, "skip-excluded-dirs": { "title": "Skip excluded dirs", "description": "Whether to skip excluded directories (for performance reasons)", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#performance" } }, "type": "boolean", "default": false }, "reproducible": { "title": "Reproducible", "description": "Whether to make the build reproducible", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#reproducible-builds" } }, "type": "boolean", "default": true }, "directory": { "title": "Output directory", "description": "Directory to write build artifacts to", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#output-directory" } }, "type": "string", "default": "dist" }, "dev-mode-dirs": { "title": "Dev mode directories", "description": "List of directories to add to PYTHONPATH in development mode", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#dev-mode" } }, "type": "array", "items": { "type": "string" } }, "dev-mode-exact": { "title": "Exact dev mode", "description": "Whether to use an exact dev mode that doesn’t add whole directories to PYTHONPATH", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#dev-mode" } }, "type": "boolean" }, "targets": { "$ref": "#/definitions/CustomTargets" }, "hooks": { "$ref": "#/definitions/BuildHooks" } } }, "Version": { "title": "Version", "description": "Version configuration", "additionalProperties": true, "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/version/#configuration" } }, "type": "object", "properties": { "path": { "title": "Path", "description": "A relative path to a file containing the project version", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/version/#configuration" } }, "type": "string" }, "pattern": { "title": "Pattern", "description": "A regex pattern to extract the version", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/version/#configuration" } }, "type": "string" }, "source": { "title": "Source", "description": "A source to use for retrieving and updating the version.", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/version/#configuration" } }, "type": "string" } } }, "PublishIndex": { "title": "PublishIndex", "description": "Publishing index configuration", "type": "object", "properties": { "disable": { "title": "Confirmation", "description": "Ask for confirmation when publishing to index", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/publish/#confirmation" } }, "type": "boolean", "default": false }, "repos": { "title": "Repositories", "description": "Define named repositories to publish to", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/publish/#repository" } }, "type": "object", "properties": { "main": false, "test": false }, "additionalProperties": { "type": "object", "properties": { "url": { "type": "string" } } } } } }, "Publish": { "title": "Publish", "description": "Publish configuration", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/publish/" } }, "type": "object", "properties": { "index": { "$ref": "#/definitions/PublishIndex" } } }, "IgnoreVcs": { "title": "Ignore VCS in file selection", "description": "Whether to ignore VCS .*ignore files and include those files by default", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#vcs" } }, "type": "boolean", "default": false }, "Include": { "title": "Include files", "description": "List of glob patterns to include files", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#patterns" } }, "type": "array", "items": { "type": "string" } }, "Exclude": { "title": "Exclude files", "description": "List of glob patterns to exclude files", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#patterns" } }, "type": "array", "items": { "type": "string" } }, "Artifacts": { "title": "Artifact files", "description": "List of glob patterns to include VCS-ignored files", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#artifacts" } }, "type": "array", "items": { "type": "string" } }, "OnlyInclude": { "title": "Only include specific paths", "description": "List of relative paths to directories or files to include, preventing directory traversal from project root. This option overrides any include patterns.", "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/config/build/#generic" } }, "type": "array", "items": { "type": "string" } } }, "oneOf": [ { "properties": { "version": false } }, { "required": ["version"], "properties": { "version": { "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/version/" } }, "type": "object", "required": ["path"], "properties": { "path": { "type": "string" }, "pattern": { "type": "string" } } } } }, { "required": ["version"], "properties": { "version": { "x-taplo": { "links": { "key": "https://hatch.pypa.io/latest/version/" } }, "type": "object", "required": ["source"], "properties": { "source": { "type": "string" } } } } } ], "properties": { "metadata": { "$ref": "#/definitions/Metadata" }, "env": { "$ref": "#/definitions/CollectorEnv" }, "envs": { "$ref": "#/definitions/Envs" }, "build": { "$ref": "#/definitions/Build" }, "version": { "$ref": "#/definitions/Version" }, "publish": { "$ref": "#/definitions/Publish" } }, "title": "Hatch", "type": "object", "x-taplo-info": { "authors": [ "flying-sheep (https://github.com/flying-sheep)", "Chaojie (https://github.com/ischaojie)" ], "pattern": ["^(.*(/|\\\\)hatch\\.toml|hatch\\.toml)$"] } }