Skip to content

Commit

Permalink
Merge pull request #8 from FREVA-CLINT/hot-fix
Browse files Browse the repository at this point in the history
Hot fix
  • Loading branch information
cehbrecht authored Feb 25, 2022
2 parents 2c6105d + 5d15595 commit b7967ab
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: 3.7
allowed_to_fail: false
python-version: ["3.7"]
steps:
- uses: actions/checkout@v2
- name: Setup conda with Python ${{ matrix.python-version }}
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: conda-forge, defaults
- name: Conda env configuration
conda-channels: defaults, conda-forge
- name: Conda env configuration with mamba
run: |
conda env create -f environment.yml
conda install mamba
mamba env create -f environment.yml
source activate duck
pip install -e ".[dev]"
- name: Test with conda
Expand Down
14 changes: 7 additions & 7 deletions duck/clintai.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@

HADCRUT5_TAS_MEAN = "HadCRUT5"
HADCRUT4_TEMPERATURE_ANOMALY = "HadCRUT4"
HADCRUT4_TAS = "HadCRUT"
# HADCRUT4_TAS = "HadCRUT"

HADCRUT = collections.OrderedDict({
HADCRUT5_TAS_MEAN: {
"variable": "tas_mean",
"name": "hadcrut5",
"name": "hadcrut",
},
HADCRUT4_TEMPERATURE_ANOMALY: {
"variable": "temperature_anomaly",
"name": "hadcrut4",
},
HADCRUT4_TAS: {
"variable": "tas",
"name": "hadcrut4",
"name": "hadcrut",
},
# HADCRUT4_TAS: {
# "variable": "tas",
# "name": "hadcrut",
# },
})


Expand Down
8 changes: 4 additions & 4 deletions tests/test_wps_clintai.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
from duck.clintai import (
HADCRUT5_TAS_MEAN,
HADCRUT4_TEMPERATURE_ANOMALY,
HADCRUT4_TAS,
)


@pytest.mark.skip(reason="don't use tas variable")
def test_wps_clintai_hadcrut4_tas_small():
client = client_for(Service(processes=[ClintAI()]))
datainputs = f"dataset=@xlink:href={HADCRUT4_SMALL_NC}"
datainputs += f";hadcrut={HADCRUT4_TAS}"
datainputs += f";hadcrut={HADCRUT4_TEMPERATURE_ANOMALY}"
resp = client.get(
f"?service=WPS&request=Execute&version=1.0.0&identifier=clintai&datainputs={datainputs}"
)
Expand All @@ -50,18 +50,18 @@ def test_wps_clintai_hadcrut4_error_wrong_parameter():
assert_process_exception(resp, code="InvalidParameterValue")


@pytest.mark.skip(reason="don't use tas variable")
def test_wps_clintai_hadcrut4_tas_small_zip():
client = client_for(Service(processes=[ClintAI()]))
datainputs = f"dataset=@xlink:href={HADCRUT4_SMALL_NC_ZIP}"
datainputs += f";hadcrut={HADCRUT4_TAS}"
datainputs += f";hadcrut={HADCRUT4_TEMPERATURE_ANOMALY}"
resp = client.get(
f"?service=WPS&request=Execute&version=1.0.0&identifier=clintai&datainputs={datainputs}"
)
# print(resp.data)
assert_response_success(resp)


@pytest.mark.xfail(reason="ERROR:Inconsistent dimensions in file HadCRUT.4.6.0.0.median.nc")
@pytest.mark.online
def test_wps_clintai_hadcrut4_temperature_anomaly():
client = client_for(Service(processes=[ClintAI()]))
Expand Down

0 comments on commit b7967ab

Please sign in to comment.