Python: Move sample validation script from samples/ to scripts/#4400
Merged
TaoChenOSU merged 1 commit intomicrosoft:mainfrom Mar 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Relocates the Python sample validation tooling into python/scripts/ to keep python/samples/ focused on customer-facing sample content, and updates CI + imports to use the new module name/location.
Changes:
- Renames/re-homes the validation package from
_sample_validationtosample_validationunderpython/scripts/. - Updates internal imports and CLI docs to reference
sample_validation. - Updates the
python-sample-validationGitHub Actions workflow to run frompython/scriptsand upload reports from the new location.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| python/scripts/sample_validation/workflow.py | Updates workflow composition imports to sample_validation.*. |
| python/scripts/sample_validation/run_dynamic_validation_workflow_executor.py | Updates imports and formatting after package move. |
| python/scripts/sample_validation/report.py | Updates model imports and formatting. |
| python/scripts/sample_validation/models.py | Introduces shared datamodels for the validation pipeline in the new location. |
| python/scripts/sample_validation/discovery.py | Updates imports to new models module and minor formatting. |
| python/scripts/sample_validation/create_dynamic_workflow_executor.py | Updates imports from renamed package and formatting. |
| python/scripts/sample_validation/const.py | Adds constant module in the new package location. |
| python/scripts/sample_validation/main.py | Updates CLI usage/docs and path resolution after move. |
| python/scripts/sample_validation/init.py | Updates package exports/imports to new module name. |
| python/scripts/sample_validation/README.md | Updates documentation to reflect new scripts/sample_validation location and module name. |
| .github/workflows/python-sample-validation.yml | Runs validation from python/scripts and updates artifact path + OpenAI var names. |
Comments suppressed due to low confidence (3)
python/scripts/sample_validation/README.md:118
- The README still documents
--output-dirdefaulting to./_sample_validation/reports, but the CLI default is now./sample_validation/reports(and the workflow uploads frompython/scripts/sample_validation/reports). Please update the documented default so it matches the current CLI behavior/location.
python/scripts/sample_validation/README.md:106 - The usage examples run
uv run python -m sample_validation, butsample_validation/lives underpython/scripts/andpython/scriptsisn’t a package. Unless the usercds intopython/scripts(as the CI workflow does),python -m sample_validationwon’t be importable. Consider updating the README usage section to includecd scripts(frompython/) or otherwise clarify the required working directory/PYTHONPATH.
python/scripts/sample_validation/main.py:57 --output-dirnow defaults to./sample_validation/reports, but later the code builds the path assamples_dir / args.output_dir, which will put reports underpython/samples/sample_validation/reports(and won’t match the GitHub Actions artifact path underpython/scripts/...). Consider resolvingargs.output_dirrelative to the current working directory orpython_rootinstead ofsamples_dirso reports are saved underpython/scripts/sample_validation/reportsby default.
giles17
approved these changes
Mar 2, 2026
dmytrostruk
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
We need to keep the samples/ dir as clean as possible as that's our customer landing point to the repo.
Description
Move the sample validation scripts from samples/ to scripts/
Contribution Checklist