From 08b9a4407896aabfc605531f2df00b2678ee4924 Mon Sep 17 00:00:00 2001 From: Greg Lindahl Date: Sun, 6 Feb 2022 00:11:35 +0000 Subject: [PATCH 1/2] move to am-12 --- Makefile | 4 ++-- azure-pipelines.yml | 12 ++++++------ weatherwrapper.sh | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index d94738a..21622f6 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ am12: cd am-12.0/src && make serial && ./am -v test: - AM=am-11.0/src/am PYTHONPATH=. pytest -v -v + AM=am-12.0/src/am PYTHONPATH=. pytest -v -v test_coverage: - AM=am-11.0/src/am PYTHONPATH=. pytest --cov-report=xml --cov=eht_met_forecast -v -v + AM=am-12.0/src/am PYTHONPATH=. pytest --cov-report=xml --cov=eht_met_forecast -v -v diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 89c3b59..b6ae977 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,8 +34,8 @@ jobs: displayName: 'install OS packages' - script: | - make am11 - displayName: 'install am-11.0' + make am12 + displayName: 'install am-12.0' - script: | python -m pip install --upgrade pip @@ -44,7 +44,7 @@ jobs: - script: | pip install pytest-azurepipelines - export AM=./am-11.0/src/am + export AM=./am-12.0/src/am $AM -v PYTHONPATH=. pytest --cov-report=xml --cov=eht_met_forecast -v -v coverage report -m @@ -79,8 +79,8 @@ jobs: displayName: 'install OS packages' - script: | - make am11 - displayName: 'install am-11.0' + make am12 + displayName: 'install am-12.0' - script: | # see brew above for where OS packages are installed @@ -92,7 +92,7 @@ jobs: - script: | pip install pytest-azurepipelines - export AM=./am-11.0/src/am + export AM=./am-12.0/src/am $AM -v touch tests/__init.py__ PYTHONPATH=. pytest --cov-report=xml --cov=eht_met_forecast -v -v diff --git a/weatherwrapper.sh b/weatherwrapper.sh index 398f526..31b7dfe 100644 --- a/weatherwrapper.sh +++ b/weatherwrapper.sh @@ -2,7 +2,7 @@ # it is important for the above line to be bash and not sh . ~/venv/eht-met-forecast/bin/activate -export AM=./am-11.0/src/am +export AM=./am-12.0/src/am cd ~/github/eht-met-forecast From 4da0627231c7f5581c4baec91f49a80c780a5def Mon Sep 17 00:00:00 2001 From: Greg Lindahl Date: Sun, 6 Feb 2022 04:39:27 +0000 Subject: [PATCH 2/2] make stats actually work --- eht_met_forecast/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eht_met_forecast/core.py b/eht_met_forecast/core.py index 6682485..c8197d9 100644 --- a/eht_met_forecast/core.py +++ b/eht_met_forecast/core.py @@ -91,7 +91,7 @@ def compute_one_hour(site, gfs_cycle, forecast_hour, f, wait=False, verbose=Fals if verbose: print(site['name'], 'fetching for hour', forecast_hour, file=sys.stderr) with record_latency('fetch gfs data'): - layers_amc = gfs15_to_am10(site['lat'], site['lon'], site['alt'], gfs_cycle, forecast_hour, wait=wait, verbose=verbose, stats=None) + layers_amc = gfs15_to_am10(site['lat'], site['lon'], site['alt'], gfs_cycle, forecast_hour, wait=wait, verbose=verbose, stats=stats) if layers_amc is None: return # no line emitted