Commit Graph

2 Commits

Author SHA1 Message Date
Jinguang Dong 932a68b33e Add SPDX license standardization for reference data generation
- Add spdx_converter.py to convert license names to SPDX standard identifiers
- Add generate_reference_data.py to generate reference_data.json from README.OpenSource files
- Update data/spdx.json with latest SPDX license list (712 licenses)
- Update test/reference_data.json with SPDX-standardized license identifiers
- Add unit tests for SPDX converter (10 test methods, 28 subtests)
- Add Python project configuration files (pyproject.toml, requirements.txt)

Features:
- Converts license variants like "MIT License" -> "MIT", "GPL-2.0" -> "GPL-2.0-only"
- Handles WITH exception format (e.g., "Apache-2.0 WITH LLVM-exception")
- Supports multiple license separators (;, /, ,, or, OR)
- Validates all generated license identifiers against SPDX standard

All license identifiers in reference_data.json are now valid SPDX standard.

Signed-off-by: Jinguang Dong <dongjinguang@huawei.com>
2026-02-10 18:03:16 +08:00
Jinguang Dong 8e335ba71a Description:[feature] Provide SPDX metadata integration and automated license
name matching for SBOM and README.OpenSource validation
Bug: https://gitee.com/openharmony/developtools_integration_verification/issues/IB1BR3
Test: Give the detailed test verification procedure

Signed-off-by: Jinguang Dong <dongjinguang@huawei.com>
2024-11-01 11:10:34 +08:00