ubproject.toml schema

Configuration for ubcode

Properties

  • build_tags (array): Build tags for conditional processing, mirroring Sphinx’s tags configuration. Default: [].

    • Items (string)

  • codelinks: Codelinks configuration (source-code marker extraction). Refer to CodelinksConfig. Default: {"local_url_field": "local-url", "outdir": null, "projects": {}, "remote_url_field": "remote-url", "set_local_url": false, "set_remote_url": false}.

  • extend ([‘string’, ‘null’]): The path to a configuration file to extend. Default: null.

  • format_rst: RST formatting configuration. Refer to FormatRstConfig. Default: {"blockquote_indent": 2, "definition_list_indent": 2, "directive_indent": 3, "enum_list_auto": "preserve", "enum_list_style": "preserve", "fail_on_warning": [], "field_list_align_body": false, "field_list_body_on_new_line": 20, "field_list_indent": 2, "literal_indent": 2, "paragraph_line_length": null, "paragraph_semantic_wrap": false, "simple_table_space": 2, "substitution_indent": 3, "transition_char": null, "transition_length": 10, "validate": true}.

  • lint: Lint configuration settings. Refer to LintConfig. Default: {"ignore": [], "lsp_select": [], "message-ignores": [], "per-file-ignores": {}}.

  • needs: Needs configuration settings. Refer to NeedsConfig. Default: {"external_needs": [], "extra_links": [], "extra_options": [], "fields": {}, "filter_data": {}, "global_options": {}, "id_from_title": false, "id_length": 5, "id_regex": "^[A-Z0-9_]{5,}", "id_required": false, "import_keys": {}, "links": {}, "parse_dynamic_functions": true, "schema_definitions_from_json": "", "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"}], "variant_options": [], "variants": {}}.

  • needs_json: Needs JSON configuration settings. Refer to NeedsJsonConfig. Default: {"path": "", "src": null}.

  • parse: Parse configuration settings. Refer to ParseConfig. Default: {"extend_directives": {}, "extend_roles": {}, "ignore_directives": []}.

  • project: Project configuration settings. Refer to ProjectConfig. Default: {"description": "", "name": "", "srcdir": "", "version": ""}.

  • rst_lint: Deprecated RST lint configuration (use lint instead). Refer to LintConfig. Default: {"ignore": [], "lsp_select": [], "message-ignores": [], "per-file-ignores": {}}.

  • scripts (object): A map of script names to command templates. Can contain additional properties. Default: {}.

    • Additional properties: Configuration for a script, either as a string, command, or chain.

      • Any of

        • string: A string to run as a script.

        • object: A command configuration. 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.

        • object: A chain of script configurations. 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.

  • server: Server configuration settings. Refer to ServerConfig. Default: {"hover_images": true, "hover_need_refs": true, "image_file_patterns": ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.svg", "*.webp", "*.bmp", "*.tiff", "*.tif", "*.ico", "*.heif", "*.heic", "*.avif", "*.eps", "*.psd", "*.ai", "*.pdf"], "index_on_save": false}.

  • source: Source file discovery configuration. Refer to SourceConfig. Default: {"exclude": [".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg", ".svn", ".venv", ".vscode", "_build", "build", "dist", "node_modules", "site-packages"], "extend_exclude": [], "extend_include": [], "follow_links": false, "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

  • CodelinksConfig (object): Codelinks configuration. Cannot contain additional properties.

    • local_url_field (string): Field name for local URL. Default: "local-url".

    • outdir ([‘string’, ‘null’]): Optional output directory for standalone use. Default: null.

    • projects (object): Per-project configurations keyed by project name. Can contain additional properties. Default: {}.

      • Additional properties (object): Per-project configuration. Cannot contain additional properties.

        • analyse (object): Analysis settings. Cannot contain additional properties. Default: {"get_need_id_refs": true, "get_oneline_needs": true, "get_rst": false, "git_root": null, "marked_rst": {"end_sequence": "@endrst", "start_sequence": "@rst"}, "need_id_refs": {"markers": ["@need-ids:"]}, "oneline_comment_style": {"end_sequence": "\n", "field_split_char": ",", "needs_fields": [{"default": null, "name": "title", "type": "str"}, {"default": null, "name": "id", "type": "str"}, {"default": "impl", "name": "type", "type": "str"}, {"default": [], "name": "links", "type": "list[str]"}], "start_sequence": "@"}}.

          • get_need_id_refs (boolean): Whether to extract need-id references. Default: true.

          • get_oneline_needs (boolean): Whether to extract one-line needs. Default: true.

          • get_rst (boolean): Whether to extract marked RST blocks. Default: false.

          • git_root ([‘string’, ‘null’]): Optional explicit git root (relative to TOML file). Default: null.

          • marked_rst (object): Marked RST block configuration. Cannot contain additional properties. Default: {"end_sequence": "@endrst", "start_sequence": "@rst"}.

            • end_sequence (string): Sequence that ends a marked RST block. Default: "@endrst".

            • start_sequence (string): Sequence that starts a marked RST block. Default: "@rst".

          • need_id_refs (object): Need-id reference marker configuration. Cannot contain additional properties. Default: {"markers": ["@need-ids:"]}.

            • markers (array): Marker strings that identify need-id references. Length must be at least 1. Default: ["@need-ids:"].

              • Items (string)

          • oneline_comment_style (object): One-line comment style configuration. Cannot contain additional properties. Default: {"end_sequence": "\n", "field_split_char": ",", "needs_fields": [{"default": null, "name": "title", "type": "str"}, {"default": null, "name": "id", "type": "str"}, {"default": "impl", "name": "type", "type": "str"}, {"default": [], "name": "links", "type": "list[str]"}], "start_sequence": "@"}.

            • end_sequence (string): Character sequence that ends a one-line marker. Default: "\n".

            • field_split_char (string): Character used to split fields. Default: ",".

            • needs_fields (array): Ordered list of field definitions. Length must be at least 1. Default: [{"default": null, "name": "title", "type": "str"}, {"default": null, "name": "id", "type": "str"}, {"default": "impl", "name": "type", "type": "str"}, {"default": [], "name": "links", "type": "list[str]"}].

              • Items (object): A single field definition in the one-line comment style. Cannot contain additional properties.

                • default: Default value applied when the field is omitted from the marker. None means the field is required (no default). Default: null.

                  • Any of