Skip to content

Commit

Permalink
Merge pull request #85 from ocefpaf/missing_test_file
Browse files Browse the repository at this point in the history
Fix missing file in tests
  • Loading branch information
ocefpaf committed Apr 10, 2024
2 parents 3219950 + cbc6d58 commit e461a5e
Show file tree
Hide file tree
Showing 51 changed files with 31 additions and 5,574 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [windows-latest, ubuntu-latest, macos-latest]
fail-fast: false

Expand All @@ -34,5 +34,6 @@ jobs:
- name: Tests
shell: bash -l {0}
run: |
python -m pytest --disable-warnings
run: >
python pocean/tests/download_test_data.py
&& python -m pytest --disable-warnings
21 changes: 21 additions & 0 deletions pocean/tests/download_test_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import pooch
import zipfile
from pathlib import Path

def download_test_data():
url = "https://github.com/pyoceans/pocean-core/releases/download"
version = "2024.04"

fname = pooch.retrieve(
url=f"{url}/{version}/test_data.zip",
known_hash="sha256:28be36e8e0ec90a8faf5ee3f4d52638bdeb2cbcbeac8c823de680cf84aa34940",
)

here = Path(__file__).resolve().parent
print(fname)
print(here)
with zipfile.ZipFile(fname, "r") as zip_ref:
zip_ref.extractall(here)

if __name__ == "__main__":
download_test_data()
Binary file removed pocean/tests/dsg/profile/resources/2011_basis_ctd.nc
Binary file not shown.
14 changes: 0 additions & 14 deletions pocean/tests/dsg/profile/resources/basis_2011.csv

This file was deleted.

Binary file removed pocean/tests/dsg/profile/resources/im-multiple.nc
Binary file not shown.
Binary file removed pocean/tests/dsg/profile/resources/om-1dy11.nc
Binary file not shown.
Binary file removed pocean/tests/dsg/profile/resources/om-multiple.nc
Binary file not shown.
Binary file removed pocean/tests/dsg/profile/resources/om-single.nc
Binary file not shown.
Binary file removed pocean/tests/dsg/timeseries/resources/im-multiple.nc
Binary file not shown.
Binary file removed pocean/tests/dsg/timeseries/resources/om-multiple.nc
Binary file not shown.
Binary file removed pocean/tests/dsg/timeseries/resources/om-single.nc
Binary file not shown.
Binary file removed pocean/tests/dsg/timeseries/resources/tt.nc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit e461a5e

Please sign in to comment.