Skip to content

Commit

Permalink
Merge pull request #925 from metno/fix914
Browse files Browse the repository at this point in the history
Remove pickle file from CI used in test_collocation_3d
  • Loading branch information
lewisblake authored Oct 16, 2023
2 parents 26053f2 + 856646f commit ee4087c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
7 changes: 1 addition & 6 deletions pyaerocom/aeroval/modelentry.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
from copy import deepcopy

from pyaerocom._lowlevel_helpers import (
BrowseDict,
DictStrKeysListVals,
DictType,
StrType,
)
from pyaerocom._lowlevel_helpers import BrowseDict, DictStrKeysListVals, DictType, StrType
from pyaerocom.aeroval.aux_io_helpers import check_aux_info


Expand Down
1 change: 1 addition & 0 deletions pyaerocom/colocateddata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import annotations

import logging
import os
import warnings
Expand Down
3 changes: 1 addition & 2 deletions tests/fixtures/data_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
TESTDATA_NAME = "testdata-minimal"

#: That's were the testdata can be downloaded from
TESTDATA_URL = f"https://pyaerocom-ng.met.no/pyaerocom-suppl/{TESTDATA_NAME}.tar.gz.20230919"
TESTDATA_URL = f"https://pyaerocom-ng.met.no/pyaerocom-suppl/{TESTDATA_NAME}.tar.gz.20231013"

#: Directory where testdata will be downloaded into
TESTDATA_ROOT = Path(const.OUTPUTDIR) / TESTDATA_NAME
Expand Down Expand Up @@ -62,7 +62,6 @@ def path(self) -> Path:
"G.EBAS.hourly.Subset": DataForTests("obsdata/GHOST/data/EBAS/hourly", ReadGhost),
"EEA_AQeRep.v2.Subset": DataForTests("obsdata/EEA_AQeRep.v2/renamed", io.ReadEEAAQEREP_V2),
"Earlinet-test": DataForTests("obsdata/Earlinet", io.ReadEarlinet),
"Earlinet-test-3d-collocation": DataForTests("obsdata/Earlinet/"),
}


Expand Down
16 changes: 7 additions & 9 deletions tests/test_colocation_3d.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
from __future__ import annotations

import pickle

import iris
import numpy as np
import pytest

from pyaerocom import GriddedData
from pyaerocom.colocation_3d import ColocatedDataLists, colocate_vertical_profile_gridded
from pyaerocom.io.read_earlinet import ReadEarlinet
from tests.fixtures.data_access import TEST_DATA

ROOT = TEST_DATA["Earlinet-test-3d-collocation"].path
ROOT = TEST_DATA["Earlinet-test"].path

TEST_FILE = [
ROOT / "earlinet_example_for_ci.pkl",
TEST_FILE: list[str] = [
f"{ROOT}/EARLINET_AerRemSen_waw_Lev02_b0532_202109221030_202109221130_v01_qc03.nc",
]


Expand All @@ -29,7 +28,7 @@ def fake_model_data_with_altitude():
np.linspace(0, 60000, 10000), var_name="alt", standard_name="altitude", units="meters"
)
time = iris.coords.DimCoord(
np.arange(18896, 18896 + 7, 1),
np.arange(18892, 18892 + 7, 1),
var_name="time",
standard_name="time",
units="days since epoch",
Expand All @@ -56,9 +55,8 @@ def fake_model_data_with_altitude():

@pytest.fixture
def example_earlinet_ungriddeddata():
path = TEST_FILE[0]
assert path.is_file(), f"you should have {path}, update ~/MyPyaerocom/testdata-minimal/"
return pickle.load(path.open("rb"))
reader = ReadEarlinet()
return reader.read(vars_to_retrieve=["bsc532aer"], files=TEST_FILE[0])


@pytest.mark.parametrize(
Expand Down

0 comments on commit ee4087c

Please sign in to comment.