Skip to content

Commit 52177a6

Browse files
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWeb-Back into feat/light_viewable
2 parents 961c2dc + b2eb7c3 commit 52177a6

File tree

7 files changed

+61
-22
lines changed

7 files changed

+61
-22
lines changed

.github/workflows/CICD.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414
- uses: actions/setup-python@v5
1515
with:
16-
python-version: "3.9"
16+
python-version: "3.12"
1717
- name: Test
1818
run: |
1919
pip install -r requirements.txt

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,47 @@
11
# CHANGELOG
22

33

4+
## v5.7.4 (2025-05-21)
5+
6+
7+
## v5.7.4-rc.2 (2025-05-21)
8+
9+
### Bug Fixes
10+
11+
- **Copyright**: Update year
12+
([`af8afcf`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/af8afcfafb9a7ed6f98add3263feead6ea8a25b1))
13+
14+
15+
## v5.7.4-rc.1 (2025-05-21)
16+
17+
### Bug Fixes
18+
19+
- **python 3.12**: Compatibility
20+
([`0b43168`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/0b43168d1ce5776c2767172df02e922898c908bb))
21+
22+
23+
## v5.7.3 (2025-05-20)
24+
25+
26+
## v5.7.3-rc.1 (2025-05-20)
27+
28+
### Bug Fixes
29+
30+
- **blueprint_models**: Set current_index
31+
([`1e831c7`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/1e831c792d99bd812234e7a03cab25902dc6c9fb))
32+
33+
34+
## v5.7.2 (2025-05-19)
35+
36+
37+
## v5.7.2-rc.1 (2025-05-19)
38+
39+
### Bug Fixes
40+
41+
- **blueprint_models**: Change getroot to find & rm current_index from the if
42+
([`3ddcf96`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/3ddcf96fff539f273542da63f6091f654e892ad1))
43+
44+
445
## v5.7.1 (2025-05-07)
546

647

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ Detailed changes for each release are documented in the [release notes](https://
2929

3030
[MIT](https://opensource.org/licenses/MIT)
3131

32-
Copyright (c) 2019 - 2024, Geode-solutions
32+
Copyright (c) 2019 - 2025, Geode-solutions

pyproject.toml

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

66
[project]
77
name = "OpenGeodeWeb-Back"
8-
version = "5.7.1"
8+
version = "5.7.4"
99
dynamic = ["dependencies"]
1010
authors = [
1111
{ name="Geode-solutions", email="[email protected]" },
1212
]
1313
description = "OpenGeodeWeb-Back is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem"
1414
readme = "README.md"
15-
requires-python = ">=3.8"
15+
requires-python = ">=3.9, <3.13"
1616
classifiers = [
1717
"Programming Language :: Python :: 3",
1818
"License :: OSI Approved :: MIT License",

src/opengeodeweb_back/routes/models/blueprint_models.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ def uuid_to_flat_index():
2525
)
2626

2727
tree = ET.parse(vtm_file_path)
28-
root = tree.getroot()
28+
root = tree.find("vtkMultiBlockDataSet")
2929
uuid_to_flat_index = {}
30-
current_index = 1
30+
current_index = 0
3131

3232
for elem in root.iter():
3333
if "uuid" in elem.attrib and elem.tag == "DataSet":
3434
uuid_to_flat_index[elem.attrib["uuid"]] = current_index
35-
current_index += 1
35+
36+
current_index += 1
3637

3738
return flask.make_response(
3839
{"uuid_to_flat_index": uuid_to_flat_index},

src/opengeodeweb_back/utils_functions.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import flask
99
from jsonschema import validate
1010
from jsonschema.exceptions import ValidationError
11-
import pkg_resources
11+
import importlib.metadata as metadata
1212

1313
# Local application imports
1414

@@ -70,10 +70,7 @@ def versions(list_packages: list):
7070
list_with_versions = []
7171
for package in list_packages:
7272
list_with_versions.append(
73-
{
74-
"package": package,
75-
"version": pkg_resources.get_distribution(package).version,
76-
}
73+
{"package": package, "version": metadata.distribution(package).version}
7774
)
7875
return list_with_versions
7976

tests/test_models_routes.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ def test_model_mesh_components(client):
44
json = get_full_data()
55
response = client.post(route, json=json)
66
assert response.status_code == 200
7+
78
uuid_dict = response.json["uuid_to_flat_index"]
8-
assert type(uuid_dict) is dict
9+
assert isinstance(uuid_dict, dict)
910

1011
indices = list(uuid_dict.values())
1112
indices.sort()
12-
assert indices[0] == 1
13-
assert all(indices[i] == indices[i - 1] + 1 for i in range(1, len(indices)))
13+
assert all(indices[i] > indices[i - 1] for i in range(1, len(indices)))
14+
for uuid in uuid_dict.keys():
15+
assert isinstance(uuid, str)
1416

1517

1618
def test_extract_brep_uuids(client):
1719
route = "/models/mesh_components"
1820
json_data = {"filename": "cube.og_brep", "geode_object": "BRep"}
19-
2021
response = client.post(route, json=json_data)
2122

2223
assert response.status_code == 200
2324
uuid_dict = response.json["uuid_dict"]
2425
assert isinstance(uuid_dict, dict)
25-
assert (
26-
"Block" in uuid_dict
27-
or "Line" in uuid_dict
28-
or "Surface" in uuid_dict
29-
or "Corner" in uuid_dict
30-
)
26+
expected_keys = {"Block", "Line", "Surface", "Corner"}
27+
assert any(key in uuid_dict for key in expected_keys)
28+
for key, value in uuid_dict.items():
29+
assert isinstance(value, list)
30+
assert all(isinstance(v, str) for v in value)

0 commit comments

Comments
 (0)