Skip to content

Commit

Permalink
Merge pull request #4 from adtzlr/fix-scripts
Browse files Browse the repository at this point in the history
Fix scripts for FElupe >7.14
  • Loading branch information
adtzlr authored Apr 2, 2024
2 parents d11e627 + ed93ec5 commit 74198d8
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Setup Python
uses: actions/setup-python@v4
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.2] - 2024-04-02

### Added
- Add coverage tests on and add official support for Python 3.12.

### Fixed
- Fix scripts for recent versions of FElupe (>=7.19.0): Remove the `fig`-argument in `CharacteristicCurve.plot()`.
- Fix scripts with a missing leading `f""` for a formatted string.

## [1.0.1] - 2024-03-10

### Fixed
- Fix support for recent versions of FElupe (>=7.19.0) in a backward-compatible way.

## [1.0.0] - 2023-08-22

### Added
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
]
dynamic = ["version"]
Expand Down
2 changes: 1 addition & 1 deletion src/fiberreinforcedrubber/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.1"
__version__ = "1.0.2"
4 changes: 2 additions & 2 deletions tests/test_specimen_amplitudes_max_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_specimen_amplitudes_max_diff(path=".", take_screenshots=False):
# plotter.add_axes(label_size=(0.06, 0.06), viewport=(-0.1, -0.1, 0.2, 0.2))
# plotter.camera.zoom(0.8)
if take_screenshots:
img = plotter.screenshot("{path}/test_specimen_mesh_rubber.png", scale=2)
img = plotter.screenshot(f"{path}/test_specimen_mesh_rubber.png", scale=2)

# View the fiber mesh
view = fem.ViewMesh(fem.mesh.concatenate([fibers_1, fibers_2]))
Expand All @@ -76,7 +76,7 @@ def test_specimen_amplitudes_max_diff(path=".", take_screenshots=False):
# plotter.add_axes(label_size=(0.06, 0.06), viewport=(-0.1, -0.1, 0.2, 0.2))
# plotter.camera.zoom(0.8)
if take_screenshots:
img = plotter.screenshot("{path}/test_specimen_mesh_fibre.png", scale=2)
img = plotter.screenshot(f"{path}/test_specimen_mesh_fibre.png", scale=2)

# create a numeric region and a displacement field
region = fem.RegionQuad(mesh)
Expand Down
3 changes: 0 additions & 3 deletions tests/test_specimen_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ def test_specimen_simulation(path=".", take_screenshots=False):
yscale=1e-3 * thickness,
xlabel=r"Displacement $V$ in mm",
ylabel=r"Force $F_Y$ in kN",
fig=fig,
ax=ax[0],
ls="--",
color="C3",
Expand All @@ -188,7 +187,6 @@ def test_specimen_simulation(path=".", take_screenshots=False):
yscale=1e-3 * thickness,
xlabel=r"Displacement $V$ in mm",
ylabel=r"Force $F_Y$ in kN",
fig=fig,
ax=ax[0],
color="C0",
label=r"$U = \pm 23$ mm",
Expand All @@ -202,7 +200,6 @@ def test_specimen_simulation(path=".", take_screenshots=False):
yscale=1e-3 * thickness,
ylabel=r"Force $F_X$ ($U=23$ mm) in kN",
swapaxes=True,
fig=fig,
ax=ax[1],
color="C2",
)
Expand Down

0 comments on commit 74198d8

Please sign in to comment.