hydra.build.format module

Type-level specifications of the JSON formats used by Hydra’s build system: the repository descriptor (hydra.json), per-package descriptors (package.json), per-source-set input and output digests (digest.json), generated-source manifests (manifest.json), and per-package validation configuration. Each on-disk file is the canonical JSON encoding of the corresponding type. Overlay build configuration (overlay/<lang>/<pkg>/build.json) is specified separately, by hydra.gradle and hydra.python.pyproject. See https://github.com/CategoricalData/hydra/issues/512.

class hydra.build.format.DefinitionNameConventionProfile(severity: Annotated[Severity, 'How a finding of this check is treated'], allow_underscores: Annotated[bool, 'Whether underscores are permitted in definition names'])

Bases: object

Configuration for the definition-name-convention check.

ALLOW_UNDERSCORES = Name(value='allowUnderscores')
class Builder(_severity: 'Severity' = None, _allow_underscores: 'bool' = None)

Bases: object

allow_underscores(allow_underscores)
build()
severity(severity)
SEVERITY = Name(value='severity')
TYPE_ = Name(value='hydra.build.format.DefinitionNameConventionProfile')
allow_underscores: Annotated[bool, 'Whether underscores are permitted in definition names']
static builder()
severity: Annotated[Severity, 'How a finding of this check is treated']
with_allow_underscores(allow_underscores)
with_severity(severity)
class hydra.build.format.DefinitionValidationProfile(has_description: Annotated[object, 'Configuration for the definition-documentation check'], ordering: Annotated[object, 'Whether definitions must appear in alphabetical order'], name_convention: Annotated[object, 'Configuration for the definition-name-convention check'], not_in_module_name: Annotated[object, 'Whether a definition name may duplicate part of its module name'], duplicate_name: Annotated[object, 'Whether duplicate definition names within a module are reported'])

Bases: object

Validation rules applying to individual definitions within a module. Absent fields mean the corresponding check is not configured.

class Builder(_has_description: 'Optional[DocumentationProfile]' = None, _ordering: 'Optional[Severity]' = None, _name_convention: 'Optional[DefinitionNameConventionProfile]' = None, _not_in_module_name: 'Optional[Severity]' = None, _duplicate_name: 'Optional[Severity]' = None)

Bases: object

build()
duplicate_name(duplicate_name)
has_description(has_description)
name_convention(name_convention)
not_in_module_name(not_in_module_name)
ordering(ordering)
DUPLICATE_NAME = Name(value='duplicateName')
HAS_DESCRIPTION = Name(value='hasDescription')
NAME_CONVENTION = Name(value='nameConvention')
NOT_IN_MODULE_NAME = Name(value='notInModuleName')
ORDERING = Name(value='ordering')
TYPE_ = Name(value='hydra.build.format.DefinitionValidationProfile')
static builder()
duplicate_name: Annotated[object, 'Whether duplicate definition names within a module are reported']
has_description: Annotated[object, 'Configuration for the definition-documentation check']
name_convention: Annotated[object, 'Configuration for the definition-name-convention check']
not_in_module_name: Annotated[object, 'Whether a definition name may duplicate part of its module name']
ordering: Annotated[object, 'Whether definitions must appear in alphabetical order']
with_duplicate_name(duplicate_name)
with_has_description(has_description)
with_name_convention(name_convention)
with_not_in_module_name(not_in_module_name)
with_ordering(ordering)
class hydra.build.format.DigestEntry(kind: Annotated[DigestKind, 'The kind of artifact recorded'], hash: Annotated[Sha256Hash, 'The SHA-256 hash of the file content'])

Bases: object

One file’s classification and content hash within a digest.

class Builder(_kind: 'DigestKind' = None, _hash: 'Sha256Hash' = None)

Bases: object

build()
hash(hash)
kind(kind)
HASH = Name(value='hash')
KIND = Name(value='kind')
TYPE_ = Name(value='hydra.build.format.DigestEntry')
static builder()
hash: Annotated[Sha256Hash, 'The SHA-256 hash of the file content']
kind: Annotated[DigestKind, 'The kind of artifact recorded']
with_hash(hash)
with_kind(kind)
class hydra.build.format.DigestKind(*values)

Bases: Enum

The kind of artifact recorded in a digest entry. Lets a single digest mix typed entries without losing the discriminator.

DSL_SOURCE = Name(value='dslSource')

A DSL source file under a package’s src/main source tree

JSON_FILE = Name(value='jsonFile')

A JSON file under dist/json/

OTHER = Name(value='other')

Anything else (escape hatch; unknown kinds round-trip as this variant)

RUNTIME_FILE = Name(value='runtimeFile')

A hand-written runtime support file copied into the distribution

TARGET_FILE = Name(value='targetFile')

A generated source file under dist/<lang>/

TYPE_ = Name(value='hydra.build.format.DigestKind')
class hydra.build.format.DocumentationProfile(severity: Annotated[Severity, 'How a finding of this check is treated'], exempt_deprecated: Annotated[bool, 'Whether deprecated definitions are exempt from the documentation requirement'])

Bases: object

Configuration for the definition-documentation check.

class Builder(_severity: 'Severity' = None, _exempt_deprecated: 'bool' = None)

Bases: object

build()
exempt_deprecated(exempt_deprecated)
severity(severity)
EXEMPT_DEPRECATED = Name(value='exemptDeprecated')
SEVERITY = Name(value='severity')
TYPE_ = Name(value='hydra.build.format.DocumentationProfile')
static builder()
exempt_deprecated: Annotated[bool, 'Whether deprecated definitions are exempt from the documentation requirement']
severity: Annotated[Severity, 'How a finding of this check is treated']
with_exempt_deprecated(exempt_deprecated)
with_severity(severity)
class hydra.build.format.Generation(generator_id: Annotated[str, 'The gating cache key identifying the generator that produced the outputs'], mode: Annotated[GenerationMode, 'Whether the artifact was produced by a published host or a locally-built migration shim'], host: Annotated[LanguageName, 'The producing host language (informational)'], hydra_version: Annotated[object, 'The release version of the producing host (informational; omitted for shim builds)'], revision: Annotated[object, 'The producing worktree\'s revision, as <short-sha> with "-dirty" appended when the tree has uncommitted changes (informational; required for shim builds)'], timestamp: Annotated[object, 'The ISO-8601 UTC time of generation (informational; non-deterministic across byte-identical rebuilds)'])

Bases: object

A structured generation-provenance record for generated artifacts, separating gating identity from informational provenance. Only generatorId gates cache freshness; it is host-independent by design, since self-hosting requires every host to produce byte-identical output. All other fields are informational and must not gate. Invariant: a shim-mode generation has a revision (a shim has no release version, so the working-tree revision is its only precise identity).

class Builder(_generator_id: 'str' = None, _mode: 'GenerationMode' = None, _host: 'LanguageName' = None, _hydra_version: 'Optional[hydra.packaging.Version]' = None, _revision: 'Optional[str]' = None, _timestamp: 'Optional[str]' = None)

Bases: object

build()
generator_id(generator_id)
host(host)
hydra_version(hydra_version)
mode(mode)
revision(revision)
timestamp(timestamp)
GENERATOR_ID = Name(value='generatorId')
HOST = Name(value='host')
HYDRA_VERSION = Name(value='hydraVersion')
MODE = Name(value='mode')
REVISION = Name(value='revision')
TIMESTAMP = Name(value='timestamp')
TYPE_ = Name(value='hydra.build.format.Generation')
static builder()
generator_id: Annotated[str, 'The gating cache key identifying the generator that produced the outputs']
host: Annotated[LanguageName, 'The producing host language (informational)']
hydra_version: Annotated[object, 'The release version of the producing host (informational; omitted for shim builds)']
mode: Annotated[GenerationMode, 'Whether the artifact was produced by a published host or a locally-built migration shim']
revision: Annotated[object, 'The producing worktree\'s revision, as <short-sha> with "-dirty" appended when the tree has uncommitted changes (informational; required for shim builds)']
timestamp: Annotated[object, 'The ISO-8601 UTC time of generation (informational; non-deterministic across byte-identical rebuilds)']
with_generator_id(generator_id)
with_host(host)
with_hydra_version(hydra_version)
with_mode(mode)
with_revision(revision)
with_timestamp(timestamp)
class hydra.build.format.GenerationMode(*values)

Bases: Enum

The provenance class of a generated artifact.

PUBLISHED = Name(value='published')

Produced by a published, versioned host

SHIM = Name(value='shim')

Produced by a locally-built migration shim, ahead of any published host

TYPE_ = Name(value='hydra.build.format.GenerationMode')
class hydra.build.format.HostOverride

Bases: object

HostOverrideLocal | HostOverrideVersion

LOCAL = Name(value='local')
TYPE_ = Name(value='hydra.build.format.HostOverride')
VERSION = Name(value='version')
class hydra.build.format.HostOverrideLocal

Bases: object

Build and consume the host locally from source rather than from the package registry

class hydra.build.format.HostOverrideVersion(value: T)

Bases: Node[hydra.packaging.Version]

Pin the host to a specific published version

class hydra.build.format.InputDigest(digest_format_version: Annotated[int, "The version of this digest file's own schema"], module_format_version: Annotated[int, 'The version of the JSON encoding of the sibling module files'], self_hash: Annotated[object, "A deterministic hash over all of the package's per-module hashes (absent in legacy digests)"], dependency_hashes: Annotated[Mapping[PackageName, Sha256Hash], "For each declared dependency package, that package's selfHash as recorded at write time"], module_hashes: Annotated[Mapping[ModuleName, Sha256Hash], "The hash of each module's source, keyed by module name"])

Bases: object

A per-package, per-source-set input digest (dist/json/<pkg>/build/<set>/digest.json): Merkle-style hashes of the package’s DSL sources, recorded when the package’s JSON is written and consumed by downstream freshness checks. The selfHash summarizes the package’s own module hashes; dependencyHashes captures the selfHash of each declared dependency package at write time, giving transitive invalidation.

class Builder(_digest_format_version: 'int' = None, _module_format_version: 'int' = None, _self_hash: 'Optional[Sha256Hash]' = None, _dependency_hashes: 'Mapping[hydra.packaging.PackageName, Sha256Hash]' = None, _module_hashes: 'Mapping[hydra.packaging.ModuleName, Sha256Hash]' = None)

Bases: object

build()
dependency_hashes(dependency_hashes)
digest_format_version(digest_format_version)
module_format_version(module_format_version)
module_hashes(module_hashes)
self_hash(self_hash)
DEPENDENCY_HASHES = Name(value='dependencyHashes')
DIGEST_FORMAT_VERSION = Name(value='digestFormatVersion')
MODULE_FORMAT_VERSION = Name(value='moduleFormatVersion')
MODULE_HASHES = Name(value='moduleHashes')
SELF_HASH = Name(value='selfHash')
TYPE_ = Name(value='hydra.build.format.InputDigest')
static builder()
dependency_hashes: Annotated[Mapping[PackageName, Sha256Hash], "For each declared dependency package, that package's selfHash as recorded at write time"]
digest_format_version: Annotated[int, "The version of this digest file's own schema"]
module_format_version: Annotated[int, 'The version of the JSON encoding of the sibling module files']
module_hashes: Annotated[Mapping[ModuleName, Sha256Hash], "The hash of each module's source, keyed by module name"]
self_hash: Annotated[object, "A deterministic hash over all of the package's per-module hashes (absent in legacy digests)"]
with_dependency_hashes(dependency_hashes)
with_digest_format_version(digest_format_version)
with_module_format_version(module_format_version)
with_module_hashes(module_hashes)
with_self_hash(self_hash)
class hydra.build.format.LanguageName(value: T)

Bases: Node[str]

The name of a source or target language in Hydra’s build system, e.g. “haskell”, “java”, or “python”.

TYPE_ = Name(value='hydra.build.format.LanguageName')
class hydra.build.format.ModuleValidationProfile(definitions: Annotated[object, "Validation rules applying to the module's individual definitions"], name_convention: Annotated[object, 'Whether module names must follow naming conventions'], conflicting_variant_name: Annotated[object, 'Whether union variant names conflicting across the module are reported'])

Bases: object

Validation rules applying to a module as a whole. Absent fields mean the corresponding check is not configured.

class Builder(_definitions: 'Optional[DefinitionValidationProfile]' = None, _name_convention: 'Optional[Severity]' = None, _conflicting_variant_name: 'Optional[Severity]' = None)

Bases: object

build()
conflicting_variant_name(conflicting_variant_name)
definitions(definitions)
name_convention(name_convention)
CONFLICTING_VARIANT_NAME = Name(value='conflictingVariantName')
DEFINITIONS = Name(value='definitions')
NAME_CONVENTION = Name(value='nameConvention')
TYPE_ = Name(value='hydra.build.format.ModuleValidationProfile')
static builder()
conflicting_variant_name: Annotated[object, 'Whether union variant names conflicting across the module are reported']
definitions: Annotated[object, "Validation rules applying to the module's individual definitions"]
name_convention: Annotated[object, 'Whether module names must follow naming conventions']
with_conflicting_variant_name(conflicting_variant_name)
with_definitions(definitions)
with_name_convention(name_convention)
class hydra.build.format.OutputDigest(digest_format_version: Annotated[int, "The version of this digest file's own schema"], module_format_version: Annotated[int, 'The version of the JSON encoding of the module files this digest governs'], generator: Annotated[str, 'The flat gating generator identity (a compatibility duplicate of generation.generatorId)'], generation: Annotated[Generation, 'The structured generation-provenance record'], self_hash: Annotated[object, "The input package's selfHash as recorded at refresh time (absent in legacy digests)"], dependency_hashes: Annotated[Mapping[PackageName, Sha256Hash], "For each declared dependency package, that package's selfHash as recorded at refresh time"], inputs: Annotated[Mapping[str, DigestEntry], "Every input file's kind and hash, keyed by worktree-relative path"], outputs: Annotated[Mapping[str, DigestEntry], "Every output file's kind and hash, keyed by path relative to the output directory"])

Bases: object

A per-package, per-source-set output digest for one target language (dist/<lang>/<pkg>/build/<set>/digest.json), recording every input file whose content determines the generated output, every output file the generation step is responsible for, and the identity of the generator. A generation step is fresh exactly when all input hashes, all output hashes, the generator identity, and the recorded package and dependency hashes match.

class Builder(_digest_format_version: 'int' = None, _module_format_version: 'int' = None, _generator: 'str' = None, _generation: 'Generation' = None, _self_hash: 'Optional[Sha256Hash]' = None, _dependency_hashes: 'Mapping[hydra.packaging.PackageName, Sha256Hash]' = None, _inputs: 'Mapping[str, DigestEntry]' = None, _outputs: 'Mapping[str, DigestEntry]' = None)

Bases: object

build()
dependency_hashes(dependency_hashes)
digest_format_version(digest_format_version)
generation(generation)
generator(generator)
inputs(inputs)
module_format_version(module_format_version)
outputs(outputs)
self_hash(self_hash)
DEPENDENCY_HASHES = Name(value='dependencyHashes')
DIGEST_FORMAT_VERSION = Name(value='digestFormatVersion')
GENERATION = Name(value='generation')
GENERATOR = Name(value='generator')
INPUTS = Name(value='inputs')
MODULE_FORMAT_VERSION = Name(value='moduleFormatVersion')
OUTPUTS = Name(value='outputs')
SELF_HASH = Name(value='selfHash')
TYPE_ = Name(value='hydra.build.format.OutputDigest')
static builder()
dependency_hashes: Annotated[Mapping[PackageName, Sha256Hash], "For each declared dependency package, that package's selfHash as recorded at refresh time"]
digest_format_version: Annotated[int, "The version of this digest file's own schema"]
generation: Annotated[Generation, 'The structured generation-provenance record']
generator: Annotated[str, 'The flat gating generator identity (a compatibility duplicate of generation.generatorId)']
inputs: Annotated[Mapping[str, DigestEntry], "Every input file's kind and hash, keyed by worktree-relative path"]
module_format_version: Annotated[int, 'The version of the JSON encoding of the module files this digest governs']
outputs: Annotated[Mapping[str, DigestEntry], "Every output file's kind and hash, keyed by path relative to the output directory"]
self_hash: Annotated[object, "The input package's selfHash as recorded at refresh time (absent in legacy digests)"]
with_dependency_hashes(dependency_hashes)
with_digest_format_version(digest_format_version)
with_generation(generation)
with_generator(generator)
with_inputs(inputs)
with_module_format_version(module_format_version)
with_outputs(outputs)
with_self_hash(self_hash)
class hydra.build.format.PackageDescriptor(package_format_version: Annotated[int, "The version of this descriptor file's schema"], name: Annotated[PackageName, 'The unique name of the package, e.g. "hydra-kernel"'], description: Annotated[str, 'A concise human-readable summary of the package'], source_language: Annotated[LanguageName, "The language in which the package's DSL sources are authored"], target_languages: Annotated[object, 'The target languages for which distributions of this package are generated. When absent, the default target set applies.'], dependencies: Annotated[Sequence[PackageName], 'The names of the packages this package depends upon'], validation: Annotated[object, "Optional per-package validation configuration. When absent, the validation engine's defaults apply."])

Bases: object

A package descriptor (packages/<pkg>/package.json): the source-of-truth declaration of a Hydra package’s name, source language, dependencies, and optional per-package configuration.

class Builder(_package_format_version: 'int' = None, _name: 'hydra.packaging.PackageName' = None, _description: 'str' = None, _source_language: 'LanguageName' = None, _target_languages: 'Optional[Sequence[LanguageName]]' = None, _dependencies: 'Sequence[hydra.packaging.PackageName]' = None, _validation: 'Optional[PackageValidationConfiguration]' = None)

Bases: object

build()
dependencies(dependencies)
description(description)
name(name)
package_format_version(package_format_version)
source_language(source_language)
target_languages(target_languages)
validation(validation)
DEPENDENCIES = Name(value='dependencies')
DESCRIPTION = Name(value='description')
NAME = Name(value='name')
PACKAGE_FORMAT_VERSION = Name(value='packageFormatVersion')
SOURCE_LANGUAGE = Name(value='sourceLanguage')
TARGET_LANGUAGES = Name(value='targetLanguages')
TYPE_ = Name(value='hydra.build.format.PackageDescriptor')
VALIDATION = Name(value='validation')
static builder()
dependencies: Annotated[Sequence[PackageName], 'The names of the packages this package depends upon']
description: Annotated[str, 'A concise human-readable summary of the package']
name: Annotated[PackageName, 'The unique name of the package, e.g. "hydra-kernel"']
package_format_version: Annotated[int, "The version of this descriptor file's schema"]
source_language: Annotated[LanguageName, "The language in which the package's DSL sources are authored"]
target_languages: Annotated[object, 'The target languages for which distributions of this package are generated. When absent, the default target set applies.']
validation: Annotated[object, "Optional per-package validation configuration. When absent, the validation engine's defaults apply."]
with_dependencies(dependencies)
with_description(description)
with_name(name)
with_package_format_version(package_format_version)
with_source_language(source_language)
with_target_languages(target_languages)
with_validation(validation)
class hydra.build.format.PackageManifest(manifest_format_version: Annotated[int, "The version of this manifest file's schema"], module_format_version: Annotated[int, 'The version of the JSON encoding of the sibling module files'], package: Annotated[PackageName, 'The name of the package this manifest describes'], main_modules: Annotated[Sequence[ModuleName], 'All main-source-set modules in the package'], test_modules: Annotated[Sequence[ModuleName], 'All test-source-set modules in the package'], main_dsl_modules: Annotated[Sequence[ModuleName], 'The subset of main modules which define type schemas and give rise to generated DSL wrapper modules'], main_encoding_modules: Annotated[Sequence[ModuleName], 'The subset of main modules for which encoding and decoding modules are generated'])

Bases: object

A generated-source manifest (dist/<lang>/<pkg>/src/<set>/<lang>/manifest.json): the list of modules generated into a distribution package, partitioned by role.

class Builder(_manifest_format_version: 'int' = None, _module_format_version: 'int' = None, _package: 'hydra.packaging.PackageName' = None, _main_modules: 'Sequence[hydra.packaging.ModuleName]' = None, _test_modules: 'Sequence[hydra.packaging.ModuleName]' = None, _main_dsl_modules: 'Sequence[hydra.packaging.ModuleName]' = None, _main_encoding_modules: 'Sequence[hydra.packaging.ModuleName]' = None)

Bases: object

build()
main_dsl_modules(main_dsl_modules)
main_encoding_modules(main_encoding_modules)
main_modules(main_modules)
manifest_format_version(manifest_format_version)
module_format_version(module_format_version)
package(package)
test_modules(test_modules)
MAIN_DSL_MODULES = Name(value='mainDslModules')
MAIN_ENCODING_MODULES = Name(value='mainEncodingModules')
MAIN_MODULES = Name(value='mainModules')
MANIFEST_FORMAT_VERSION = Name(value='manifestFormatVersion')
MODULE_FORMAT_VERSION = Name(value='moduleFormatVersion')
PACKAGE = Name(value='package')
TEST_MODULES = Name(value='testModules')
TYPE_ = Name(value='hydra.build.format.PackageManifest')
static builder()
main_dsl_modules: Annotated[Sequence[ModuleName], 'The subset of main modules which define type schemas and give rise to generated DSL wrapper modules']
main_encoding_modules: Annotated[Sequence[ModuleName], 'The subset of main modules for which encoding and decoding modules are generated']
main_modules: Annotated[Sequence[ModuleName], 'All main-source-set modules in the package']
manifest_format_version: Annotated[int, "The version of this manifest file's schema"]
module_format_version: Annotated[int, 'The version of the JSON encoding of the sibling module files']
package: Annotated[PackageName, 'The name of the package this manifest describes']
test_modules: Annotated[Sequence[ModuleName], 'All test-source-set modules in the package']
with_main_dsl_modules(main_dsl_modules)
with_main_encoding_modules(main_encoding_modules)
with_main_modules(main_modules)
with_manifest_format_version(manifest_format_version)
with_module_format_version(module_format_version)
with_package(package)
with_test_modules(test_modules)
class hydra.build.format.PackageValidationConfiguration(package: Annotated[object, 'Validation rules applying to the package as a whole'], module: Annotated[object, 'Validation rules applying to each module'], type: Annotated[object, 'Validation rules applying to type-definition bodies'], term: Annotated[object, 'Validation rules applying to term-definition bodies'])

Bases: object

The full, opt-in validation configuration for a package, as declared in its package descriptor. Every field cascades optional; an absent field means the corresponding rule family is not configured and the validation engine’s defaults apply.

class Builder(_package: 'Optional[PackageValidationProfile]' = None, _module: 'Optional[ModuleValidationProfile]' = None, _type: 'Optional[TypeValidationProfile]' = None, _term: 'Optional[TermValidationProfile]' = None)

Bases: object

build()
module(module)
package(package)
term(term)
type(type)
MODULE = Name(value='module')
PACKAGE = Name(value='package')
TERM = Name(value='term')
TYPE = Name(value='type')
TYPE_ = Name(value='hydra.build.format.PackageValidationConfiguration')
static builder()
module: Annotated[object, 'Validation rules applying to each module']
package: Annotated[object, 'Validation rules applying to the package as a whole']
term: Annotated[object, 'Validation rules applying to term-definition bodies']
type: Annotated[object, 'Validation rules applying to type-definition bodies']
with_module(module)
with_package(package)
with_term(term)
with_type(type)
class hydra.build.format.PackageValidationProfile(conflicting_module_name: Annotated[object, 'Whether module names conflicting across the package are reported'], duplicate_module_name: Annotated[object, 'Whether duplicate module names within the package are reported'], name_convention: Annotated[object, 'Whether package names must follow naming conventions'])

Bases: object

Validation rules applying to a package as a whole. Absent fields mean the corresponding check is not configured.

class Builder(_conflicting_module_name: 'Optional[Severity]' = None, _duplicate_module_name: 'Optional[Severity]' = None, _name_convention: 'Optional[Severity]' = None)

Bases: object

build()
conflicting_module_name(conflicting_module_name)
duplicate_module_name(duplicate_module_name)
name_convention(name_convention)
CONFLICTING_MODULE_NAME = Name(value='conflictingModuleName')
DUPLICATE_MODULE_NAME = Name(value='duplicateModuleName')
NAME_CONVENTION = Name(value='nameConvention')
TYPE_ = Name(value='hydra.build.format.PackageValidationProfile')
static builder()
conflicting_module_name: Annotated[object, 'Whether module names conflicting across the package are reported']
duplicate_module_name: Annotated[object, 'Whether duplicate module names within the package are reported']
name_convention: Annotated[object, 'Whether package names must follow naming conventions']
with_conflicting_module_name(conflicting_module_name)
with_duplicate_module_name(duplicate_module_name)
with_name_convention(name_convention)
class hydra.build.format.RepositoryDescriptor(current_version: Annotated[Version, 'The version currently under development'], host_version: Annotated[Version, 'The published host version consumed by default when generating code'], host_overrides: Annotated[Mapping[LanguageName, HostOverride], 'Per-host-language overrides of the default published-host consumption'], group: Annotated[str, 'The group identifier under which artifacts are published, e.g. a Maven group id'], author: Annotated[str, 'The author attribution for published artifacts'], url: Annotated[str, 'The URL of the project'], license: Annotated[str, 'The license identifier for published artifacts, e.g. "Apache-2.0"'], packages: Annotated[Sequence[PackageName], "The names of the repository's source packages"])

Bases: object

The repository descriptor (hydra.json at the repository root): release and host versions, host consumption overrides, publication metadata, and the list of source packages.

AUTHOR = Name(value='author')
class Builder(_current_version: 'hydra.packaging.Version' = None, _host_version: 'hydra.packaging.Version' = None, _host_overrides: 'Mapping[LanguageName, HostOverride]' = None, _group: 'str' = None, _author: 'str' = None, _url: 'str' = None, _license: 'str' = None, _packages: 'Sequence[hydra.packaging.PackageName]' = None)

Bases: object

author(author)
build()
current_version(current_version)
group(group)
host_overrides(host_overrides)
host_version(host_version)
license(license)
packages(packages)
url(url)
CURRENT_VERSION = Name(value='currentVersion')
GROUP = Name(value='group')
HOST_OVERRIDES = Name(value='hostOverrides')
HOST_VERSION = Name(value='hostVersion')
LICENSE = Name(value='license')
PACKAGES = Name(value='packages')
TYPE_ = Name(value='hydra.build.format.RepositoryDescriptor')
URL = Name(value='url')
author: Annotated[str, 'The author attribution for published artifacts']
static builder()
current_version: Annotated[Version, 'The version currently under development']
group: Annotated[str, 'The group identifier under which artifacts are published, e.g. a Maven group id']
host_overrides: Annotated[Mapping[LanguageName, HostOverride], 'Per-host-language overrides of the default published-host consumption']
host_version: Annotated[Version, 'The published host version consumed by default when generating code']
license: Annotated[str, 'The license identifier for published artifacts, e.g. "Apache-2.0"']
packages: Annotated[Sequence[PackageName], "The names of the repository's source packages"]
url: Annotated[str, 'The URL of the project']
with_author(author)
with_current_version(current_version)
with_group(group)
with_host_overrides(host_overrides)
with_host_version(host_version)
with_license(license)
with_packages(packages)
with_url(url)
class hydra.build.format.Severity(*values)

Bases: Enum

How a validation finding is treated.

ERROR = Name(value='error')
TYPE_ = Name(value='hydra.build.format.Severity')
WARNING = Name(value='warning')
class hydra.build.format.Sha256Hash(value: T)

Bases: Node[str]

A SHA-256 hash in lowercase hexadecimal notation.

TYPE_ = Name(value='hydra.build.format.Sha256Hash')
class hydra.build.format.TermValidationProfile(duplicate_binding: Annotated[object, 'Whether duplicate let bindings are reported'], empty_term_annotation: Annotated[object, 'Whether empty term annotations are reported'], undefined_variable: Annotated[object, 'Whether references to undefined variables are reported'])

Bases: object

Validation rules applying to term-definition bodies. Absent fields mean the corresponding check is not configured.

class Builder(_duplicate_binding: 'Optional[Severity]' = None, _empty_term_annotation: 'Optional[Severity]' = None, _undefined_variable: 'Optional[Severity]' = None)

Bases: object

build()
duplicate_binding(duplicate_binding)
empty_term_annotation(empty_term_annotation)
undefined_variable(undefined_variable)
DUPLICATE_BINDING = Name(value='duplicateBinding')
EMPTY_TERM_ANNOTATION = Name(value='emptyTermAnnotation')
TYPE_ = Name(value='hydra.build.format.TermValidationProfile')
UNDEFINED_VARIABLE = Name(value='undefinedVariable')
static builder()
duplicate_binding: Annotated[object, 'Whether duplicate let bindings are reported']
empty_term_annotation: Annotated[object, 'Whether empty term annotations are reported']
undefined_variable: Annotated[object, 'Whether references to undefined variables are reported']
with_duplicate_binding(duplicate_binding)
with_empty_term_annotation(empty_term_annotation)
with_undefined_variable(undefined_variable)
class hydra.build.format.TypeValidationProfile(empty_annotation: Annotated[object, 'Whether empty type annotations are reported'], duplicate_field: Annotated[object, 'Whether duplicate field names within a record or union are reported'], single_variant_union: Annotated[object, 'Whether single-variant unions are reported'])

Bases: object

Validation rules applying to type-definition bodies. Absent fields mean the corresponding check is not configured.

class Builder(_empty_annotation: 'Optional[Severity]' = None, _duplicate_field: 'Optional[Severity]' = None, _single_variant_union: 'Optional[Severity]' = None)

Bases: object

build()
duplicate_field(duplicate_field)
empty_annotation(empty_annotation)
single_variant_union(single_variant_union)
DUPLICATE_FIELD = Name(value='duplicateField')
EMPTY_ANNOTATION = Name(value='emptyAnnotation')
SINGLE_VARIANT_UNION = Name(value='singleVariantUnion')
TYPE_ = Name(value='hydra.build.format.TypeValidationProfile')
static builder()
duplicate_field: Annotated[object, 'Whether duplicate field names within a record or union are reported']
empty_annotation: Annotated[object, 'Whether empty type annotations are reported']
single_variant_union: Annotated[object, 'Whether single-variant unions are reported']
with_duplicate_field(duplicate_field)
with_empty_annotation(empty_annotation)
with_single_variant_union(single_variant_union)