Skip to content

Add dataset and composite required phrase commands - #1

Open
Kaushik-Kumar-CEG wants to merge 2 commits into
mainfrom
gsoc/package-foundation
Open

Add dataset and composite required phrase commands#1
Kaushik-Kumar-CEG wants to merge 2 commits into
mainfrom
gsoc/package-foundation

Conversation

@Kaushik-Kumar-CEG

@Kaushik-Kumar-CEG Kaushik-Kumar-CEG commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

adds the package foundation and two installed commands:

build-required-phrases-dataset creates deterministic BIOES training splits from marked ScanCode rules
add-composite-required-phrases uses existing single-license required phrases to update matching composite rules

both commands use ScanCode rule loading, validation, matching and mutation APIs

Usage:

build-required-phrases-dataset --rules-dir path/to/rules --output-dir dataset-output
add-composite-required-phrases --dry-run --verbose

Test it with:

./configure --dev
venv/bin/pytest -q tests/test_dataset.py tests/test_composite_rules.py
venv/bin/ruff check

This is the first PR in the package stack

Add the dataset builder as an installable module with a console entry point, focused tests, and documentation.

Signed-off-by: Kaushik Kumar <kaushikrjpm10@gmail.com>
Add composite rule annotation as an installable command using existing ScanCode matching and mutation helpers. Include focused tests and documentation.

Signed-off-by: Kaushik Kumar <kaushikrjpm10@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant