Skip to content

docs: document model fixture discovery and snapshot recreation workflow - #1043

Closed
CAOShurong wants to merge 1 commit into
CycloneDX:mainfrom
CAOShurong:docs/model-fixture-snapshots-workflow
Closed

docs: document model fixture discovery and snapshot recreation workflow#1043
CAOShurong wants to merge 1 commit into
CycloneDX:mainfrom
CAOShurong:docs/model-fixture-snapshots-workflow

Conversation

@CAOShurong

Copy link
Copy Markdown
Contributor

Description

This documentation PR addresses #1030 by expanding tests/_data/snapshots/README.md to document the full model fixture and snapshot workflow:

  • Fixture discovery: Explains dynamic discovery of get_bom_*() factories via inspect.getmembers(sys.modules[__name__], isfunction) into all_get_bom_funct_valid, all_get_bom_funct_valid_immut, and all_get_bom_funct_valid_reversible_migrate.
  • _invalid fixtures: Documents that factories ending with _invalid are collected in all_get_bom_funct_invalid for testing error-handling and schema validation failure cases.
  • Version constraints: Describes _LIMIT_GET_BOM_BY_VERSION_REGEX / is_valid_for_schema_version() logic for filtering versioned fixtures (e.g. get_bom_v1_5_*).
  • Snapshot naming convention: Explains the mksname(purpose, sv, f) naming scheme <factory_name>-<schema_version>.<ext>[.bin].
  • Incomplete dependency graphs: Clarifies the purpose of all_get_bom_funct_with_incomplete_deps.
  • Re-creation workflow: Details running CDX_TEST_RECREATE_SNAPSHOTS=1 PYTHONHASHSEED=0, reviewing git diffs to avoid committing unintentional modifications, and verifying with snapshot re-creation disabled.

Resolves or fixes issue: #1030

AI Tool Disclosure

  • My contribution does not include any AI-generated content
  • My contribution includes AI-generated content, as disclosed below:
    • AI Tools: Antigravity
    • LLMs and versions: Gemini 3.8 Flash
    • Prompts: Document model fixture discovery, naming conventions, and snapshot re-creation workflow in tests/_data/snapshots/README.md resolving issue #1030

Affirmation

@CAOShurong
CAOShurong requested a review from a team as a code owner September 9, 2026 14:27
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@read-the-docs-community

Copy link
Copy Markdown

@jkowalleck jkowalleck added documentation Improvements or additions to documentation CT Continuous Testing labels Sep 9, 2026
@jkowalleck

Copy link
Copy Markdown
Member

does this differ from #1031 ?

@jkowalleck

Copy link
Copy Markdown
Member

looks like there are 2 PRs opened by you, @CAOShurong , for the same scope/topic:

please consolidate the content in just one PR, and close the other.

@CAOShurong

Copy link
Copy Markdown
Contributor Author

Thanks @jkowalleck! Consolidating into #1031 as suggested. I've updated #1031 with the additional schema version constraint documentation (all DCO sign-offs verified and CI green). Closing this duplicate PR in favor of #1031.

@CAOShurong CAOShurong closed this Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CT Continuous Testing documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants