CycloneDX / CycloneDX/cyclonedx-python-lib
docs: explain model fixture and snapshot workflow
- 主要言語
- Python
- スター
- 116
- フォーク
- 67
- 平均マージ
- 8日 2時間
- マージ済み PR(30日)
- 2
説明
### Description
The contributor documentation links to `tests/_data/snapshots/README.md`, but that file currently explains only how to regenerate snapshots. It does not explain how BOM model factories in `tests/_data/models.py` are discovered or how they feed the JSON, XML, and round-trip tests.
This gap came up in the maintainer guidance on #914: https://github.com/CycloneDX/cyclonedx-python-lib/pull/914#issuecomment-3562249425. The maintainer explicitly welcomed a dedicated documentation pull request.
### Proposed documentation
Document the existing workflow without changing test behavior:
- `get_bom_*` factory discovery and snapshot naming;
- `_invalid` fixtures;
- registration of deliberately incomplete dependency graphs;
- regenerating snapshots, reviewing only the intended files, and rerunning tests with snapshot recreation disabled.
### Acceptance
- The documented paths and collector names match the current default branch.
- The shared JSON/XML output and deserialization fixture tests pass.
- The full test suite remains green.
コントリビューションガイド
調査の方向性
tests/_data/snapshots/README.md から始め、そこにある現在のガイダンスを tests/_data/models.py および共有されている JSON/XML 出力・デシリアライゼーションの fixture テストと比較します。既存の factory discovery、snapshot の命名、_invalid fixture、不完全な依存関係グラフ、再生成のレビュー workflow を文書化します。完了の条件は、パスと collector 名が default branch と一致し、指定されたテストと全体の suite が recreation を無効にした状態で通過することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation, testing
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 74/100