Skip to content

Commit e749534

Browse files
Merge pull request #19 from Geode-solutions/next
Next
2 parents 579b46a + d09dcb5 commit e749534

28 files changed

+180
-90
lines changed

.github/workflows/CD.yml renamed to .github/workflows/CICD.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
name: CD
1+
name: CICD
22

33
on:
44
push:
5-
branches: [master, next, json_import_viewer]
65

76
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-python@v5
12+
with:
13+
python-version: "3.9"
14+
- name: Test
15+
run: |
16+
pip install pytest pytest-xprocess
17+
pip install https://www.vtk.org/files/release/9.3/vtk_osmesa-9.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
18+
pip install -e .
19+
pytest
20+
821
build:
922
runs-on: ubuntu-latest
23+
needs: test
24+
if: github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master'
1025
steps:
1126
- name: Checkout
1227
uses: actions/checkout@v4

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ venv/
55
.vscode/
66
__pycache__/
77
.env
8-
data/
98
/node_modules
109
latest_logs
1110
schemas.json
11+
build
12+
*.egg-info

CHANGELOG.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,98 @@
22

33

44

5+
## v0.1.1-rc.2 (2024-03-13)
6+
7+
### Fix
8+
9+
* fix(CPU): handle vtk cpu ([`9fc05dc`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/9fc05dc37c37a7692850e57d5a7a2feea13aef76))
10+
11+
### Unknown
12+
13+
* Merge pull request #18 from Geode-solutions/vtk-cpu
14+
15+
fix(CPU): handle vtk cpu ([`4cc9f76`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/4cc9f7653b571065538723b4502603ef0d8f88ac))
16+
17+
* test ([`6ba1ce5`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/6ba1ce5c73f1f59a980aee2e8bbb938dc2036838))
18+
19+
20+
## v0.1.1-rc.1 (2024-03-13)
21+
22+
### Fix
23+
24+
* fix(tests): tests in src and fix paths ([`2688759`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/2688759121f1176bca6b1cec7aa9e054b8f4fd26))
25+
26+
### Unknown
27+
28+
* Merge pull request #17 from Geode-solutions/fix/github_actions
29+
30+
Fix/GitHub actions ([`24b50ee`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/24b50ee0a684590a5cfb6195430c908eec1542ee))
31+
32+
* test remove tests data in package ([`fbc4a97`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/fbc4a973d5ce0e93b7fad0491a908883a3c52896))
33+
34+
* gpu mode ([`27c12ef`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/27c12ef4369888b403a928798bbcd4266bd4bed8))
35+
36+
* test test_config path ([`b2ba02a`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/b2ba02a4426fbdc2a6f6600177907d6c3e08446f))
37+
38+
* test optional-dependencies ([`ba98f64`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/ba98f641b2d537b940d0f5421bdb16d23a1ed509))
39+
40+
* test without vtk ([`21758c6`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/21758c636719aa72b3da4d9dfded1f5c3c59322a))
41+
42+
* test on all branches build on next/master ([`37e0234`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/37e0234520a3d07a3117860c3a269b6abb50e691))
43+
44+
* test ([`6b0128c`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/6b0128cd41ea3af740447524317cc72c318636d3))
45+
46+
* test ([`b12f219`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/b12f2193a1757ac30821823f27c4cd3583765cd6))
47+
48+
* no pip install . ([`de9b14c`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/de9b14ccc5edd5539c00f8d0339a5fdc3a6d9a2b))
49+
50+
* container ([`58ddf2f`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/58ddf2f24b4f5de35f811b786a1b9bdf7943a32a))
51+
52+
* test print ([`8a2f131`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/8a2f131a01371eb6e5d1b10dc8dbd6607d9ef221))
53+
54+
* test remove timeout ([`f9680d2`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/f9680d2ff167b912dae7ea3be15d30433b8406a6))
55+
56+
* install python-dotenv ([`2c1d428`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/2c1d428487f4fc5b5ab04ea23fdd1a56644eb104))
57+
58+
* install pytest-xprocess ([`8769f65`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/8769f6588be2604fd8bbe372ecd39249088127bf))
59+
60+
* install xprocess ([`1bd3aaa`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/1bd3aaa887cf3683028229f98a1b66f8df88de28))
61+
62+
* add websocket-client ([`2de61bb`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/2de61bbe6a349ea83807774f71d14267074cdd9d))
63+
64+
* test pip install . ([`b86f686`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/b86f68652b87928066f9167978b992f9c6ff52ae))
65+
66+
* Merge pull request #16 from Geode-solutions/fix/tests
67+
68+
Fix/tests ([`5f20bf7`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/5f20bf7d64746cc4bcbfc7f71eae1f492cd55c63))
69+
70+
* pyproject.toml ([`617833e`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/617833e071e264a08450e582498c7d7827919eb0))
71+
72+
* remove CI ([`e629346`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/e629346646f3556196cd0110f96b87cda6d4556a))
73+
74+
* Merge branch 'fix/tests' of https://github.com/Geode-solutions/OpenGeodeWeb-Viewer into fix/tests ([`7fabf4a`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/7fabf4a1632eb9bd6c37bdd93915608ece00e156))
75+
76+
* change start command ([`44b7c51`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/44b7c51c3dd7f98b53001871b69033246aac1fdf))
77+
78+
* Update pyproject.toml
79+
80+
Co-authored-by: Arnaud Botella <[email protected]> ([`19fb81b`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/19fb81b78c4c731788f8aeae06d2d170f1d14f45))
81+
82+
* CICD pipeline ([`32dddc6`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/32dddc67d0bb07fa80bc763c37ffffdb8a55ae3e))
83+
84+
* script ([`fb81a0c`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/fb81a0c6cefc9b2db8953b238e67501e7942d2d8))
85+
86+
* relative imports ([`c3a4f1e`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/c3a4f1e97791ee688069e15f5d9a1f0223a19c45))
87+
88+
* add CI ([`c1cb848`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/c1cb848f8ad6b4adb3db85d8fc26d5c09ebf8e42))
89+
90+
* add datas ([`0d512f8`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/0d512f8c835367f9ef13f1dab58bf11ceb3929fd))
91+
92+
* uncomment tests ([`bb7f263`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/bb7f2639285fdc996dd5b72b2e60238b26caebe2))
93+
94+
* ([`25e758c`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/25e758c1a340ef92aed8ae60300548fdc507d9da))
95+
96+
597
## v0.1.0 (2024-03-07)
698

799
### Unknown

pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55

66
[project]
77
name = "OpenGeodeWeb-Viewer"
8-
version = "0.1.0"
8+
version = "0.1.1-rc.2"
99
dynamic = ["dependencies"]
1010
authors = [
1111
{ name="Geode-solutions", email="[email protected]" },
@@ -19,18 +19,24 @@ classifiers = [
1919
"Operating System :: OS Independent",
2020
]
2121

22+
[project.optional-dependencies]
23+
gpu = ["vtk == 9.*"]
24+
2225
[project.urls]
2326
"Homepage" = "https://github.com/Geode-solutions/OpenGeodeWeb-Viewer"
2427
"Bug Tracker" = "https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/issues"
2528

29+
[project.scripts]
30+
opengeodeweb_viewer = "opengeodeweb_viewer.vtkw_server:run_server"
31+
2632
[tool.setuptools.dynamic]
2733
dependencies = {file = ["requirements.txt"]}
2834

2935
[tool.setuptools.packages.find]
3036
where = ["src"]
3137

3238
[tool.setuptools.package-data]
33-
"opengeodeweb_Viewer.rpc.schemas" = ["*.json"]
39+
"opengeodeweb_viewer.rpc.schemas" = ["*.json"]
3440

3541
[tool.semantic_release]
3642
version_toml = [

requirements.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
jsonschema
2-
numpy
3-
vtk
4-
wslink
2+
python-dotenv
3+
wslink
4+
websocket-client

requirements.txt

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,45 +15,22 @@ attrs==23.2.0
1515
# aiohttp
1616
# jsonschema
1717
# referencing
18-
contourpy==1.2.0
19-
# via matplotlib
20-
cycler==0.12.1
21-
# via matplotlib
22-
fonttools==4.49.0
23-
# via matplotlib
2418
frozenlist==1.4.1
2519
# via
2620
# aiohttp
2721
# aiosignal
2822
idna==3.6
2923
# via yarl
30-
importlib-resources==6.1.2
31-
# via matplotlib
3224
jsonschema==4.21.1
3325
# via -r requirements.in
3426
jsonschema-specifications==2023.12.1
3527
# via jsonschema
36-
kiwisolver==1.4.5
37-
# via matplotlib
38-
matplotlib==3.8.3
39-
# via vtk
4028
multidict==6.0.5
4129
# via
4230
# aiohttp
4331
# yarl
44-
numpy==1.26.4
45-
# via
46-
# -r requirements.in
47-
# contourpy
48-
# matplotlib
49-
packaging==23.2
50-
# via matplotlib
51-
pillow==10.2.0
52-
# via matplotlib
53-
pyparsing==3.1.2
54-
# via matplotlib
55-
python-dateutil==2.9.0.post0
56-
# via matplotlib
32+
python-dotenv==1.0.1
33+
# via -r requirements.in
5734
referencing==0.33.0
5835
# via
5936
# jsonschema
@@ -62,13 +39,9 @@ rpds-py==0.18.0
6239
# via
6340
# jsonschema
6441
# referencing
65-
six==1.16.0
66-
# via python-dateutil
67-
vtk==9.3.0
42+
websocket-client==1.7.0
6843
# via -r requirements.in
6944
wslink==1.12.4
7045
# via -r requirements.in
7146
yarl==1.9.4
7247
# via aiohttp
73-
zipp==3.17.0
74-
# via importlib-resources
File renamed without changes.

src/opengeodeweb_viewer/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .config import *
2+
from .function import *
3+
from .vtk_protocol import *

src/opengeodeweb_viewer/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def dev_config():
2626

2727
def test_config():
2828
default_config()
29+
print(f"{os.path.dirname(__file__)=}", flush=True)
2930
os.environ["DATA_FOLDER_PATH"] = os.path.join(
30-
os.path.dirname(__file__), "..", "..", "tests", "data"
31+
os.path.dirname(__file__), "..", "tests", "data"
3132
)

src/opengeodeweb_viewer/vtk_protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from vtk.web import protocols as vtk_protocols
44
from wslink import register as exportRpc
55
import vtk
6-
from function import validate_schemas
6+
from .function import validate_schemas
77

88
schemas = os.path.join(os.path.dirname(__file__), "rpc/schemas")
99

src/opengeodeweb_viewer/vtkw_server.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import sys
22
import argparse
3-
import config
43
import os
54

65
from wslink import server
76
from vtk.web import wslink as vtk_wslink
87
from vtk.web import protocols as vtk_protocols
98
import vtk
10-
from vtk_protocol import VtkView
9+
from .vtk_protocol import VtkView
1110
import dotenv
11+
from .config import *
12+
1213

1314
# =============================================================================
1415
# Server class
@@ -77,16 +78,16 @@ def initialize(self):
7778
# =============================================================================
7879

7980

80-
if __name__ == "__main__":
81+
def run_server():
8182
basedir = os.path.abspath(os.path.dirname(__file__))
8283
dot_env_path = os.path.join(basedir, "../../.env")
8384
if os.path.isfile(dot_env_path):
8485
dotenv.load_dotenv(dot_env_path)
8586
PYTHON_ENV = os.environ.get("PYTHON_ENV", default="prod").strip().lower()
8687
if PYTHON_ENV == "prod":
87-
config.prod_config()
88+
prod_config()
8889
elif PYTHON_ENV == "dev":
89-
config.dev_config()
90+
dev_config()
9091

9192
parser = argparse.ArgumentParser(description="Vtk server")
9293
server.add_arguments(parser)
@@ -99,3 +100,7 @@ def initialize(self):
99100

100101
_Server.configure(args)
101102
server.start_webserver(options=args, protocol=_Server)
103+
104+
105+
if __name__ == "__main__":
106+
run_server()

src/tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)