Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ jobs:

steps:
- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install uv version ${{ env.UV_VERSION }}
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

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

steps:
- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install uv version ${{ env.UV_VERSION }}
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

- name: Install python ${{ env.DEFAULT_PYTHON_VERSION }} using uv
run: uv python install ${{ env.DEFAULT_PYTHON_VERSION }}
Expand Down Expand Up @@ -91,13 +89,12 @@ jobs:

steps:
- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install uv version ${{ env.UV_VERSION }}
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

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

- name: Upload coverage data
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: coverage-data-${{ matrix.session }}-${{ matrix.os }}-${{ matrix.python}}
include-hidden-files: true
Expand All @@ -135,13 +132,12 @@ jobs:

steps:
- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install uv version ${{ env.UV_VERSION }}
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

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

- name: Upload docs
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: docs
path: docs/_build
Expand All @@ -170,13 +166,12 @@ jobs:

steps:
- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install uv version ${{ env.UV_VERSION }}
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

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

- name: Download coverage data
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
pattern: coverage-data-*
merge-multiple: true
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
name: Greetings

on: [pull_request, issues]
on:
pull_request:
types:
- opened
issues:
types:
- opened

permissions:
issues: write
pull-requests: write

jobs:
greeting:
name: Greet First-Time Contributors
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/first-interaction@v1
- uses: actions/first-interaction@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Thanks for opening your first issue in ``sectionproperties``
issue_message: 'Thanks for opening your first issue in ``sectionproperties``
:raised_hands: Pull requests are always welcome :wink:'
pr-message: 'Thank you for your contribution to ``sectionproperties`` :pray:
pr_message: 'Thank you for your contribution to ``sectionproperties`` :pray:
We will be reviewing your PR shortly :monocle_face:'
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 2

- name: Install uv version ${{ env.UV_VERSION }}
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}

Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.7
rev: v0.14.8
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
rev: 0.8.2
hooks:
- id: nbstripout
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.14
3.13
38 changes: 19 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,45 +48,45 @@ Changelog = "https://github.com/robbievanleeuwen/section-properties/releases"

[project.optional-dependencies]
numba = [
"numba>=0.60.0",
"numba",
]
rhino = [
"rhino3dm>=8.17.0; python_version < '3.14'",
"rhino-shapley-interop>=0.0.4; python_version < '3.14'",
"rhino-shapley-interop; python_version < '3.14'",
]
dxf = [
"cad-to-shapely>=0.3.2",
"cad-to-shapely",
]
pardiso = [
"pypardiso>=0.4.6; platform_system == 'Windows' or platform_system == 'Linux'"
"pypardiso; platform_system == 'Windows' or platform_system == 'Linux'"
]

[dependency-groups]
dev = [
"ipympl==0.9.7",
"notebook==7.4.1",
"sphinx-autobuild==2024.10.03",
"ipympl==0.9.8",
"notebook==7.5.0",
"sphinx-autobuild==2025.8.25",
"pyqt6==6.10.1",
]
docs = [
"furo==2024.8.6",
"sphinx==8.1.3", # nbsphinx requies sphinx<8.2 for now
"ipykernel==6.29.5",
"ipython==9.2.0",
"nbsphinx==0.9.7",
"furo==2025.9.25",
"sphinx==8.2.3", # awaiting furo
"ipykernel==7.1.0",
"ipython==9.8.0",
"nbsphinx==0.9.8",
"nbconvert==7.16.6",
"sphinx-copybutton==0.5.2",
"sphinxext-opengraph==0.10.0",
"sphinxext-opengraph==0.13.0",
]
lint = [
"pre-commit==4.2.0",
"pyright==1.1.400",
"pre-commit==4.5.0",
"pyright==1.1.407",
]
test = [
"pytest==8.3.5",
"pytest-benchmark[histogram]==5.1.0",
"pytest-check==2.5.3",
"coverage[toml]==7.8.0",
"pytest==9.0.2",
"pytest-benchmark[histogram]==5.2.3",
"pytest-check==2.6.2",
"coverage[toml]==7.13.0",
]

[tool.uv]
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/test_plastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_plastic_centroid():
nested_sec.calculate_plastic_properties()
overlay_sec.calculate_geometric_properties()

with pytest.warns(UserWarning):
with pytest.warns(UserWarning, match="overlapping regions"):
overlay_sec.calculate_plastic_properties()

# section
Expand Down
4 changes: 2 additions & 2 deletions tests/analysis/test_yield_moment.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def test_get_without_analysis():
geom.create_mesh(mesh_sizes=0, coarse=True)
sec = Section(geometry=geom)

with pytest.raises(RuntimeError, match="Conduct a geometric analysis."):
with pytest.raises(RuntimeError, match="Conduct a geometric analysis"):
sec.get_my()

with pytest.raises(RuntimeError, match="Conduct a geometric analysis."):
with pytest.raises(RuntimeError, match="Conduct a geometric analysis"):
sec.get_my_p()


Expand Down
6 changes: 3 additions & 3 deletions tests/geometry/test_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def test_multi_nested_compound_geometry_from_points():
nested_compound.create_mesh([25, 30, 35])
nested_compound_sec = Section(nested_compound)
nested_compound_sec.calculate_geometric_properties()
with pytest.warns(UserWarning):
with pytest.warns(UserWarning, match="overlapping regions"):
nested_compound_sec.calculate_plastic_properties()


Expand Down Expand Up @@ -668,7 +668,7 @@ def test_warping_disjoint_warning():

sec = Section(geometry=geom)
sec.calculate_geometric_properties()
with pytest.warns(UserWarning):
with pytest.warns(UserWarning, match="disjoint regions"):
sec.calculate_warping_properties()


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

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


Expand Down
2 changes: 1 addition & 1 deletion tests/section_library/test_steel_sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_angle_section_toe_thickness():
sec = Section(geom)

# check for no additional warnings
with pytest.warns() as record:
with pytest.warns() as record: # noqa: PT031
warnings.warn("user", UserWarning, stacklevel=1)
sec.calculate_geometric_properties()
sec.calculate_warping_properties()
Expand Down
6 changes: 3 additions & 3 deletions tests/validation/test_peery.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def test_fb_c(peery_ex_7_2_1: Callable) -> None:
# but -2384 is the answer computed from his values.
perfect_result = -2384
# The simplified textbook equation
text_result = round(-494 * 1 + -315 * 6)
text_result = -494 * 1 + -315 * 6
nodes = peery_ex_7_2_1.xsect.mesh_nodes
assert len(nodes > 0)
index, _ = get_node(nodes, c)
Expand All @@ -303,7 +303,7 @@ def test_fb_b(peery_ex_7_2_1: Callable) -> None:
# The answer in the example
perfect_result = 580
# The sipmlified textbook equation
text_result = round(-494 * -5 + -315 * 6)
text_result = -494 * -5 + -315 * 6
nodes = peery_ex_7_2_1.xsect.mesh_nodes
index, _ = get_node(nodes, b)
_ = peery_ex_7_2_1.apply_load(v)
Expand All @@ -326,7 +326,7 @@ def test_fb_a(peery_ex_7_2_1: Callable) -> None:
# The answer in the example
perfect_result = 1210
# The simplified textbook equation
text_result = round(-494 * -5 + -315 * 4)
text_result = -494 * -5 + -315 * 4
nodes = peery_ex_7_2_1.xsect.mesh_nodes
index, _ = get_node(nodes, a)
_ = peery_ex_7_2_1.apply_load(v)
Expand Down
Loading