From b878644269f261b43db112510d6d9b65c9abba11 Mon Sep 17 00:00:00 2001 From: Erik van Sebille Date: Mon, 9 Jan 2023 21:08:18 -0400 Subject: [PATCH 1/2] Fixing the vonmises distribution tests in test_diffusion Because of a change to the vonmises distribution implementation in scipy v1.10.0 --- tests/test_diffusion.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_diffusion.py b/tests/test_diffusion.py index 7e7db571f..924654fd8 100644 --- a/tests/test_diffusion.py +++ b/tests/test_diffusion.py @@ -143,6 +143,7 @@ def vonmises(particle, fieldset, time): angles = np.array([p.angle for p in pset]) assert np.allclose(np.mean(angles), mu, atol=.1) - scipy_mises = stats.vonmises.rvs(kappa, loc=mu, size=10000) - assert np.allclose(np.mean(angles), np.mean(scipy_mises), atol=.1) - assert np.allclose(np.std(angles), np.std(scipy_mises), atol=.1) + vonmises_mean = stats.vonmises.mean(kappa=kappa, loc=mu) + assert np.allclose(np.mean(angles), vonmises_mean, atol=.1) + vonmises_var = stats.vonmises.var(kappa=kappa, loc=mu) + assert np.allclose(np.var(angles), vonmises_var, atol=.1) From cc050be2535cf72a1cb22601154b77a12568b732 Mon Sep 17 00:00:00 2001 From: Erik van Sebille Date: Tue, 10 Jan 2023 15:49:57 -0400 Subject: [PATCH 2/2] Adding swap space to Windows CI Following suggestion at https://github.com/actions/runner/issues/1051#issuecomment-983921597 based on the error ``` D:\a\parcels\parcels>conda env create -f environment_py3_win.yml -n parcels 67 Collecting package metadata (repodata.json): ...working... done 68 *** picosat: out of memory in 'new' ``` --- .github/workflows/ci-workflow-unittests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-workflow-unittests.yml b/.github/workflows/ci-workflow-unittests.yml index a95c0bf34..d71aa5a3c 100644 --- a/.github/workflows/ci-workflow-unittests.yml +++ b/.github/workflows/ci-workflow-unittests.yml @@ -48,6 +48,10 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@master + - name: Set Swap Space + uses: pierotofy/set-swap-space@master + with: + swap-size-gb: 10 - name: Test Windows env: OS_NAME: win