ubproject.toml schema¶
Configuration for ubcode
Properties¶
extend
([‘string’, ‘null’]): The path to a configuration file to extend. Default:null
.needs
: Refer to #/definitions/NeedsConfig. Default:{"external_needs": [], "extra_links": [], "extra_options": [], "id_from_title": false, "id_length": 5, "id_regex": "^[A-Z0-9_]{5,}", "id_required": false, "import_keys": {}, "statuses": [], "tags": [], "title_from_content": false, "title_optional": false, "types": [{"color": "#BFD8D2", "directive": "req", "prefix": "R_", "style": "node", "title": "Requirement"}, {"color": "#FEDCD2", "directive": "spec", "prefix": "S_", "style": "node", "title": "Specification"}, {"color": "#DF744A", "directive": "impl", "prefix": "I_", "style": "node", "title": "Implementation"}, {"color": "#DCB239", "directive": "test", "prefix": "T_", "style": "node", "title": "Test Case"}]}
.needs_json
: Refer to #/definitions/NeedsJsonConfig. Default:{"path": "", "src": null}
.parse
: Refer to #/definitions/ParseConfig. Default:{"extend_directives": {}, "extend_roles": {}, "ignore_directives": []}
.project
: Refer to #/definitions/ProjectConfig. Default:{"description": "", "name": "", "srcdir": "", "version": ""}
.rst_lint
: Refer to #/definitions/RstLintConfig. Default:{"ignore": []}
.scripts
(object): A map of script names to command templates. Can contain additional properties. Default:{}
.Additional properties: Refer to #/definitions/ScriptConfig.
source
: Refer to #/definitions/SourceConfig. Default:{"exclude": [".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg", ".svn", ".venv", ".vscode", "_build", "build", "dist", "node_modules", "site-packages"], "extend_exclude": [], "extend_include": [], "include": ["*.rst"], "respect_gitignore": true}
.virtual
(boolean): Virtual configurations do not correspond to an actual project. They are used for providing shared configuration defaults, or for workspaces that are not themselves projects. Default:false
.
Definitions¶
AllowedStatus
(object): Allowed need status.description
(string): The description of the status. Default:""
.name
(string, required): The name of the status.
AllowedTag
(object): Allowed need tag.description
(string): The description of the tag. Default:""
.name
(string, required): The name of the tag.
DirectiveOptionSpec
(object): Configuration to define a single directive option.description
(string): A short, human readable description of the option. Default:""
.flag
(boolean): If True, the option is a flag, i.e. it has no value. Default:false
.
DirectiveSpec
(object): Configuration to define parsing rules for a single directive.argument
(boolean): If True, the directive accepts an argument. Default:false
.content
(boolean): If True, the directive accepts content. Default:false
.content_required
(boolean): If True, a warning will be logged if the directive contains no content. Default:false
.description
(string): A short, human readable description of the directive. Default:""
.extension
(string): The extension that provides the directive, if any. Default:""
.named_options
(object): A map of named options to specifications. Can contain additional properties. Default:{}
.Additional properties: Refer to #/definitions/DirectiveOptionSpec.
options
(boolean): If True, the directive accepts options. Default:false
.parse_content
(boolean): If True, the directive content is parsed. Default:false
.
ExternalSource
(object): External source to load needs from.Any of
object
json_path
(string, required): Local path to a JSON file.
object
json_url
(string, format: uri, required): Remote URL to a JSON file.
base_url
([‘string’, ‘null’]): The base URL for references to the external source. Default:null
.css_class
([‘string’, ‘null’]): Add a CSS class to URL references. Default:null
.id_prefix
([‘string’, ‘null’]): Prefix all IDs from the external source with this string (note will be uppercased). Default:null
.skip_in_ubcode
(boolean): Skip this source when loading needs in ubcode. Default:false
.target_url
([‘string’, ‘null’]): A Jinja template for the URL of references to the external source, relative tobase_url
. Default:null
.version
([‘string’, ‘null’]): Overridecurrent_version
from loaded JSON. Default:null
.
ExtraOption
(object): Extra option for needs.description
(string): The description of the option. Default:""
.name
(string, required): The name of the option.
ExtraOptionsDefinition
Any of
: Refer to #/definitions/ExtraOption.
string
GlobPattern
(string)NeedLink
(object): Defines a link between needs.allow_dead_links
(boolean): Do not warn if a link connects to an unknown need ID. Default:false
.color
(string): The default color to use in diagrams. Default:"#000000"
.copy
(boolean): Copy to common links field. Default:false
.incoming
(string, required): The incoming link title.option
(string, required): The name of the link type.outgoing
(string, required): The outgoing link title.style
(string): The default style to use in diagrams. Default:"solid"
.style_end
(string): The default end style to use in diagrams. Default:">"
.style_part
(string): The default style to use in diagrams for part links. Default:"dotted"
.style_start
(string): The default start style to use in diagrams. Default:"-"
.
NeedType
(object): Defines a need type.color
(string): The default color to use in diagrams. Default:"#000000"
.directive
(string, required): The directive name.prefix
(string, required): The prefix to use for auto-generated need IDs.style
(string): The default style to use in diagrams. Default:"node"
.title
(string, required): A human readable title.
NeedsConfig
(object): Needs configuration.external_needs
(array): External sources to load needs from. Default:[]
.Items: Refer to #/definitions/ExternalSource.
extra_links
(array): Links between needs. Default:[]
.Items: Refer to #/definitions/NeedLink.
extra_options
(array): Extra options for needs. Default:[]
.Items: Refer to #/definitions/ExtraOptionsDefinition.
id_from_title
(boolean): Base auto-generated IDs on the title. Default:false
.id_length
(integer, format: uint): The length of the auto-generated ID. Minimum:0.0
. Default:5
.id_regex
(string): Validate IDs with a regex. Default:"^[A-Z0-9_]{5,}"
.id_required
(boolean): If True, an ID is required. Default:false
.import_keys
(object): Mapping of keys that can be used as needimport arguments and replaced by the values. Can contain additional properties. Default:{}
.Additional properties (string)
statuses
(array): If given, only the defined statuses are allowed. Default:[]
.Items: Refer to #/definitions/AllowedStatus.
tags
(array): If given, only the defined tags are allowed. Default:[]
.Items: Refer to #/definitions/AllowedTag.
title_from_content
(boolean): Base auto-generated titles on the content. Default:false
.title_optional
(boolean): If True, a title is optional. Default:false
.types
(array): The types of need items. Default:[{"color": "#BFD8D2", "directive": "req", "prefix": "R_", "style": "node", "title": "Requirement"}, {"color": "#FEDCD2", "directive": "spec", "prefix": "S_", "style": "node", "title": "Specification"}, {"color": "#DF744A", "directive": "impl", "prefix": "I_", "style": "node", "title": "Implementation"}, {"color": "#DCB239", "directive": "test", "prefix": "T_", "style": "node", "title": "Test Case"}]
.Items: Refer to #/definitions/NeedType.
NeedsJsonConfig
(object): Define aneeds.json
index to display.path
(string, required): The path to the JSON file containing the needs data.src
([‘string’, ‘null’]): The path to the source directory, used to resolve docnames to file paths. Default:null
.
ParseConfig
(object): Shared configuration for parsing.extend_directives
(object): A map of directive names to extend the directives with. Can contain additional properties. Default:{}
.Additional properties: Refer to #/definitions/DirectiveSpec.
extend_roles
(object): A map of role names to extend the roles with. Can contain additional properties. Default:{}
.Additional properties: Refer to #/definitions/RoleSpec.
ignore_directives
(array): A set of directive names that will not emit a warning if they are unknown. Default:[]
.Items (string)
ProjectConfig
(object): Configuration for the project.description
(string): A description of the project. Default:""
.name
(string): The name of the project. Default:""
.srcdir
(string): A directory, used for resolving paths in certain directives (defaults to config directory). Default:""
.version
(string): The version of the project. Default:""
.
RoleSpec
(object): Configuration to define a single role.description
(string): A short, human readable description of the role. Default:""
.extension
([‘string’, ‘null’]): The extension that provides the role, if any. Default:null
.
RstLintConfig
(object): Lint configuration.ignore
(array): A list of linting codes to ignore. Default:[]
.Items (string)
ScriptConfig
Any of
string: A string to run as a script.
: Refer to #/definitions/ScriptConfigCmd.
: Refer to #/definitions/ScriptConfigChain.
ScriptConfigChain
(object): A chain of scripts to run. Cannot contain additional properties.chain
(array, required): A list of keys of scripts to chain together.Items (string)
terminal
([‘string’, ‘null’]): The terminal name to use to run the command (defaults to script key). Default:null
.
ScriptConfigCmd
(object): A command to run as a script. Cannot contain additional properties.cmd
(string, required): The command to run.env
(object): A map of environment variables to set when running the command. Can contain additional properties. Default:{}
.Additional properties (string)
jinja
(boolean): If True, the command is a Jinja template. Default:true
.terminal
([‘string’, ‘null’]): The terminal name to use to run the command (defaults to script key). Default:null
.
SourceConfig
(object): Configuration for the source file discovery.exclude
(array): A list of glob patterns to exclude from the search. Default:[".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg", ".svn", ".venv", ".vscode", "_build", "build", "dist", "node_modules", "site-packages"]
.Items: Refer to #/definitions/GlobPattern.
extend_exclude
(array): A list of glob patterns to extend the exclude list with. Default:[]
.Items: Refer to #/definitions/GlobPattern.
extend_include
(array): A list of glob patterns to extend the include list with. Default:[]
.Items: Refer to #/definitions/GlobPattern.
include
(array): A list of glob patterns to include in the search. Default:["*.rst"]
.Items: Refer to #/definitions/GlobPattern.
respect_gitignore
(boolean): Default:true
.