Skip to content

Commit ce8891c

Browse files
Update dependencies and fix linting errors
1 parent e9921ab commit ce8891c

File tree

13 files changed

+237
-173
lines changed

13 files changed

+237
-173
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@ jobs:
2222

2323
steps:
2424
- name: Check out the repo
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v6
2626

2727
- name: Install uv version ${{ env.UV_VERSION }}
28-
uses: astral-sh/setup-uv@v6
28+
uses: astral-sh/setup-uv@v7
2929
with:
3030
version: ${{ env.UV_VERSION }}
31-
enable-cache: true
3231

3332
- name: Install python ${{ env.DEFAULT_PYTHON_VERSION }} using uv
3433
run: uv python install ${{ env.DEFAULT_PYTHON_VERSION }}
@@ -46,13 +45,12 @@ jobs:
4645

4746
steps:
4847
- name: Check out the repo
49-
uses: actions/checkout@v4
48+
uses: actions/checkout@v6
5049

5150
- name: Install uv version ${{ env.UV_VERSION }}
52-
uses: astral-sh/setup-uv@v6
51+
uses: astral-sh/setup-uv@v7
5352
with:
5453
version: ${{ env.UV_VERSION }}
55-
enable-cache: true
5654

5755
- name: Install python ${{ env.DEFAULT_PYTHON_VERSION }} using uv
5856
run: uv python install ${{ env.DEFAULT_PYTHON_VERSION }}
@@ -91,13 +89,12 @@ jobs:
9189

9290
steps:
9391
- name: Check out the repo
94-
uses: actions/checkout@v4
92+
uses: actions/checkout@v6
9593

9694
- name: Install uv version ${{ env.UV_VERSION }}
97-
uses: astral-sh/setup-uv@v6
95+
uses: astral-sh/setup-uv@v7
9896
with:
9997
version: ${{ env.UV_VERSION }}
100-
enable-cache: true
10198

10299
- name: Install python ${{ matrix.python }} using uv
103100
run: uv python install ${{ matrix.python }}
@@ -117,7 +114,7 @@ jobs:
117114
pytest -m 'not benchmark_suite' --junitxml=junit.xml -o junit_family=legacy
118115

119116
- name: Upload coverage data
120-
uses: actions/upload-artifact@v4
117+
uses: actions/upload-artifact@v5
121118
with:
122119
name: coverage-data-${{ matrix.session }}-${{ matrix.os }}-${{ matrix.python}}
123120
include-hidden-files: true
@@ -135,13 +132,12 @@ jobs:
135132

136133
steps:
137134
- name: Check out the repo
138-
uses: actions/checkout@v4
135+
uses: actions/checkout@v6
139136

140137
- name: Install uv version ${{ env.UV_VERSION }}
141-
uses: astral-sh/setup-uv@v6
138+
uses: astral-sh/setup-uv@v7
142139
with:
143140
version: ${{ env.UV_VERSION }}
144-
enable-cache: true
145141

146142
- name: Install python ${{ env.DEFAULT_PYTHON_VERSION }} using uv
147143
run: uv python install ${{ env.DEFAULT_PYTHON_VERSION }}
@@ -158,7 +154,7 @@ jobs:
158154
docs docs/_build
159155

160156
- name: Upload docs
161-
uses: actions/upload-artifact@v4
157+
uses: actions/upload-artifact@v5
162158
with:
163159
name: docs
164160
path: docs/_build
@@ -170,13 +166,12 @@ jobs:
170166

171167
steps:
172168
- name: Check out the repo
173-
uses: actions/checkout@v4
169+
uses: actions/checkout@v6
174170

175171
- name: Install uv version ${{ env.UV_VERSION }}
176-
uses: astral-sh/setup-uv@v6
172+
uses: astral-sh/setup-uv@v7
177173
with:
178174
version: ${{ env.UV_VERSION }}
179-
enable-cache: true
180175

181176
- name: Install python ${{ env.DEFAULT_PYTHON_VERSION }} using uv
182177
run: uv python install ${{ env.DEFAULT_PYTHON_VERSION }}
@@ -185,7 +180,7 @@ jobs:
185180
run: uv sync -p ${{ env.DEFAULT_PYTHON_VERSION }} --frozen --only-group test
186181

187182
- name: Download coverage data
188-
uses: actions/download-artifact@v4
183+
uses: actions/download-artifact@v6
189184
with:
190185
pattern: coverage-data-*
191186
merge-multiple: true

.github/workflows/greetings.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
name: Greetings
22

3-
on: [pull_request, issues]
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
issues:
8+
types:
9+
- opened
10+
11+
permissions:
12+
issues: write
13+
pull-requests: write
414

515
jobs:
616
greeting:
17+
name: Greet First-Time Contributors
718
runs-on: ubuntu-latest
8-
permissions:
9-
issues: write
10-
pull-requests: write
19+
1120
steps:
12-
- uses: actions/first-interaction@v1
21+
- uses: actions/first-interaction@v3
1322
with:
14-
repo-token: ${{ secrets.GITHUB_TOKEN }}
15-
issue-message: 'Thanks for opening your first issue in ``sectionproperties``
23+
issue_message: 'Thanks for opening your first issue in ``sectionproperties``
1624
:raised_hands: Pull requests are always welcome :wink:'
17-
pr-message: 'Thank you for your contribution to ``sectionproperties`` :pray:
25+
pr_message: 'Thank you for your contribution to ``sectionproperties`` :pray:
1826
We will be reviewing your PR shortly :monocle_face:'

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out the repository
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v6
1414

1515
- name: Run Labeler
1616
uses: crazy-max/ghaction-github-labeler@v5

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919

2020
steps:
2121
- name: Check out the repository
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323
with:
2424
fetch-depth: 2
2525

2626
- name: Install uv version ${{ env.UV_VERSION }}
27-
uses: astral-sh/setup-uv@v6
27+
uses: astral-sh/setup-uv@v7
2828
with:
2929
version: ${{ env.UV_VERSION }}
3030

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-yaml
66
- id: check-toml
77
- id: end-of-file-fixer
88
- id: trailing-whitespace
99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.11.7
10+
rev: v0.14.8
1111
hooks:
1212
- id: ruff
1313
args: [--fix]
1414
- id: ruff-format
1515
- repo: https://github.com/kynan/nbstripout
16-
rev: 0.8.1
16+
rev: 0.8.2
1717
hooks:
1818
- id: nbstripout

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.14
1+
3.13

pyproject.toml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,45 +48,45 @@ Changelog = "https://github.com/robbievanleeuwen/section-properties/releases"
4848

4949
[project.optional-dependencies]
5050
numba = [
51-
"numba>=0.60.0",
51+
"numba",
5252
]
5353
rhino = [
5454
"rhino3dm>=8.17.0; python_version < '3.14'",
55-
"rhino-shapley-interop>=0.0.4; python_version < '3.14'",
55+
"rhino-shapley-interop",
5656
]
5757
dxf = [
58-
"cad-to-shapely>=0.3.2",
58+
"cad-to-shapely",
5959
]
6060
pardiso = [
61-
"pypardiso>=0.4.6; platform_system == 'Windows' or platform_system == 'Linux'"
61+
"pypardiso; platform_system == 'Windows' or platform_system == 'Linux'"
6262
]
6363

6464
[dependency-groups]
6565
dev = [
66-
"ipympl==0.9.7",
67-
"notebook==7.4.1",
68-
"sphinx-autobuild==2024.10.03",
66+
"ipympl==0.9.8",
67+
"notebook==7.5.0",
68+
"sphinx-autobuild==2025.8.25",
6969
"pyqt6==6.10.1",
7070
]
7171
docs = [
72-
"furo==2024.8.6",
73-
"sphinx==8.1.3", # nbsphinx requies sphinx<8.2 for now
74-
"ipykernel==6.29.5",
75-
"ipython==9.2.0",
76-
"nbsphinx==0.9.7",
72+
"furo==2025.9.25",
73+
"sphinx==8.2.3", # awaiting furo
74+
"ipykernel==7.1.0",
75+
"ipython==9.8.0",
76+
"nbsphinx==0.9.8",
7777
"nbconvert==7.16.6",
7878
"sphinx-copybutton==0.5.2",
79-
"sphinxext-opengraph==0.10.0",
79+
"sphinxext-opengraph==0.13.0",
8080
]
8181
lint = [
82-
"pre-commit==4.2.0",
83-
"pyright==1.1.400",
82+
"pre-commit==4.5.0",
83+
"pyright==1.1.407",
8484
]
8585
test = [
86-
"pytest==8.3.5",
87-
"pytest-benchmark[histogram]==5.1.0",
88-
"pytest-check==2.5.3",
89-
"coverage[toml]==7.8.0",
86+
"pytest==9.0.2",
87+
"pytest-benchmark[histogram]==5.2.3",
88+
"pytest-check==2.6.2",
89+
"coverage[toml]==7.13.0",
9090
]
9191

9292
[tool.uv]

tests/analysis/test_plastic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def test_plastic_centroid():
119119
nested_sec.calculate_plastic_properties()
120120
overlay_sec.calculate_geometric_properties()
121121

122-
with pytest.warns(UserWarning):
122+
with pytest.warns(UserWarning, match="overlapping regions"):
123123
overlay_sec.calculate_plastic_properties()
124124

125125
# section

tests/analysis/test_yield_moment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ def test_get_without_analysis():
2424
geom.create_mesh(mesh_sizes=0, coarse=True)
2525
sec = Section(geometry=geom)
2626

27-
with pytest.raises(RuntimeError, match="Conduct a geometric analysis."):
27+
with pytest.raises(RuntimeError, match="Conduct a geometric analysis"):
2828
sec.get_my()
2929

30-
with pytest.raises(RuntimeError, match="Conduct a geometric analysis."):
30+
with pytest.raises(RuntimeError, match="Conduct a geometric analysis"):
3131
sec.get_my_p()
3232

3333

tests/geometry/test_geometry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def test_multi_nested_compound_geometry_from_points():
471471
nested_compound.create_mesh([25, 30, 35])
472472
nested_compound_sec = Section(nested_compound)
473473
nested_compound_sec.calculate_geometric_properties()
474-
with pytest.warns(UserWarning):
474+
with pytest.warns(UserWarning, match="overlapping regions"):
475475
nested_compound_sec.calculate_plastic_properties()
476476

477477

@@ -668,7 +668,7 @@ def test_warping_disjoint_warning():
668668

669669
sec = Section(geometry=geom)
670670
sec.calculate_geometric_properties()
671-
with pytest.warns(UserWarning):
671+
with pytest.warns(UserWarning, match="disjoint regions"):
672672
sec.calculate_warping_properties()
673673

674674

@@ -704,7 +704,7 @@ def test_geom_obj_value_error():
704704
with pytest.raises(ValueError, match="Use CompoundGeometry"):
705705
Geometry(geom=multi_poly)
706706

707-
with pytest.raises(ValueError, match="Argument is not a valid shapely.Polygon"):
707+
with pytest.raises(ValueError, match="Argument is not a valid shapely"):
708708
Geometry(geom=pts)
709709

710710

0 commit comments

Comments
 (0)