repo-adapter-api:adapter-configuration

repo-adapter-api:adapter-configuration@0.0.0

A document is written as one of AdapterConfiguration.

AdapterConfiguration

FieldTypeRequiredDefaultDescription
schemaVersionversionYesThe version of this document's schema that this document was written under -- granted by the meta-schema to every definition named in metadata.documentRoots, never declared
corecoordinateYesThe coordinate of the language core this adapter configures, <category>:<name> -- language:python-core. Resolved the way the adapter's own coordinate is, through the same catalogs: the repository's own source, a build, or a release.
testDirectoriesset[glob]No[]The directories tests are kept in, as globs: rooted at the module root when one opens with /, a directory of that name at any depth when it does not. Everything beneath one is test code.
testFilePatternsset[glob]No[]The files a test runner collects where the repository tells its runner nothing, as globs: test_*.py, a lone name, is a file of that name at any depth. A core that can read the repository's own statement to its runner answers with that instead, and adds the names the runner loads for its tests.
tierDirectorystringNoHow a tier's directory is spelled directly inside a test directory, with {tier} standing for the tier's name: __{tier}__ spells integration as __integration__. A directory spelled otherwise names no tier. Absent, no directory names one.
nonSourcePatternsset[glob]No[]What a walk of a repository's trees passes over, as globs: a compiler's cache, an environment installed into the tree, a dependency tree fetched into it, the directory a build writes into.
gitignoreRuleslist[DeclaredGitignoreRule]No[]What a checkout holds because of the language and its tools, and nobody writes by hand, each with the reason it is ignored.
commandsdict[enum, DeclaredCommand] one of build, test, lint, format, typecheck, syncNo{}The command line each verb runs, keyed by the contract's method name: lint, format, typecheck, sync, and test or build where a plain command line is the whole of one. A verb declared here is rendered from the declaration. test and build left undeclared are the core's, since what they pass is worked out at run time; any other verb left undeclared is one this adapter does not support. A key that is no verb of the contract is refused where the document loads.

DeclaredGitignoreRule

FieldTypeRequiredDefaultDescription
patternstringYesA .gitignore line, read as git reads it.
whystringYesWhy a checkout holds what the pattern names.

DeclaredCommand

FieldTypeRequiredDefaultDescription
executablestringYesThe program to run, found on PATH the way a shell would find it.
argslist[string]No[]The arguments every run passes to executable, in order and before any passthroughArgs.
passthroughArgslist[DeclaredArgument]No[]Arguments appended to args, each read from a value the run carries rather than written here: a flag the invocation set, the paths it selected, a field of the calling application's configuration document.

DeclaredArgument

FieldTypeRequiredDefaultDescription
valuestringYesThe name of the run value this argument is read from: a parameter the contract gives the verb, camel-cased (fix, exclude, paths, repoRoot) or a field of the calling application's configuration document. A name the run does not carry is an error rather than an empty argument.
flagstringNoThe option token this value is passed under. A boolean emits it alone when true and nothing when false; a list emits it once before each item; a scalar emits it once before the value. Omitted, the value is passed positionally.
formenum one of written, anchoredNo"written"How a glob the value holds is written for the program. written, the default, passes each as it is written. anchored writes each the way a program reads it that anchors a pattern holding a separator at its working directory and reads a lone name at any depth, as ruff's --extend-exclude does: a rooted glob from ./, an unrooted one of several segments as **/<glob> and **/<glob>/**, so the program names what the glob names.