Repository navigation
fix(vis): declare Vis as public API (3.9.1) - #186
Merged
Merged
Conversation
Vis, VisDeltas, and FinishEntry have been re-exported from pymat.vis since 3.4 / 3.6 / 3.8 respectively, but their __module__ attribute still pointed at the private pymat.vis._model location — so type(material.vis), repr, IDE auto-import, and Sphinx all surfaced the underscore-prefixed path, pushing downstream code (build123d, ocp_vscode) toward `from pymat.vis._model import Vis`. Rewrite __module__ at the public re-export site and document the public-API contract in the pymat.vis docstring: field names and constructor signatures of these three types follow semver. The Vis field set mirrors glTF 2.0 / Three.js MeshPhysicalMaterial — a stable external spec, so the freeze cost is intentionally low. Pin with TestPublicApiContract so a future refactor that moves the implementation can't silently regress the public path. Closes #98 Refs MorePET/mat-vis#282
6 tasks
3 tasks done
gerchowl
added a commit
that referenced
this pull request
May 6, 2026
Bundles four schema-foundation feats merged after 3.9.0 plus the Vis public-API clarification into a single release: - feat(schema): _sources provenance table (#150 / #182) - feat(schema): _stddev sibling sugar + ufloat boundary helper (#149 / #183) - feat(policy): data licensing policy + CI license gate (#174 / #184) - feat(schema): T-dependent property curves (#148 / #185) - fix(vis): declare Vis as public API (#98 / #186) Three feats × one fix → minor version bump per semver. The version 3.9.1 originally proposed for the Vis public-API change alone became inconsistent once the four schema feats had landed on main without their own release cut, so they're rolled into 3.10.0 honestly rather than shipped as a misleading patch. CHANGELOG entry for 3.10.0 covers all five items with PR + issue links. .release-please-manifest.json synced to 3.10.0 so the open release-please PR (#80) recomputes correctly going forward.
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
Vis.__module__/VisDeltas.__module__/FinishEntry.__module__to"pymat.vis"at the public re-export site, sotype(material.vis),repr, IDE auto-import suggestions, and Sphinx cross-references stop pointing at the privatepymat.vis._modellocation.pymat.vismodule docstring: field names and constructor signatures ofVis/VisDeltas/FinishEntryfollow semver. TheVisfield set mirrors glTF 2.0 / Three.js MeshPhysicalMaterial — stable external spec, low freeze cost.tests/test_vis.py::TestPublicApiContract(4 tests).No code change, no API change — metadata + docs catching up to facts. The classes have been in
pymat.vis.__all__for three minor versions; this release just stops the underscore-prefixed import path from looking like the canonical one.Why
Bernhard hit this in build123d#1270 and filed mat-vis #282 cross-referencing our #98. Closing both with a stake-in-the-ground rather than another quiet release.
Test plan
uv run pytest— 576 passed, 18 skippedTestPublicApiContract::test_vis_module_path_is_publicTestPublicApiContract::test_visdeltas_module_path_is_publicTestPublicApiContract::test_finishentry_module_path_is_publicTestPublicApiContract::test_repr_uses_public_path(behavioral pin viatype(stainless.vis).__module__)After merge
release-please picks up the
fix:commit → opens / updates Release PR → tag → PyPI publish viarelease.yml(OIDC trusted publisher).Closes #98
Refs MorePET/mat-vis#282