Skip to content

Commit 83796ec

Browse files
committed
Merge branch 'fix/database' of https://github.com/Geode-solutions/OpenGeodeWeb-Viewer into fix/database
2 parents 634cf25 + 35f8b58 commit 83796ec

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def registerMesh(self, params: dict[str, Union[str, int, float, bool]]) -> None:
2828
try:
2929
_ = self.get_data(data_id)
3030
file_path = self.get_data_file_path(data_id)
31-
31+
3232
reader = vtk.vtkXMLGenericDataObjectReader()
3333
reader.SetFileName(file_path)
3434
filter = {}
@@ -81,7 +81,9 @@ def deregisterMesh(self, params: dict[str, Union[str, int, float, bool]]) -> Non
8181
self.deregisterObject(data_id)
8282

8383
@exportRpc(mesh_prefix + mesh_schemas_dict["visibility"]["rpc"])
84-
def SetMeshVisibility(self, params: dict[str, Union[str, int, float, bool]]) -> None:
84+
def SetMeshVisibility(
85+
self, params: dict[str, Union[str, int, float, bool]]
86+
) -> None:
8587
validate_schema(params, self.mesh_schemas_dict["visibility"], self.mesh_prefix)
8688
data_id, visibility = params["id"], params["visibility"]
8789
self.SetVisibility(data_id, visibility)
@@ -93,7 +95,9 @@ def setMeshOpacity(self, params: dict[str, Union[str, int, float, bool]]) -> Non
9395
self.SetOpacity(data_id, opacity)
9496

9597
@exportRpc(mesh_prefix + mesh_schemas_dict["color"]["rpc"])
96-
def setMeshColor(self, params: dict[str, Union[str, int, float, bool, dict]]) -> None:
98+
def setMeshColor(
99+
self, params: dict[str, Union[str, int, float, bool, dict]]
100+
) -> None:
97101
validate_schema(params, self.mesh_schemas_dict["color"], self.mesh_prefix)
98102
data_id, red, green, blue = (
99103
params["id"],

src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def __init__(self) -> None:
2626
super().__init__()
2727

2828
@exportRpc(viewer_prefix + viewer_schemas_dict["reset_visualization"]["rpc"])
29-
def resetVisualization(self, params: dict[str, Union[str, int, float, bool]]) -> None:
29+
def resetVisualization(
30+
self, params: dict[str, Union[str, int, float, bool]]
31+
) -> None:
3032
validate_schema(
3133
params, self.viewer_schemas_dict["reset_visualization"], self.viewer_prefix
3234
)
@@ -81,7 +83,9 @@ def resetVisualization(self, params: dict[str, Union[str, int, float, bool]]) ->
8183
self.render()
8284

8385
@exportRpc(viewer_prefix + viewer_schemas_dict["set_background_color"]["rpc"])
84-
def setBackgroundColor(self, params: dict[str, Union[str, int, float, bool, dict]]) -> None:
86+
def setBackgroundColor(
87+
self, params: dict[str, Union[str, int, float, bool, dict]]
88+
) -> None:
8589
validate_schema(
8690
params, self.viewer_schemas_dict["set_background_color"], self.viewer_prefix
8791
)
@@ -109,7 +113,9 @@ def resetCamera(self, params: dict[str, Union[str, int, float, bool]]) -> None:
109113
self.render()
110114

111115
@exportRpc(viewer_prefix + viewer_schemas_dict["take_screenshot"]["rpc"])
112-
def takeScreenshot(self, params: dict[str, Union[str, int, float, bool]]) -> dict[str, Union[str, bytes]]:
116+
def takeScreenshot(
117+
self, params: dict[str, Union[str, int, float, bool]]
118+
) -> dict[str, Union[str, bytes]]:
113119
validate_schema(
114120
params, self.viewer_schemas_dict["take_screenshot"], self.viewer_prefix
115121
)
@@ -181,7 +187,9 @@ def updateData(self, params: dict[str, Union[str, int, float, bool]]) -> None:
181187
self.render()
182188

183189
@exportRpc(viewer_prefix + viewer_schemas_dict["get_point_position"]["rpc"])
184-
def getPointPosition(self, params: dict[str, Union[str, int, float, bool]]) -> dict[str, float]:
190+
def getPointPosition(
191+
self, params: dict[str, Union[str, int, float, bool]]
192+
) -> dict[str, float]:
185193
validate_schema(
186194
params, self.viewer_schemas_dict["get_point_position"], self.viewer_prefix
187195
)
@@ -209,7 +217,9 @@ def computeEpsilon(self, renderer: vtk.vtkRenderer, z: float) -> float:
209217
return math.sqrt(epsilon) * 0.0125
210218

211219
@exportRpc(viewer_prefix + viewer_schemas_dict["picked_ids"]["rpc"])
212-
def pickedIds(self, params: dict[str, Union[str, int, float, bool, list]]) -> dict[str, list[str]]:
220+
def pickedIds(
221+
self, params: dict[str, Union[str, int, float, bool, list]]
222+
) -> dict[str, list[str]]:
213223
validate_schema(
214224
params, self.viewer_schemas_dict["picked_ids"], self.viewer_prefix
215225
)
@@ -253,7 +263,9 @@ def toggleAxes(self, params: dict[str, Union[str, int, float, bool]]) -> None:
253263
self.render()
254264

255265
@exportRpc(viewer_prefix + viewer_schemas_dict["update_camera"]["rpc"])
256-
def updateCamera(self, params: dict[str, Union[str, int, float, bool, dict, list]]) -> None:
266+
def updateCamera(
267+
self, params: dict[str, Union[str, int, float, bool, dict, list]]
268+
) -> None:
257269
validate_schema(
258270
params, self.viewer_schemas_dict["update_camera"], self.viewer_prefix
259271
)

src/tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ def print_log(self) -> None:
5454
output += line
5555
print(output)
5656

57-
def get_response(self) -> Union[bytes, dict[str, Union[str, int, float, bool, list, dict]], str]:
57+
def get_response(
58+
self,
59+
) -> Union[bytes, dict[str, Union[str, int, float, bool, list, dict]], str]:
5860
response = self.ws.recv()
5961
if isinstance(response, bytes):
6062
return response

0 commit comments

Comments
 (0)