Configuration#
Configuration loading and schema for jamb.
JambConfig#
- class jamb.config.loader.JambConfig[source]#
Configuration schema for jamb.
- test_matrix_output#
File path for the generated test records matrix, or
Noneto skip generation. Format is inferred from file extension (.html,.json,.csv,.md,.xlsx).- Type:
str | None
- trace_matrix_output#
File path for the generated traceability matrix, or
Noneto skip generation. Format is inferred from file extension (.html,.json,.csv,.md,.xlsx).- Type:
str | None
- trace_to_ignore#
Document prefixes to exclude from the “Traces To” column in the traceability matrix.
- software_version#
Software version for the traceability matrix. If None, auto-parsed from
[project].versionin pyproject.toml.- Type:
str | None
- trace_from#
Starting document prefix for full chain trace matrix generation. When set, generates a full chain matrix instead of the simple trace matrix.
- Type:
str | None
- include_ancestors#
Whether to include a “Traces To” column showing ancestors of the starting items in full chain matrices.
- Type:
- tc_id_prefix#
Prefix for auto-generated test case IDs. Defaults to
"TC", producing IDs likeTC001,TC002. Custom prefixes allow project-specific formats (e.g.,"TEST-"→TEST-001). Must contain only alphanumeric characters, hyphens, or underscores.- Type:
- matrix_columns#
Extra columns to display in the full chain traceability matrix. Each entry defines a column sourced from a custom attribute or a built-in resolver.
- Type:
list[MatrixColumnConfig]
- publish_html_theme#
Path to a Quarto SCSS theme applied to published HTML, or
Noneto use the bundled default theme.- Type:
str | None
- publish_docx_reference#
Path to a Word reference document applied to published DOCX, or
Nonefor Quarto’s default styling.- Type:
str | None
- publish_pdf_template#
Path to a Typst preamble applied to published PDF, or
Noneto use the bundled default.- Type:
str | None
- publish_status#
Document status (e.g.
"Draft","Approved") shown on the published title page, orNoneto omit.- Type:
str | None
Construct a config with custom settings:: >>> config = JambConfig( ... test_documents=["SRS"], ... fail_uncovered=True, ... test_matrix_output="test-records.html", ... ) >>> config.test_documents ['SRS'] >>> config.fail_uncovered True- __init__(test_documents=<factory>, fail_uncovered=False, require_all_pass=True, test_matrix_output=None, trace_matrix_output=None, exclude_patterns=<factory>, trace_to_ignore=<factory>, software_version=None, trace_from=None, include_ancestors=False, tc_id_prefix='TC', matrix_columns=<factory>, publish_html_theme=None, publish_docx_reference=None, publish_pdf_template=None, publish_status=None)#
- Parameters:
fail_uncovered (bool)
require_all_pass (bool)
test_matrix_output (str | None)
trace_matrix_output (str | None)
software_version (str | None)
trace_from (str | None)
include_ancestors (bool)
tc_id_prefix (str)
matrix_columns (list[MatrixColumnConfig])
publish_html_theme (str | None)
publish_docx_reference (str | None)
publish_pdf_template (str | None)
publish_status (str | None)
- Return type:
None
load_config#
- jamb.config.loader.load_config(config_path=None)[source]#
Load jamb configuration from pyproject.toml.
Looks for [tool.jamb] section. Also auto-parses software version from [project].version if not explicitly set in [tool.jamb].
- Parameters:
config_path (
Path|None) – Optional path to pyproject.toml. If None, uses cwd.- Returns:
JambConfig– JambConfig with loaded values or defaults.- Return type:
Load configuration from the default path (``pyproject.toml`` in the current working directory):: >>> config = load_config() >>> config.matrix_format 'html' Load from a specific path:: >>> from pathlib import Path >>> config = load_config(Path("myproject/pyproject.toml"))