feat(bundle)!: adopt the spec-generated records - #531
Merged
Merged
Conversation
specklepy was two spec generations behind — pinned at 1.0.0 while the C# SDK sits on 1.1.0 heading to 1.2.0. Re-vendors to 1.2.0, which flips ten nullability flags, adds Rel.CENTERLINE, and brings in the two new generated modules (bundle_nodes, bundle_rows). Writers take those records instead of loose scalars: add_material, add_level, add_collection, add_container, add_property_set_definition and the get_or_add_* wrappers. add_container gains gh_topology, which the C# equivalent already carried. The hand-written CameraView is replaced by the generated one; meta.produced_by is hand-set non-nullable, since meta is not emitted into BY_TABLE in either SDK. Material interning now compares whole records rather than name and argb. Reusing a key with a different opacity or roughness previously returned the first material and silently dropped the new values — the same defect just fixed in C#. normalize_material is public so callers can normalise before comparing, or an unnormalised repeat compares unequal to a row it would write identically. Read side: node_fields projects a row onto its per-kind record and raises naming the node and column when a mandatory column is NULL, and the flattened properties on ModelMaterial/ModelColor/ModelLevel/ ModelContainer/ModelDefinition become a single .fields record. BREAKING CHANGE: writer methods take spec records, and the Model* read classes expose .fields instead of flattened scalar properties. Structural results stay unimplemented — no Python consumer needs them and the spec constants were already vendored unused. Verified: 191 bundle tests pass with the spec conformance validator actually running (not skipped), and verify-pin reports 5 files matching @speckle/bundle-spec@1.2.0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for specklepy ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
speckle-bundle-spec#32 squash-merged as 82ae2e9, so the previous pin pointed at a branch commit that is not an ancestor of main. Also corrects specHash. The old value was computed on Windows before that repo gained a .gitattributes, so it hashed the spec SQL with CRLF line endings; the real LF hash is 45c91980. verify-pin never reads specHash, so nothing would have caught it — it is provenance metadata that would simply have been wrong. Vendored files are unchanged: all five are byte-identical to merged main. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
gjedlicska
approved these changes
Sep 24, 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.
Aligns specklepy with the bundle spec's generated records, following the C# SDK and connectors.
specklepy was two spec generations behind — pinned at 1.0.0 while C# sits on 1.1.0 heading to 1.2.0. Re-vendors to 1.2.0 (ten nullability flags,
Rel.CENTERLINE, and the newbundle_nodes/bundle_rowsmodules), then adopts those records in the writer API and the read facade.Depends on:
Breaking: writer methods take spec records instead of loose scalars, and the
Model*read classes expose.fieldsinstead of flattened scalar properties.Two behaviour fixes worth calling out:
node_fieldsraises, naming the node and column, when a spec-mandatory column is NULL on read, instead of surfacing it asNone.Structural results stay unimplemented — no Python consumer needs them.
Verified with 191 bundle tests passing, the spec conformance validator actually running rather than skipping, and
verify-pinreporting 5 files matching@speckle/bundle-spec@1.2.0.BUNDLE_SPEC_PIN.jsonpoints at a commit on the spec PR branch. Repin to the merge commit of speckle-bundle-spec#32 before merging this.🤖 Generated with Claude Code