Skip to content

Add required phrase model command wrapper - #5267

Open
Kaushik-Kumar-CEG wants to merge 1 commit into
aboutcode-org:developfrom
Kaushik-Kumar-CEG:gsoc/review-ml-phrases
Open

Kaushik-Kumar-CEG wants to merge 1 commit into
aboutcode-org:developfrom
Kaushik-Kumar-CEG:gsoc/review-ml-phrases

Conversation

@Kaushik-Kumar-CEG

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

Copy link
Copy Markdown

adds a small optional maintenance runner for the scancode-required-phrases package

The package already installs add-model-required-phrases which is the normal way to use the workflow. This runner gives maintainers working from a scancode Toolkit checkout a visible way to launch the same command. It also explains how to install the package when it is unavailable

both commands use the same package implementation:

add-model-required-phrases --help
python etc/scripts/licenses/add_model_required_phrases.py --help

model prediction, review sessions, validation,and rule updates remain in the package. Toolkit does not include duplicate ML code or additional inference dependencies

Test it with:

./configure --dev
venv/bin/pytest -q etc/scripts/licenses/test_add_model_required_phrases.py
venv/bin/ruff check etc/scripts/licenses/add_model_required_phrases.py etc/scripts/licenses/test_add_model_required_phrases.py

@Kaushik-Kumar-CEG
Kaushik-Kumar-CEG marked this pull request as draft August 16, 2026 17:46
@Kaushik-Kumar-CEG Kaushik-Kumar-CEG changed the title add review workflow for ml predicted required phrases Add review workflow to approve predicted phrases before injection Aug 17, 2026
@Kaushik-Kumar-CEG
Kaushik-Kumar-CEG marked this pull request as ready for review September 7, 2026 15:21

@Shriprasad-P Shriprasad-P left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

PR: Add review workflow to approve predicted phrases before injection

Touched: etc/scripts/dataset_pipeline/add_ml_phrases.py, etc/scripts/dataset_pipeline/review_ml_phrases.py, etc/scripts/dataset_pipeline/test_add_ml_phrases.py, etc/scripts/dataset_pipeline/test_review_ml_phrases.py

  • Addresses a concrete correctness/reliability issue based on the title and diff.
  • Security-sensitive change — please double-check edge cases and defaults.
  • CI/tooling change — confirm the pipeline still passes on this branch.
  • Diff is fairly large (+1740/-0); a short summary of risk areas from the author would help reviewers.

Commenting as a drive-by reviewer after reading the diff. Happy to look again if maintainers want a deeper pass on a specific file.

@Kaushik-Kumar-CEG

Kaushik-Kumar-CEG commented Sep 20, 2026

Copy link
Copy Markdown
Author

Update: the complete review workflow now lives in the dedicated aboutcode-org/scancode-required-phrases package in package PR #4. I plan to reduce this PR to a small Toolkit runner that calls the installed package, so Toolkit does not keep duplicate model or review logic

Signed-off-by: Kaushik Kumar <kaushikrjpm10@gmail.com>
@Kaushik-Kumar-CEG Kaushik-Kumar-CEG changed the title Add review workflow to approve predicted phrases before injection Add required phrase model command wrapper Sep 20, 2026
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.

2 participants