Skip to content

Commit 23e18f3

Browse files
Merge pull request #337 from robbievanleeuwen/update-rhino3dm
Bump rhino3dm from 8.0.0b2 to 8.0.0b3, remove python 3.10 & 3.11 restriction for `rhino` extra
2 parents b658537 + aff0aa0 commit 23e18f3

File tree

11 files changed

+48
-51
lines changed

11 files changed

+48
-51
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ poetry install
8383
Install with the `rhino` and `cad` extras:
8484

8585
```shell
86-
poetry install --all-extras
86+
poetry install --extras "dxf rhino"
8787
```
8888

8989
You can now run an interactive Python session, or the command-line interface:

docs/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Install with the ``rhino`` and ``cad`` extras:
9595

9696
.. code:: shell
9797
98-
poetry install --all-extras
98+
poetry install --extras "dxf rhino"
9999
100100
You can now run an interactive Python session, or the command-line interface:
101101

docs/installation.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,3 @@ To install ``sectionproperties`` with the above functionality, use the ``dxf`` a
4343
4444
pip install sectionproperties[dxf]
4545
pip install sectionproperties[rhino]
46-
47-
Note that the ``rhino`` option only supports python ``3.9`` due to incomplete wheel
48-
coverage of ``rhino3dm``.

docs/user_guide/geometry.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ Various CAD files can be imported to creating ``sectionproperties`` geometries.
111111
installation. To install ``sectionproperties`` with CAD import functionality, use
112112
the ``dxf`` and/or ``rhino`` options:
113113

114-
.. code-block:: shell
114+
.. code-block:: shell
115115
116-
pip install sectionproperties[dxf]
117-
pip install sectionproperties[rhino]
116+
pip install sectionproperties[dxf]
117+
pip install sectionproperties[rhino]
118118
119119
.. _label-geometry-dxf:
120120

noxfile.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,9 @@ def tests(session: Session) -> None:
144144
Args:
145145
session: Nox session
146146
"""
147-
# provide only dxf dependencies if python version is 3.10 or 3.11
148-
if session.python == "3.9":
149-
session.run_always("poetry", "install", "--all-extras", external=True)
150-
else:
151-
session.run_always("poetry", "install", "--extras", "dxf", external=True)
147+
session.run_always(
148+
"poetry", "install", "--only", "main", "--extras", "dxf rhino", external=True
149+
)
152150

153151
# install relevant tooling
154152
session.install("coverage[toml]", "pytest", "pygments", "pytest-check")
@@ -161,7 +159,7 @@ def tests(session: Session) -> None:
161159
"-m",
162160
"pytest",
163161
"-m",
164-
"not benchmark",
162+
"not benchmark_suite",
165163
*session.posargs,
166164
)
167165
finally:
@@ -197,7 +195,9 @@ def docs_build(session: Session) -> None:
197195
if not session.posargs and "FORCE_COLOR" in os.environ:
198196
args.insert(0, "--color")
199197

200-
session.run_always("poetry", "install", "--all-extras", external=True)
198+
session.run_always(
199+
"poetry", "install", "--only", "main", "--extras", "dxf rhino", external=True
200+
)
201201
session.install(
202202
"furo",
203203
"ipykernel",
@@ -226,7 +226,9 @@ def docs(session: Session) -> None:
226226
session: Nox session
227227
"""
228228
args = session.posargs or ["--open-browser", "docs", "docs/_build"]
229-
session.run_always("poetry", "install", "--all-extras", external=True)
229+
session.run_always(
230+
"poetry", "install", "--only", "main", "--extras", "dxf rhino", external=True
231+
)
230232
session.install(
231233
"furo",
232234
"ipykernel",

poetry.lock

Lines changed: 17 additions & 15 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
@@ -57,10 +57,10 @@ rich = "^13.6.0"
5757
click = "^8.1.7"
5858
more-itertools = "^10.1.0"
5959
cad-to-shapely = { version = "^0.3.1", optional = true }
60-
rhino-shapley-interop = { version = "^0.0.4", python = ">=3.9.0,<3.10", optional = true }
61-
rhino3dm = { version = "==8.0.0b2", python = ">=3.9.0,<3.10", optional = true }
60+
rhino-shapley-interop = { version = "^0.0.4", optional = true }
61+
rhino3dm = { version = "==8.0.0b3", optional = true }
6262

63-
[tool.poetry.dev-dependencies]
63+
[tool.poetry.group.dev.dependencies]
6464
black = "^23.9.1"
6565
coverage = { extras = ["toml"], version = "^7.3.2" }
6666
darglint = "^1.8.1"
@@ -115,6 +115,7 @@ lines_after_imports = 2
115115

116116
[tool.pytest.ini_options]
117117
markers = [
118+
"benchmark_suite: entire benchmark test suite (select with '-m benchmark_suite')",
118119
"benchmark_geom: geometry benchmark tests (select with '-m benchmark_geom')",
119120
"benchmark_mesh: mesh benchmark tests (select with '-m benchmark_mesh')",
120121
"benchmark_analysis: analysis benchmark tests (select with '-m benchmark_analysis')",

tests/benchmarks/test_benchmark_analysis.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from sectionproperties.analysis import Section
66

77

8-
@pytest.mark.benchmark
8+
@pytest.mark.benchmark_suite
99
@pytest.mark.benchmark_analysis
1010
@pytest.mark.parametrize("elements", [50, 500, 5000])
1111
def test_create_section(benchmark, analysis_geometry, elements):
@@ -18,7 +18,7 @@ def create_section():
1818
benchmark(create_section)
1919

2020

21-
@pytest.mark.benchmark
21+
@pytest.mark.benchmark_suite
2222
@pytest.mark.benchmark_analysis
2323
@pytest.mark.parametrize("elements", [50, 500, 5000])
2424
def test_geometric_analysis(benchmark, analysis_geometry, elements):
@@ -32,7 +32,7 @@ def geometric_analysis():
3232
benchmark(geometric_analysis)
3333

3434

35-
@pytest.mark.benchmark
35+
@pytest.mark.benchmark_suite
3636
@pytest.mark.benchmark_analysis
3737
def test_plastic_analysis(benchmark, analysis_geometry):
3838
"""Benchmark test for conducting a plastic analysis.
@@ -49,7 +49,7 @@ def plastic_analysis():
4949
benchmark(plastic_analysis)
5050

5151

52-
@pytest.mark.benchmark
52+
@pytest.mark.benchmark_suite
5353
@pytest.mark.benchmark_analysis
5454
@pytest.mark.parametrize("elements", [50, 500, 5000])
5555
def test_warping_analysis(benchmark, analysis_geometry, elements):
@@ -64,7 +64,7 @@ def warping_analysis():
6464
benchmark(warping_analysis)
6565

6666

67-
@pytest.mark.benchmark
67+
@pytest.mark.benchmark_suite
6868
@pytest.mark.benchmark_analysis
6969
@pytest.mark.parametrize("elements", [50, 500, 5000])
7070
def test_frame_analysis(benchmark, analysis_geometry, elements):
@@ -78,7 +78,7 @@ def frame_analysis():
7878
benchmark(frame_analysis)
7979

8080

81-
@pytest.mark.benchmark
81+
@pytest.mark.benchmark_suite
8282
@pytest.mark.benchmark_analysis
8383
@pytest.mark.parametrize("elements", [50, 500, 5000])
8484
def test_stress_analysis(benchmark, analysis_geometry, elements):

tests/benchmarks/test_benchmark_geom.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
from sectionproperties.pre.library import circular_hollow_section, rectangular_section
66

77

8-
@pytest.mark.benchmark
8+
@pytest.mark.benchmark_suite
99
@pytest.mark.benchmark_geom
1010
def test_create_simple_geometry(benchmark):
1111
"""Benchmark test for creating rectangular geometry."""
1212
benchmark(rectangular_section, d=100, b=50)
1313

1414

15-
@pytest.mark.benchmark
15+
@pytest.mark.benchmark_suite
1616
@pytest.mark.benchmark_geom
1717
def test_create_intermediate_geometry(benchmark):
1818
"""Benchmark test for creating CHS geometry."""
1919
benchmark(circular_hollow_section, d=100, t=3, n=128)
2020

2121

22-
@pytest.mark.benchmark
22+
@pytest.mark.benchmark_suite
2323
@pytest.mark.benchmark_geom
2424
def test_create_complex_geometry(benchmark, concrete_column_with_hole):
2525
"""Benchmark test for creating concrete geometry."""

tests/benchmarks/test_benchmark_mesh.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import pytest
44

55

6-
@pytest.mark.benchmark
6+
@pytest.mark.benchmark_suite
77
@pytest.mark.benchmark_mesh
88
@pytest.mark.parametrize("ms", [0.0, 50.0, 5.0])
99
def test_create_simple_mesh(benchmark, rect_geom, ms):
@@ -12,7 +12,7 @@ def test_create_simple_mesh(benchmark, rect_geom, ms):
1212
benchmark(geom.create_mesh, ms)
1313

1414

15-
@pytest.mark.benchmark
15+
@pytest.mark.benchmark_suite
1616
@pytest.mark.benchmark_mesh
1717
@pytest.mark.parametrize("ms", [0.0, 1.0, 0.3])
1818
def test_create_intermediate_mesh(benchmark, chs_geom, ms):
@@ -21,7 +21,7 @@ def test_create_intermediate_mesh(benchmark, chs_geom, ms):
2121
benchmark(geom.create_mesh, ms)
2222

2323

24-
@pytest.mark.benchmark
24+
@pytest.mark.benchmark_suite
2525
@pytest.mark.benchmark_mesh
2626
@pytest.mark.parametrize("ms", [0.0, 100.0, 20.0])
2727
def test_create_complex_mesh(benchmark, concrete_column_with_hole, ms):

0 commit comments

Comments
 (0)