Skip to main content

Universal traceability validation and rollup for requirements-to-tests mapping.

Project description

Traceability Tooling

Universal traceability validation and rollup for requirements ↔ tests mapping. Designed to work across monorepos and git submodules.

Install

pip install tracetree

Quick Start

From a repo root with docs/traceability/:

tracetree init
tracetree validate
tracetree link
tracetree aggregate

Expected Structure (Defaults)

  • docs/traceability/requirements.md
  • docs/traceability/risk_controls.md
  • docs/traceability/traceability_matrix.csv
  • docs/traceability/soup_inventory.md
  • docs/traceability/iec62304_mapping.csv
  • docs/traceability/verification_plan.md

If you do not already have these files, run:

tracetree init

Generated reports (default):

  • docs/traceability/generated/traceability_report.md
  • docs/traceability/generated/traceability_report.json
  • docs/traceability/generated/testid_links.md
  • docs/traceability/generated/testid_links.json
  • docs/traceability/generated/aggregate/traceability_rollup.md
  • docs/traceability/generated/aggregate/traceability_rollup.json
  • docs/traceability/generated/iec62304_traceability_table.md

Test discovery defaults:

  • GTest: tests/, test/
  • Pytest: tests/, test/
  • JS/TS (Jest/Mocha/Vitest/Deno): tests/, test/, __tests__/, spec/
  • Rust (#[test]): tests/, test/, src/

TestID matching:

  • GTest: SuiteName.TestName
  • Pytest: test_function_name
  • JS/TS: string in test("name", ...) or it("name", ...) (also Deno.test("name", ...))
  • Rust: function name following #[test]

IEC 62304 mapping file format (iec62304_mapping.csv):

RequirementID,SoftwareItem,IntegrationSystemTest,Evidence
REQ-EXAMPLE-1,Example Module,verify_reliability.py,Test logs

Repo Configuration

Create .traceability/config.json to override defaults:

{
  "traceability_dir": "docs/traceability",
  "traceability_output_dir": "docs/traceability/generated",
  "requirements_file": "requirements.md",
  "risk_controls_file": "risk_controls.md",
  "matrix_file": "traceability_matrix.csv",
  "iec62304_mapping_file": "iec62304_mapping.csv",
  "gtest_roots": ["tests"],
  "pytest_roots": ["bindings/python/tests"],
  "js_roots": ["packages/web/tests"],
  "rust_roots": ["crates/core/tests", "crates/core/src"]
}

You can also point to a custom config with TRACEABILITY_CONFIG=/path/to/config.json.

Coverage Threshold

Default is 100%. Override with:

TRACEABILITY_REQ_COVERAGE=0.95 tracetree validate

Submodule Rollup

tracetree aggregate reads .gitmodules and validates each submodule that contains traceability files. Results are written to: docs/traceability/generated/aggregate/traceability_rollup.md. Combined source + generated files are copied to: docs/traceability/generated/aggregate/combined/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tracetree-0.1.5.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tracetree-0.1.5-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file tracetree-0.1.5.tar.gz.

File metadata

  • Download URL: tracetree-0.1.5.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for tracetree-0.1.5.tar.gz
Algorithm Hash digest
SHA256 19aef22e76828acca5d18662281cdb979675b71ea2094b4b573a3cf1dfd20a1a
MD5 164a6abd12a68c9e3948dccc401ab830
BLAKE2b-256 5e3bf1527cb0adacf68b82e047132372d001e38a657531236292f496d9773629

See more details on using hashes here.

File details

Details for the file tracetree-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: tracetree-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for tracetree-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e7e4bb680f9bc94547ac50bcc668be8746313c356d929adeb42d10e8c96ca149
MD5 731e654c65b3a6b10ece25bd8868cabd
BLAKE2b-256 f4369544c86b3d067465830b362865c3a74a01d3d8b86e08a1979c22c7aedacf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page