Skip to content

Python: Move sample validation script from samples/ to scripts/#4400

Merged
TaoChenOSU merged 1 commit intomicrosoft:mainfrom
TaoChenOSU:taochen/python-move-sample-validation-scripts
Mar 2, 2026
Merged

Python: Move sample validation script from samples/ to scripts/#4400
TaoChenOSU merged 1 commit intomicrosoft:mainfrom
TaoChenOSU:taochen/python-move-sample-validation-scripts

Conversation

@TaoChenOSU
Copy link
Contributor

@TaoChenOSU TaoChenOSU commented Mar 2, 2026

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

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@TaoChenOSU TaoChenOSU self-assigned this Mar 2, 2026
Copilot AI review requested due to automatic review settings March 2, 2026 19:06
@TaoChenOSU TaoChenOSU added python samples Issue relates to the samples labels Mar 2, 2026
@github-actions github-actions bot changed the title Move sample validation script from samples/ to scripts/ Python: Move sample validation script from samples/ to scripts/ Mar 2, 2026
@TaoChenOSU TaoChenOSU moved this to In Review in Agent Framework Mar 2, 2026
@markwallace-microsoft markwallace-microsoft added the documentation Improvements or additions to documentation label Mar 2, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_validation to sample_validation under python/scripts/.
  • Updates internal imports and CLI docs to reference sample_validation.
  • Updates the python-sample-validation GitHub Actions workflow to run from python/scripts and 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-dir defaulting to ./_sample_validation/reports, but the CLI default is now ./sample_validation/reports (and the workflow uploads from python/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, but sample_validation/ lives under python/scripts/ and python/scripts isn’t a package. Unless the user cds into python/scripts (as the CI workflow does), python -m sample_validation won’t be importable. Consider updating the README usage section to include cd scripts (from python/) or otherwise clarify the required working directory/PYTHONPATH.
    python/scripts/sample_validation/main.py:57
  • --output-dir now defaults to ./sample_validation/reports, but later the code builds the path as samples_dir / args.output_dir, which will put reports under python/samples/sample_validation/reports (and won’t match the GitHub Actions artifact path under python/scripts/...). Consider resolving args.output_dir relative to the current working directory or python_root instead of samples_dir so reports are saved under python/scripts/sample_validation/reports by default.

@TaoChenOSU TaoChenOSU enabled auto-merge March 2, 2026 19:15
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Mar 2, 2026
Merged via the queue into microsoft:main with commit d7abfcd Mar 2, 2026
36 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Agent Framework Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python samples Issue relates to the samples

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants