Skip to content

Commit 3f07ec4

Browse files
Merge pull request #31 from Botts-Innovative-Research/config-and-eventbus
postfix an issue with system discovery
2 parents 2760592 + f1b0da7 commit 3f07ec4

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "oshconnect"
3-
version = "0.3.0a5"
3+
version = "0.3.0a5.post1"
44
description = "Library for interfacing with OSH, helping guide visualization efforts, and providing a place to store configurations."
55
readme = "README.md"
66
authors = [

src/oshconnect/resource_datamodels.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@
88

99
from typing import List
1010

11-
from timemanagement import TimeInstant
12-
from .geometry import Geometry
13-
from .api_utils import Link
1411
from pydantic import BaseModel, ConfigDict, Field, SerializeAsAny, model_validator
1512
from shapely import Point
1613

14+
from .api_utils import Link
15+
from .geometry import Geometry
1716
from .schema_datamodels import DatastreamRecordSchema, CommandSchema
18-
from .timemanagement import TimePeriod
17+
from .timemanagement import TimeInstant, TimePeriod
1918

2019

2120
class BoundingBox(BaseModel):

src/oshconnect/streamableresource.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
from uuid import UUID, uuid4
2525
from collections import deque
2626

27+
from pydantic.v1.utils import to_lower_camel
28+
2729
from .csapi4py.constants import ContentTypes
2830
from .schema_datamodels import JSONCommandSchema
2931
from .csapi4py.mqtt import MQTTCommClient
@@ -193,7 +195,10 @@ def discover_systems(self):
193195
for system_json in system_objs:
194196
print(system_json)
195197
system = SystemResource.model_validate(system_json)
196-
sys_obj = System.from_system_resource(system, self)
198+
sys_obj = System(label=system.properties['name'],
199+
name=to_lower_camel(system.properties['name'].replace(" ", "_")),
200+
urn=system.properties['uid'], parent_node=self)
201+
197202
self._systems.append(sys_obj)
198203
new_systems.append(sys_obj)
199204
return new_systems

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)