Skip to content

Commit

Permalink
wip/ci: forgot to auto-run tests for new subfolder in unit
Browse files Browse the repository at this point in the history
  • Loading branch information
pgierz committed Dec 9, 2024
1 parent 7fd2fc8 commit 81bb8ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/CI-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ jobs:
run: |
export XARRAY_ENGINE=h5netcdf
export PREFECT_SERVER_EPHEMERAL_STARTUP_TIMEOUT_SECONDS=300
pytest -vvv -s --cov tests/unit/**.py
pytest -vvv -s --cov tests/unit/*.py
pytest -vvv -s --cov tests/unit/data_request/*.py
- name: Test with pytest (Integration)
run: |
export XARRAY_ENGINE=h5netcdf
Expand Down
8 changes: 3 additions & 5 deletions src/pymorize/data_request/variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,6 @@ class CMIP7DataRequestVariable(DataRequestVariable):
_spatial_shape: str
_temporal_shape: str
_cmip6_cmor_table: str

_vertical_levels: str

_name: str
_table_name: Optional[str] = None

Expand All @@ -435,7 +432,8 @@ def from_dict(cls, data):
_name=data["out_name"],
_frequency=data["frequency"],
_modeling_realm=data["modeling_realm"],
_standard_name=data["standard_name"],
# FIXME(PG): Not all variables appear to have standard_name
_standard_name=data.get("standard_name"),
_units=data["units"],
_cell_methods=data["cell_methods"],
_cell_measures=data["cell_measures"],
Expand All @@ -447,7 +445,7 @@ def from_dict(cls, data):
_positive=data["positive"],
_spatial_shape=data["spatial_shape"],
_temporal_shape=data["temporal_shape"],
_vertical_levels=data["vertical_levels"],
_cmip6_cmor_table=data["cmip6_cmor_table"],
_table_name=data["cmip6_cmor_table"],
)
return cls(**extracted_data)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/data_request/test_data_request.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pymorize.data_request.collection import CMIP6DataRequest
from pymorize.data_request.collection import CMIP6DataRequest, CMIP7DataRequest


def test_cmip6_from_git():
Expand All @@ -8,7 +8,7 @@ def test_cmip6_from_git():


def test_cmip7_from_vendored_json():
request = CMIP6DataRequest.from_vendored_json()
request = CMIP7DataRequest.from_vendored_json()
# If the function worked, we should get tables:
assert request.tables
# And we should get variables:
Expand Down

0 comments on commit 81bb8ec

Please sign in to comment.