Skip to content

Commit 1f8875a

Browse files
authored
chore(dtocean-hydrodynamics): improve tests and update dead link (#71)
This commit updates the following: - Increased timeout lengths for tests that require NEMOH to run in the background - Replaces dead link to DTOcean project archival info - Updated minimum SciPy version - Fixed typo
1 parent 0473e9a commit 1f8875a

6 files changed

Lines changed: 19 additions & 6 deletions

File tree

packages/dtocean-hydrodynamics/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,20 @@ poetry run ruff
136136
poetry run pyright src
137137
```
138138

139+
The above tests can be run across all compatible Python versions using
140+
[tox](https://tox.wiki/) and [tox-uv](https://github.com/tox-dev/tox-uv). To
141+
install:
142+
143+
```sh
144+
poetry install --with test --with test-extras --with audit --with tox
145+
```
146+
147+
To run the tests:
148+
149+
```sh
150+
poetry run tox
151+
```
152+
139153
## Contributing
140154

141155
Please see the [dtocean](https://github.com/DTOcean/dtocean) GitHub repository
@@ -144,7 +158,7 @@ for contributing guidelines.
144158
## Credits
145159

146160
This package was initially created as part of the [EU DTOcean project](
147-
https://www.dtoceanplus.eu/About-DTOceanPlus/History) by:
161+
https://cordis.europa.eu/project/id/608597) by:
148162

149163
* Francesco Ferri at [Aalborg University](https://www.en.aau.dk/)
150164
* Pau Mercade Ruiz at [Aalborg University](https://www.en.aau.dk/)

packages/dtocean-hydrodynamics/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ numpy = "^2.3.5"
6262
pandas = "^3.0.1"
6363
pyopengl = "^3.1.7"
6464
scikit-learn = "^1.6.0"
65-
scipy = "^1.14.1"
65+
scipy = "^1.17.0"
6666
shapely = "^2.0.6"
6767
polite-config = { path = "../polite-config", develop = true }
6868
contourpy = "^1.3.1"

packages/dtocean-hydrodynamics/tests/dtocean_plugins/modules/test_modules_hydrodynamics.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ def test_tidal_interface_entry_fail(
284284

285285
with pytest.raises(ValueError):
286286
interface.connect(debug_entry=True)
287-
interface.connect(debug_entry=True)
288287

289288

290289
def test_convert_results(outputs_wp2_wave):

packages/dtocean-hydrodynamics/tests/dtocean_wec/projects/load_nemoh/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def is_enabled():
8181
assert main_window.form_power is not None
8282
assert main_window.form_power.isEnabled()
8383

84-
qtbot.waitUntil(is_enabled)
84+
qtbot.waitUntil(is_enabled, timeout=30000)
8585

8686
return run_nehom_path / "hydrodynamic"
8787

packages/dtocean-hydrodynamics/tests/dtocean_wec/projects/run_nemoh/test_run_nemoh_form_hyd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ def test_calculate_again(
3838
def is_enabled():
3939
assert form_hyd_calculated.btn_calculate_t2.isEnabled()
4040

41-
qtbot.waitUntil(is_enabled)
41+
qtbot.waitUntil(is_enabled, timeout=30000)

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)