Conversation
Library rewrite to bring it into alignment with probeinterface spec 0.3.x and to replace weakly-typed, mutation-heavy API with an immutable, strongly-typed design. Breaking API changes - Contact changed from readonly struct to sealed class; PosX/PosY changed from float to double; PosZ (double?) added for 3D probe support - Contact.DeviceId and Contact.Index removed; channel mapping now lives exclusively on Probe.ChannelMap via ChannelWiring - Contact.ContactId/ShankId are now nullable (string?) - ContactAnnotations.cs removed; contact_annotations is now backed by an internal ContactAnnotationStore shared across all contacts on a probe - Contact now has GetAnnotation<T>, SetAnnotation<T>, RemoveAnnotation for per-contact typed annotation access - Probe parallel-array properties (ContactPositions, ContactPlaneAxes, ContactShapes, ContactShapeParams, DeviceChannelIndices, ContactIds, ShankIds) removed; all per-contact data is now accessed via Probe.Contacts - Probe static factory helpers (DefaultContactShapes, DefaultCircleParams, etc.) removed - ProbeAnnotations.Name renamed to ModelName to match JSON key "model_name" - ProbeAnnotations.AdditionalProperties made private; typed access via GetAnnotation<T>, SetAnnotation<T>, RemoveAnnotation, AnnotationKeys - ContactShapeParam shape properties changed from float? to double?; null shape params omitted from JSON (NullValueHandling.Ignore) - ProbeGroup.Validate() now only throws; it no longer mutates data - ProbeGroup.Normalize() removed; optional fields such as contact_plane_axes, device_channel_indices, contact_ids, and shank_ids are omitted from JSON when absent rather than defaulted - ProbeGroup.ForceContactIdsToZeroIndexed() removed; contact IDs are labels, not indices, and forcing them corrupted valid data - ProbeGroup.SetDefaultDeviceChannelIndicesIfMissing() removed; device_channel_indices is optional per the spec - ProbeGroup.GetContactIds(), GetDeviceChannelIndices(), GetContacts() removed New API Surface - ChannelWiring static class: WireChannels, WireChannel, UnwireChannel, UnwireChannels with cross-probe uniqueness validation and rollback - ProbeGroup.GetChannelMap() returns a global channel -> (probe, contact) map - Probe.GetContactAnnotation<T>, SetContactAnnotation<T>, RemoveContactAnnotation for bulk parallel-array annotation access - Probe.ContactAnnotationKeys enumerates defined annotation keys - Probe.ChannelMap exposes the contact→channel mapping as a read-only dictionary; null means no channels assigned Test Infrastructure - Test project, generated using claude code, added tests covering round-trips against all probeinterface_library fixtures, schema validation, channel wiring, probe/contact annotation API, and spec validation edge cases - probeinterface_library added as a git submodule for real-world round-trip and schema tests - probe.json.schema bundled as an embedded resource for schema validation - generate_fixtures.py added for regenerating synthetic test fixtures
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.
Library rewrite to bring it into alignment with probeinterface spec 0.3.x and to replace weakly-typed, mutation-heavy API with an immutable, strongly-typed design.
Breaking API changes
New API Surface
Test Infrastructure