diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7e9d9ca52..26c6993ca 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -42,13 +42,13 @@ jobs: run: | conda activate test-env python3 -m pip install --upgrade pip - pip3 install gmsh pygmsh coveralls pytest pytest-cov + pip3 install gmsh pygmsh coveralls pytest pip3 install . # run all tests & coverage - name: Run Test shell: bash -l {0} - run: pytest --cov=wecopttool --cov-report=xml + run: coverage run -m pytest # upload coverage data - name: Upload coverage data to coveralls.io diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c629bc69e..80dcc3046 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -41,13 +41,13 @@ jobs: run: | conda activate test-env python3 -m pip install --upgrade pip - pip3 install gmsh pygmsh coveralls pytest pytest-cov + pip3 install gmsh pygmsh coveralls pytest pip3 install . # run all tests & coverage - name: Run Test shell: bash -l {0} - run: pytest --cov=wecopttool --cov-report=xml + run: coverage run -m pytest # upload coverage data - name: Upload coverage data to coveralls.io diff --git a/examples/tutorial_2_AquaHarmonics.ipynb b/examples/tutorial_2_AquaHarmonics.ipynb index d2b1a009c..e12193bdb 100644 --- a/examples/tutorial_2_AquaHarmonics.ipynb +++ b/examples/tutorial_2_AquaHarmonics.ipynb @@ -309,7 +309,7 @@ "y = np.arange(-1*torque_max, 1.0*torque_max, 5)\n", "X, Y = np.meshgrid(x, y)\n", "Z = power_loss(X, Y).copy()/1e3\n", - "Z[np.abs(X*Y) > power_max] = np.NaN # cut off area outside of power limit\n", + "Z[np.abs(X*Y) > power_max] = np.nan # cut off area outside of power limit\n", "\n", "fig = plt.figure(figsize=plt.figaspect(0.4))\n", "ax = [fig.add_subplot(1, 2, 1, projection=\"3d\"),\n", diff --git a/pyproject.toml b/pyproject.toml index 569cac90e..fbf9cafd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "wecopttool" -version = "3.2.0" +version = "3.2.1" description = "WEC Design Optimization Toolbox" readme = "README.md" authors = [ @@ -19,7 +19,7 @@ classifiers = [ "Operating System :: OS Independent", ] dependencies = [ - "numpy>=1.20, <2.0", + "numpy>=1.20", "scipy", "xarray", "jax", @@ -50,3 +50,8 @@ geometry = [ "gmsh", "pygmsh", ] + +[tool.coverage.run] +source = [ + "wecopttool", +] \ No newline at end of file