Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing file in tests #85

Merged
merged 10 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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