Skip to content

Conversation

@tipatterson-dev
Copy link
Collaborator

This pull request introduces several significant updates and refactorings to the OSHConnect library, focusing on improving support for control streams, updating schema models, and enhancing API resource handling. Key changes include the addition of new resource types and content types, refactoring of control stream and command schema classes, and updates to discovery and resource handling logic. These changes collectively improve the library's extensibility, type safety, and alignment with evolving API specifications.

Control Stream and Command Schema Refactoring

  • The ControlStream class and related logic have been refactored and its implementation moved, with the introduction of a new ControlStream import and updates to its resource handling. The ControlChannel class is removed and replaced by improved handling of control streams.
  • Schema models for commands and control streams are reworked: ControlStreamJSONSchema is replaced by a hierarchy of command schema classes (CommandSchema, SWEJSONCommandSchema, JSONCommandSchema), with updated field names and type annotations for better clarity and extensibility.

API Resource and Content Type Enhancements

  • New API resource types (STATUS, SCHEMA) and content types (ContentTypes replacing EncodingSchema) are added, with corresponding updates to endpoint mapping and default object representations. This improves flexibility in resource handling and serialization.

Discovery Logic Improvements

  • The discovery logic for control streams is implemented, enabling the system to discover and register control streams for each system, similar to datastream discovery.

Resource Model Updates

  • Resource models are updated to use more appropriate time and schema types (e.g., TimePeriod, TimeInstant, and new command schema references), improving type safety and expressiveness.

Miscellaneous and Structural Changes

  • The version of the package is incremented to 0.3.0a5.
  • Various code cleanups, including removal of unused code, commented-out legacy methods, and improved type annotations in classes such as Node and OSHClientSession.
    These changes collectively modernize the OSHConnect codebase, improve its extensibility for new resource types, and clarify schema handling for control streams and commands.

@tipatterson-dev tipatterson-dev merged commit 2760592 into main Oct 23, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants