Skip to content

Part3 compliance update#32

Merged
tipatterson-dev merged 18 commits intomainfrom
part3-compliance-update
May 2, 2026
Merged

Part3 compliance update#32
tipatterson-dev merged 18 commits intomainfrom
part3-compliance-update

Conversation

@tipatterson-dev
Copy link
Copy Markdown
Collaborator

@tipatterson-dev tipatterson-dev commented May 2, 2026

adds support for the current working draft version of part 3 of the OGC API ConnectedSystems as well as numerous data model improvements to more precisely align with SWE Common Data Model Version 3.0.

Also sports some dev ex improvements and various bug fixes

closes:
#21, #22 and #25

tipatterson-dev and others added 18 commits October 24, 2025 23:29
fix a couple of incorrect schema models
…nd update docs

  - Add :data suffix to all MQTT resource data topics per CS API Part 3 draft spec
    (observations:data, commands:data, status:data)
  - Add get_event_topic() and subscribe_events() to StreamableResource for CloudEvents lifecycle notification subscriptions
  - Add data_topic flag to APIHelper.get_mqtt_topic() and StreamableResource.get_mqtt_topic()
  - Expand __init__.py to re-export 36 public symbols across core resources, timemanagement, resource data models, SWE schema components, event system, and CS API constants — enabling single-import workflows
  - Populate csapi4py/__init__.py with re-exports for lower-level access
  - Fix pre-existing bare import bug: `from eventbus` → `from .eventbus` in oshconnectapi.py
  - Bump version to 0.4.0a0
  - Add tests/test_imports.py to verify all public symbols are importable without src-path hacks (works on any machine after uv sync / pip install -e .)
  - Overhaul docs: fix stale module references in api.rst, update tutorial import paths, add Part 3 streaming and event subscription examples, fix conf.py sys.path, update README with doc generation instructions
- implement resource events
- implement sqlite datastore
- fix various bugs related to deserialization
- update lock file to work with python 3.14
…em due to an incorrect reference to underlying_resource's format
…ing events

- Move Event, EventHandler, IEventListener, EventBuilder, and event-type
  enums into a new oshconnect.events sub-package; eventbus.py becomes a
  backward-compat shim
- Add CallbackListener and EventHandler.subscribe() for callback-based
  subscriptions
- Publish ADD_NODE/REMOVE_NODE/ADD_SYSTEM/ADD_DATASTREAM/ADD_CONTROLSTREAM
  events from OSHConnect lifecycle methods
- Emit NEW_OBSERVATION on Datastream MQTT messages and
  NEW_COMMAND/NEW_COMMAND_STATUS on ControlStream MQTT messages via a new
  _emit_inbound_event hook
- Add on_observation, on_system_added, on_command convenience subscribers
  and an event_bus property on OSHConnect
- Add tests covering CS API Part 3 MQTT topic conventions
- Add oshconnect.datastores sub-package with SQLiteDataStore, a stdlib
  sqlite3-backed implementation of the DataStore interface
- Resources are stored as JSON blobs keyed by resource id with foreign-key
  columns for filtered lookups; supports ":memory:" for tests
- Add test_datastore.py covering save/load round-trips for nodes, systems,
  datastreams, and control streams using in-memory SQLite
…d. added a JSONDatastreamRecordschema for testing serialization/deserialization
… optional name, but every binding context (DataRecord.fields, DataChoice.items, Vector.coordinates, DataArray/Matrix.elementType, and the root recordSchema/resultSchema/parametersSchema of datastream and control‑stream wrappers)

  now validates that each bound child has a non‑empty name matching the NameToken pattern ^[A-Za-z][A-Za-z0-9_\-]*$.
…n tests to check validation survives transformation of data to wire format and back
@tipatterson-dev tipatterson-dev merged commit fe8ae1d into main May 2, 2026
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.

1 participant