Make xy.pyplot gallery-compatible with Matplotlib 3.11 - #413
Conversation
|
Too many files changed for review. ( |
|
Important Review skippedToo many files! This PR contains 552 files, which is 252 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (552)
You can disable this status message by setting the Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
|
Final exact-head acceptance audit is complete for
The PR description now contains the complete standard shard artifact IDs/digests and final acceptance evidence. The PR remains draft for maintainer review. |
There was a problem hiding this comment.
All reported issues were addressed
Not reviewed (too large): gallery/matplotlib-3.11.1/manifest.json (~14,146 lines), gallery/matplotlib-3.11.1/baseline.json (~11,911 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.
Note: This PR contains a large number of files. cubic only reviews up to 200 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 72 files (changes from recent commits).
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 8 files (changes from recent commits).
Not reviewed (too large): gallery/matplotlib-3.11.1/baseline.json (~1,861 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/pyplot_gallery/contract.py">
<violation number="1" location="scripts/pyplot_gallery/contract.py:1445">
P3: The schema-1 verifier now requires the baseline summary to equal the independently pinned `LEGACY_SCHEMA_ONE_SUMMARY` (e.g. `xy_execution_passed` must be exactly 189), but `build_contract` still writes its schema-1 `baseline["summary"]` by deriving it from the live audit via `_legacy_summary` (line ~730). These two only coincide when the audit reproduced by `build_contract` matches exactly the historical d505ef pass/waiver numbers (189/172/168/127/327). If the contract is rebuilt with a current, improved audit (more passes, fewer waivers), the freshly built schema-1 `baseline.json` will fail its own `verify_contract` with confusing "baseline summary ... must be 189" errors until it is promoted to schema 3. Consider either having `build_contract` emit the pinned schema-1 summary directly (making a build verify round-trip without promotion), or documenting/enforcing that a schema-1 build is only valid for the historical audit and should never be verified pre-promotion.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
| else: | ||
| if baseline.get("audit_commit") != LEGACY_SCHEMA_ONE_AUDIT_COMMIT: | ||
| errors.append("schema-1 baseline audit_commit is not the pinned historical audit") | ||
| expected_summary = dict(LEGACY_SCHEMA_ONE_SUMMARY) if baseline_paths_match else {} |
There was a problem hiding this comment.
P3: The schema-1 verifier now requires the baseline summary to equal the independently pinned LEGACY_SCHEMA_ONE_SUMMARY (e.g. xy_execution_passed must be exactly 189), but build_contract still writes its schema-1 baseline["summary"] by deriving it from the live audit via _legacy_summary (line ~730). These two only coincide when the audit reproduced by build_contract matches exactly the historical d505ef pass/waiver numbers (189/172/168/127/327). If the contract is rebuilt with a current, improved audit (more passes, fewer waivers), the freshly built schema-1 baseline.json will fail its own verify_contract with confusing "baseline summary ... must be 189" errors until it is promoted to schema 3. Consider either having build_contract emit the pinned schema-1 summary directly (making a build verify round-trip without promotion), or documenting/enforcing that a schema-1 build is only valid for the historical audit and should never be verified pre-promotion.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/pyplot_gallery/contract.py, line 1445:
<comment>The schema-1 verifier now requires the baseline summary to equal the independently pinned `LEGACY_SCHEMA_ONE_SUMMARY` (e.g. `xy_execution_passed` must be exactly 189), but `build_contract` still writes its schema-1 `baseline["summary"]` by deriving it from the live audit via `_legacy_summary` (line ~730). These two only coincide when the audit reproduced by `build_contract` matches exactly the historical d505ef pass/waiver numbers (189/172/168/127/327). If the contract is rebuilt with a current, improved audit (more passes, fewer waivers), the freshly built schema-1 `baseline.json` will fail its own `verify_contract` with confusing "baseline summary ... must be 189" errors until it is promoted to schema 3. Consider either having `build_contract` emit the pinned schema-1 summary directly (making a build verify round-trip without promotion), or documenting/enforcing that a schema-1 build is only valid for the historical audit and should never be verified pre-promotion.</comment>
<file context>
@@ -1403,33 +1415,34 @@ def verify_contract(root: Path = CORPUS_ROOT) -> list[str]:
- )
+ if baseline.get("audit_commit") != LEGACY_SCHEMA_ONE_AUDIT_COMMIT:
+ errors.append("schema-1 baseline audit_commit is not the pinned historical audit")
+ expected_summary = dict(LEGACY_SCHEMA_ONE_SUMMARY) if baseline_paths_match else {}
for key, expected in expected_summary.items():
if baseline.get("summary", {}).get(key) != expected:
</file context>
Summary
Makes
xy.pyplota gallery-compatible drop-in surface for Matplotlib 3.11 while preserving the dependency-free, performance-oriented native renderer.native,compat, and lazyautomodes plusplt.set_mode(),plt.get_mode(), andXY_PYPLOT_MODE.module://xy.backends.backend_xyMatplotlib backend.Matplotlib supplies frontend semantics in compat mode, but accepted charts are rendered by XY: gallery acceptance rejects Agg or any other renderer fallback.
Gallery contract
The original Python and notebook archives remain provenance-locked at 507 members each. XY's runnable contract excludes the 48 three-dimensional examples and contains 459 byte-exact source files.
pyplot-eligible sources acceptedpyplotbackend/font/GUI examples classifiedExact pixels are not required. The four non-exact dimensions (
skewt,figure_size_units,horizontal_barchart_distribution, andcolormap_reference) pass the documented tolerant dimension policy. All other structural, semantic, visual, and behavioral gates pass without waivers.Executable contract and CI
The harness:
The browser probes use a bounded Playwright/Chromium driver, fail closed when CI requires a browser, preserve semantic diagnostics, and avoid Linux Chromium first-profile hangs.
Evidence and tracked root causes
Browse the permanent comparison screenshots.
xy.pyplotRoot-cause issues include complete upstream Matplotlib sources, comparison screenshots, affected-example counts, acceptance tests, and the
pyplotlabel:pcolormesh/hist2dFixes #354
Fixes #409
Fixes #414
Fixes #415
Fixes #416
Revalidates #410 and #411.