Skip to content

Rename DeviceInfo to DeviceMetadata - #132

Merged
glopesdev merged 1 commit into
harp-tech:mainfrom
glopesdev:rename-device-metadata
Aug 27, 2026
Merged

Rename DeviceInfo to DeviceMetadata#132
glopesdev merged 1 commit into
harp-tech:mainfrom
glopesdev:rename-device-metadata

Conversation

@glopesdev

Copy link
Copy Markdown
Contributor

The deserialized device.yml root is now DeviceMetadata. That is the name the codebase already gives it everywhere else: the reader is ReadDeviceMetadata, the round-trip pair is MetadataDeserializer and MetadataSerializer, every generator parameter is deviceMetadata, and all nine T4 templates bind the object as DeviceMetadata. One concept now travels under one word.

The sibling types keep their names. RegisterInfo, BitMaskInfo, GroupMaskInfo, PayloadMemberInfo and PortPinInfo are unchanged, following the shape reflection uses, where the entry point is Type with no suffix while the elements within it are PropertyInfo, FieldInfo and MethodInfo. The document root and the nodes inside it play different roles and read better under different names.

Breaking change

DeviceInfo is a public type, so anything naming it needs updating. The rename is whole-word and total: no member, overload or file name changes with it, and the YAML contract is untouched, since deserialization maps on property names rather than on the root type name.

Notes for review

Generated output is unchanged for every target. No expected output file moves, which is the check that the rename stays inside the model and never reaches emitted code.

Nine templates now read <#@ parameter name="DeviceMetadata" type="DeviceMetadata" #>, so the generated template property shares its type name. That is the "color color" case, which C# permits, and it compiles.

GetMemberAnnotation in src/Python.cs is deleted in passing. It forwarded to GetMemberNumpyType and was called from nowhere.

Closes #128

The deserialized device.yml root is now DeviceMetadata, agreeing with
the name it already carries everywhere else: the reader, the serializer
pair, every parameter in the generators, and the object each of the
nine templates binds. The sibling RegisterInfo, BitMaskInfo,
GroupMaskInfo, PayloadMemberInfo and PortPinInfo keep their names,
following the shape reflection uses where the entry point carries no
suffix and the elements within it do.

Generated output is unchanged for every target.

Closes harp-tech#128
@glopesdev
glopesdev requested a review from bruno-f-cruz August 26, 2026 09:10
@glopesdev glopesdev added the feature New planned feature label Aug 26, 2026
@glopesdev
glopesdev merged commit a241d5e into harp-tech:main Aug 27, 2026
9 checks passed
@glopesdev
glopesdev deleted the rename-device-metadata branch August 27, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New planned feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename DeviceInfo to DeviceMetadata

1 participant