Skip to content

Commit 5049f36

Browse files
Merge pull request #431 from robbievanleeuwen/update-rhino3dm
Update rhino3dm to allow python 3.12
2 parents 76775cb + 0aa0a51 commit 5049f36

File tree

5 files changed

+46
-63
lines changed

5 files changed

+46
-63
lines changed

docs/installation.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,3 @@ To install ``sectionproperties`` with the above functionality, use the ``dxf`` a
7171
7272
pip install sectionproperties[dxf]
7373
pip install sectionproperties[rhino]
74-
75-
.. warning:: The "rhino" extras do not currently support python 3.12, this may only be
76-
installed for python 3.9, 3.10 and 3.11.

noxfile.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -161,21 +161,15 @@ def tests(session: Session) -> None:
161161
Args:
162162
session: Nox session
163163
"""
164-
# if python version is 3.12, don't install rhino extras
165-
if session.python == "3.12":
166-
session.run_always(
167-
"poetry", "install", "--only", "main", "--extras", "dxf", external=True
168-
)
169-
else:
170-
session.run_always(
171-
"poetry",
172-
"install",
173-
"--only",
174-
"main",
175-
"--extras",
176-
"dxf rhino",
177-
external=True,
178-
)
164+
session.run_always(
165+
"poetry",
166+
"install",
167+
"--only",
168+
"main",
169+
"--extras",
170+
"dxf rhino",
171+
external=True,
172+
)
179173

180174
# install relevant tooling
181175
session.install("coverage[toml]", "pytest", "pygments", "pytest-check")

poetry.lock

Lines changed: 33 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,12 @@ click = "^8.1.7"
5959
more-itertools = "^10.2.0"
6060
numba = { version = "^0.59.0", optional = true }
6161
cad-to-shapely = { version = "^0.3.1", optional = true }
62-
rhino-shapley-interop = { version = "^0.0.4", python = ">=3.9.0,<3.12", optional = true }
63-
rhino3dm = { version = "^8.4.0", python = ">=3.9.0,<3.12", optional = true }
62+
rhino-shapley-interop = { version = "^0.0.4", optional = true }
63+
rhino3dm = { version = "==8.6.0", optional = true }
6464
pypardiso = { version = "^0.4.5", optional = true }
6565
intel-openmp = { version = "==2023.2.0", optional = true }
6666
mkl = { version = "==2023.2.0", optional = true }
67+
tbb = { version = "==2021.10.0", optional = true }
6768

6869
[tool.poetry.group.dev.dependencies]
6970
black = "^24.2.0"
@@ -101,7 +102,7 @@ sphinxext-opengraph = "^0.9.1"
101102
dxf = ["cad-to-shapely"]
102103
rhino = ["rhino-shapley-interop", "rhino3dm"]
103104
numba = ["numba"]
104-
pardiso = ["pypardiso", "intel-openmp", "mkl"]
105+
pardiso = ["pypardiso", "intel-openmp", "mkl", "tbb"]
105106

106107
[tool.poetry.scripts]
107108
sectionproperties = "sectionproperties.__main__:main"

tests/geometry/test_geometry.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import json
66
import platform
7-
import sys
87
from pathlib import Path
98

109
import pytest
@@ -481,7 +480,6 @@ def test_geometry_from_dxf():
481480
assert sp_geom.Geometry.from_dxf(section_holes_dxf).geom.wkt == poly
482481

483482

484-
@pytest.mark.skipif(sys.version_info >= (3, 12), reason="requires python < 3.12")
485483
def test_geometry_from_3dm_file_simple():
486484
"""Tests loading geometry from a simple .3dm file."""
487485
section = Path(__file__).parent.absolute() / "3in x 2in.3dm"
@@ -490,7 +488,6 @@ def test_geometry_from_3dm_file_simple():
490488
assert (test.geom - exp).is_empty
491489

492490

493-
@pytest.mark.skipif(sys.version_info >= (3, 12), reason="requires python < 3.12")
494491
def test_geometry_from_3dm_file_complex():
495492
"""Tests loading geometry from a complex .3dm file."""
496493
section_3dm = Path(__file__).parent.absolute() / "complex_shape.3dm"
@@ -502,7 +499,6 @@ def test_geometry_from_3dm_file_complex():
502499
assert (test.geom - exp).is_empty
503500

504501

505-
@pytest.mark.skipif(sys.version_info >= (3, 12), reason="requires python < 3.12")
506502
def test_geometry_from_3dm_file_compound():
507503
"""Tests loading compound geometry from a .3dm file."""
508504
section_3dm = Path(__file__).parent.absolute() / "compound_shape.3dm"
@@ -514,7 +510,6 @@ def test_geometry_from_3dm_file_compound():
514510
assert (MultiPolygon([ii.geom for ii in test.geoms]) - MultiPolygon(exp)).is_empty
515511

516512

517-
@pytest.mark.skipif(sys.version_info >= (3, 12), reason="requires python < 3.12")
518513
def test_geometry_from_3dm_encode():
519514
"""Tests loading compound geometry from a .json file."""
520515
section_3dm = Path(__file__).parent.absolute() / "rhino_data.json"

0 commit comments

Comments
 (0)