6/7 Turn Plotly compat into a number, and correct §24's two wrong premises - #307
Conversation
§24 has asked since the audit for compat to be "a measured number" instead of vibes. Implementing it turned up two things the plan assumed that are not true. **No published Plotly wheel ships `plot-schema.json`.** Checked against 4.14.3, 5.24.1, and 6.9.0: it is a plotly.js artifact, and the Python package generates validator classes from it. The equivalent — and a better shape for this job, being one flat entry per dotted path — is `plotly/validators/_validators.json`. The real surface is 9,472 leaf attributes once compound namespaces and `*src` column-reference companions come out, three times the ~3,000 the dossier estimated. **There is no Plotly shim to warn.** The shipped shim is `xy.pyplot`, which is Matplotlib-flavored, so "supported" cannot mean "the shim accepts this attribute" — nothing would be accepting it. It means XY can express the same visual outcome, decided by a committed rule table in the script. 9,472 attributes cannot be audited one at a time, and a table implying they were would be fiction; every rule names the XY surface that answers it, so any row can be traced to the claim that produced it. The number, scoped to the trace types XY implements plus `layout`: 344 supported and 126 mapped-with-difference of 3,387. Whole-schema: 345 and 126 of 9,472, where the denominator is dominated by 3-D, geo, polar, and financial traces XY does not implement. Both are published because either alone misleads — the first overstates by hiding its scope, the second understates by counting work never attempted. 2,190 attributes land in `unsupported/unclassified`: no committed rule claims them. That bucket is reported rather than folded into a friendlier one, and `tests/test_plotly_schema_coverage.py` fails if it disappears, if the report is hand-edited, if `*src` companions pad the denominator, or if the scoped number loses the sentence that scopes it.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…son-matrix' into claude/customization-capability-matrix-vckjxg-6-plotly-schema-coverage
Merging this PR will not alter performance
Comparing Footnotes
|
Stacked on #306.
§24 has asked since the audit for compat to be "a measured number" instead of vibes. Implementing it turned up two things the plan assumed that are not true.
Premise 1:
plot-schema.jsondoes not shipChecked against plotly 4.14.3, 5.24.1, and 6.9.0 — it is a plotly.js artifact, and the Python package generates validator classes from it instead. The only surviving trace is a docstring reference in
_plotly_utils/basevalidators.py.The equivalent — and a better shape for this job, being one flat entry per dotted path — is
plotly/validators/_validators.json. The real surface is 9,472 leaf attributes once compound namespaces and*srccolumn-reference companions come out. The dossier estimated ~3,000; it was 3× low.Premise 2: there is no Plotly shim to warn
The shipped shim is
xy.pyplot, which is Matplotlib-flavored. So "supported" cannot mean "the shim accepts this attribute" — nothing would be accepting it. It means xy can express the same visual outcome, decided by a committed rule table in the script. 9,472 attributes cannot be audited one at a time, and a table implying they were would be fiction; every rule names the xy surface that answers it, so any row traces back to the claim that produced it.The number
Scoped to the trace types xy implements plus
layout: 344 supported, 126 mapped-with-difference of 3,387.Whole-schema: 345 and 126 of 9,472, where the denominator is dominated by 3-D, geo, polar, and financial traces xy does not implement.
Both are published because either alone misleads — the first overstates by hiding its scope, the second understates by counting work never attempted. The report says so in as many words, and a test enforces that the sentence survives.
The honest residue
2,190 attributes land in
unsupported/unclassified: no committed rule claims them. That bucket is reported rather than folded into a friendlier one, and shrinking it is how the table improves.tests/test_plotly_schema_coverage.pyfails if it disappears, if the report is hand-edited, if*srccompanions pad the denominator, or if the scoped number loses its scope.Both §24 and risk row 13 in the dossier are updated to match reality.
uv run pytest2358 passed.Generated by Claude Code