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: testsuite #214

Merged
merged 5 commits into from
Oct 16, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
python -c "import xradar; print(xradar.version.version)"
- name: Test with pytest
run: |
pytest -n auto --dist loadfile --verbose --durations=15 --cov-report xml:coverage_notebook.xml --cov=xradar --pyargs examples/notebooks
pytest -n auto --dist loadscope --verbose --durations=15 --cov-report xml:coverage_notebook.xml --cov=xradar --pyargs examples/notebooks
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ def nexradlevel2_bzfile():
return DATASETS.fetch("KLBB20160601_150025_V06")


@pytest.fixture
@pytest.fixture(scope="session")
def nexradlevel2_files(request):
return request.getfixturevalue(request.param)
4 changes: 1 addition & 3 deletions tests/io/test_datamet.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
from xradar.util import _get_data_file


@pytest.fixture
@pytest.fixture(scope="session")
def data(datamet_file):
with _get_data_file(datamet_file, "file") as datametfile:
print(datametfile)
data = datamet.DataMetFile(datametfile)
assert data.filename == datametfile
print(data.scan_metadata)
data.get_sweep(0)
return data

Expand Down
8 changes: 4 additions & 4 deletions tests/io/test_hpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ def test_open_datatree_hpl():


def test_open_dataset_hpl():
ds = xr.open_dataset(
with xr.open_dataset(
DATASETS.fetch("User1_184_20240601_013257.hpl"),
engine="hpl",
backend_kwargs=dict(latitude=41.24276244459537, longitude=-70.1070364814594),
)
) as ds:

assert ds["mean_doppler_velocity"].dims == ("azimuth", "range")
assert ds["mean_doppler_velocity"].max() == 19.5306
assert ds["mean_doppler_velocity"].dims == ("azimuth", "range")
assert ds["mean_doppler_velocity"].max() == 19.5306
Loading