refactor(package): rename p2m -> assert_eval (CLI is assert-eval) - #108
Merged
Conversation
…2m' kept for backward compat) Adds the canonical assert-eval entry point while retaining assert and p2m aliases. Updates CLI help examples, viewer spawn defaults, docs, examples, scripts, and test comments to show assert-eval commands. Leaves the Python package and module name unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tangym
approved these changes
May 27, 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.
Summary
Renames the Python package and unifies the CLI surface to use a single canonical name across the whole project. There is no behavior change — every import, console-script invocation, and YAML callable path now points at the new module.
p2m/assert_eval/p2massert_evalp2m-policyassert-evalp2m/assert/assert-eval(aliases)assert-evalonlymicrosoft/ASSERTWhy these names
assertalone is a Python keyword, so the module cannot be named that.assert_eval(snake_case) mirrors the kebab-case CLIassert-eval, following the convention ofpython-dotenv→dotenv,scikit-learn→sklearn. The PyPI distribution nameassert-evalmatches the CLI binary, so users discover and install with the same string.Breaking changes
p2mandassertconsole-script aliases are removed. Onlyassert-evalis registered. Anyone withp2m run …in scripts or docs must migrate toassert-eval run ….import p2mno longer resolves. Migrate toimport assert_eval.pip install p2m-policyno longer works. Usepip install assert-eval(or the equivalent git-URL install during the preview).Migration
Scope of this PR
git mv p2m/ assert_eval/— preserves history for all 77 module files.from p2m/import p2mreference (≈420 statements across 120 files): tests, examples, scripts, viewer, docs.pyproject.toml: distribution name (p2m-policy→assert-eval), packages discovery (["p2m*", …]→["assert_eval*", …]), console-script aliases removed.examples/**/artifacts/results/**are left untouched — they are records of what was executed at the time and would mis-represent history if rewritten.Note on
.github/workflows/regression.ymlThe five-line update to the regression workflow (path filter
p2m/**→assert_eval/**, env varP2M_AZURE_DEPLOYMENT→ASSERT_AZURE_DEPLOYMENT, and three comment lines) is being applied as a separate commit via the GitHub web UI because the gh CLI OAuth App on EMU cannot grantworkflowscope for the push. The change is mechanically identical to the rest of the rename.Validation
uv pip install -e .✅assert-eval --help→ exits 0, shows full subcommand list ✅assert --help/p2m --help→ command not found (intended) ✅python -c "import assert_eval"✅ /python -c "import p2m"→ModuleNotFoundError(intended) ✅uv run --no-sync --active pytest -q→ 835 passed, 14 skipped, 450 subtests passed (baseline match) ✅Downstream
microsoft-foundry/build-2026-demoscookbook pinsp2m-policyin itsrequirements.txt. Tracking sync in microsoft-foundry/build-2026-demos#8 — should merge in the same window as this PR.