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:
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')#
- Parameters:
- 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"))