Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ __pycache__/
.env
/node_modules
latest_logs
schemas.json
build
/src/tests/tests_output/
*.egg-info
.coverage*
.mypy_cache
.mypy_cache
opengeodeweb_viewer_schemas.json
15 changes: 9 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies = {file = ["requirements.txt"]}
where = ["src"]

[tool.setuptools.package-data]
"opengeodeweb_viewer.rpc.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.generic.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.points.schemas" = ["*.json"]
Expand Down
57 changes: 5 additions & 52 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=./requirements.txt --pre ./requirements-internal.in ./requirements.in
# pip-compile --output-file=./requirements.txt --pre ./requirements.in
#
aiohappyeyeballs==2.*,>=2.6.1
# via aiohttp
Expand All @@ -12,54 +12,20 @@ aiosignal==1.*,>=1.4.0
# via aiohttp
attrs==25.*,>=25.3.0
# via aiohttp
blinker==1.*,>=1.9.0
# via
# flask
# opengeodeweb-microservice
click==8.*,>=8.3.0
# via
# flask
# opengeodeweb-microservice
contourpy==1.*,>=1.3.3
# via matplotlib
cycler==0.*,>=0.12.1
# via matplotlib
fastjsonschema==2.*,>=2.21.1
# via opengeodeweb-microservice
flask==3.*,>=3.1.2
# via
# flask-sqlalchemy
# opengeodeweb-microservice
flask-sqlalchemy==3.*,>=3.1.1
# via opengeodeweb-microservice
fonttools==4.*,>=4.60.1
# via matplotlib
frozenlist==1.*,>=1.7.0
# via
# aiohttp
# aiosignal
greenlet==3.*,>=3.2.4
# via
# opengeodeweb-microservice
# sqlalchemy
idna==3.10
# via yarl
itsdangerous==2.*,>=2.2.0
# via
# flask
# opengeodeweb-microservice
jinja2==3.*,>=3.1.6
# via
# flask
# opengeodeweb-microservice
kiwisolver==1.*,>=1.4.10rc0
kiwisolver==1.4.10rc0
# via matplotlib
markupsafe==3.*,>=3.0.2
# via
# flask
# jinja2
# opengeodeweb-microservice
# werkzeug
matplotlib==3.*,>=3.10.6
# via vtk
multidict==6.*,>=6.6.4
Expand All @@ -70,8 +36,6 @@ numpy==2.*,>=2.3.3
# via
# contourpy
# matplotlib
opengeodeweb-microservice==1.*,>=1.0.1rc1
# via -r requirements-internal.in
packaging==25.0
# via matplotlib
pillow==11.*,>=11.3.0
Expand All @@ -80,29 +44,18 @@ propcache==0.*,>=0.3.2
# via
# aiohttp
# yarl
pyparsing==3.*,>=3.3.0a1
pyparsing==3.3.0a1
# via matplotlib
python-dateutil==2.9.*,>=2.9.0.post0
python-dateutil==2.9.0.post0
# via matplotlib
six==1.*,>=1.17.0
# via python-dateutil
sqlalchemy==2.*,>=2.0.43
# via
# flask-sqlalchemy
# opengeodeweb-microservice
typing-extensions==4.*,>=4.15.0
# via
# aiosignal
# opengeodeweb-microservice
# sqlalchemy
# via aiosignal
vtk==9.5.2
# via -r requirements.in
websocket-client==1.*,>=1.8.0
# via -r requirements.in
werkzeug==3.*,>=3.1.3
# via
# flask
# opengeodeweb-microservice
wslink==1.12.4
# via -r requirements.in
yarl==1.*,>=1.20.1
Expand Down
7 changes: 7 additions & 0 deletions src/opengeodeweb_viewer/rpc/schemas/kill.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"rpc": "kill",
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
}
24 changes: 24 additions & 0 deletions src/opengeodeweb_viewer/rpc/utils_protocols.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Standard library imports
import os

# Third party imports
from wslink import register as exportRpc

# Local application imports
from opengeodeweb_viewer.utils_functions import get_schemas_dict
from opengeodeweb_viewer.vtk_protocol import VtkView


class VtkUtilsView(VtkView):
mesh_prefix = "opengeodeweb_viewer."
mesh_schemas_dict = get_schemas_dict(
os.path.join(os.path.dirname(__file__), "schemas")
)

def __init__(self) -> None:
super().__init__()

@exportRpc(mesh_prefix + mesh_schemas_dict["kill"]["rpc"])
def kill(self) -> None:
print("Manual viewer kill, shutting down...", flush=True)
os._exit(0)
2 changes: 2 additions & 0 deletions src/opengeodeweb_viewer/vtkw_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
VtkModelBlocksView,
)
from .rpc.generic.generic_protocols import VtkGenericView
from .rpc.utils_protocols import VtkUtilsView


# =============================================================================
Expand Down Expand Up @@ -78,6 +79,7 @@ def initialize(self):
model_protocols = VtkModelView()
vtk_view = VtkView()
self.registerVtkWebProtocol(vtk_view)
self.registerVtkWebProtocol(VtkUtilsView())
self.registerVtkWebProtocol(VtkViewerView())
self.registerVtkWebProtocol(mesh_protocols)
self.registerVtkWebProtocol(VtkMeshPointsView())
Expand Down
Loading