Skip to content

Commit ff993cb

Browse files
fix a few issues in test script
- also fix a schema problem in Geometry.py - add KNOWNISSUES.md - change CONTROL_STREAMS to reflect a change in the spec
1 parent b77cf86 commit ff993cb

File tree

4 files changed

+152
-129
lines changed

4 files changed

+152
-129
lines changed

KNOWNISSUES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* Commands resources temporarily unreachable on OSH
2+
* Updating Observations does not seem to work on OSH

conSys4Py/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class APITerms(Enum):
1010
COMMANDS = 'commands'
1111
COMPONENTS = 'components'
1212
CONFORMANCE = 'conformance'
13-
CONTROL_STREAMS = 'controls'
13+
CONTROL_STREAMS = 'controlstreams'
1414
DATASTREAMS = 'datastreams'
1515
DEPLOYMENTS = 'deployments'
1616
EVENTS = 'events'

conSys4Py/datamodels/swe_components.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,20 @@ class GeometrySchema(AnyComponentSchema):
8080
updatable: bool = Field(False)
8181
optional: bool = Field(False)
8282
definition: str = Field(...)
83-
constraint: dict = Field(default_factory=dict(
84-
geomTypes=[GeometryTypes.POINT.value, GeometryTypes.LINESTRING.value, GeometryTypes.POLYGON.value,
85-
GeometryTypes.MULTI_POINT.value, GeometryTypes.MULTI_LINESTRING.value,
86-
GeometryTypes.MULTI_POLYGON.value]))
83+
# constraint: dict = Field(default_factory=dict(
84+
# geomTypes=[GeometryTypes.POINT.value, GeometryTypes.LINESTRING.value, GeometryTypes.POLYGON.value,
85+
# GeometryTypes.MULTI_POINT.value, GeometryTypes.MULTI_LINESTRING.value,
86+
# GeometryTypes.MULTI_POLYGON.value]))
87+
constraint: dict = Field(default_factory=lambda: {
88+
'geomTypes': [
89+
GeometryTypes.POINT.value,
90+
GeometryTypes.LINESTRING.value,
91+
GeometryTypes.POLYGON.value,
92+
GeometryTypes.MULTI_POINT.value,
93+
GeometryTypes.MULTI_LINESTRING.value,
94+
GeometryTypes.MULTI_POLYGON.value
95+
]
96+
})
8797
nil_values: list = Field(None, serialization_alias='nilValues')
8898
srs: str = Field(...)
8999
value: Geometry = Field(None)

0 commit comments

Comments
 (0)