Skip to content

Commit

Permalink
Merge pull request #395 from Ouranosinc/fix-broken-refresh-target
Browse files Browse the repository at this point in the history
Fix broken refresh target

## Overview

Fix the wrong output file path and not replacing the output url properly with the refresh target.  See commit description for details.

## Related Issue / Discussion

#393 (comment)
  • Loading branch information
tlvu authored Jun 16, 2021
2 parents e0af129 + d6a654a commit abbecd7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ THIS_FILE := $(lastword $(MAKEFILE_LIST))
APP_ROOT := $(abspath $(lastword $(MAKEFILE_LIST))/..)
APP_NAME := raven-wps

WPS_URL := http://0.0.0.0:9099
WPS_PORT := 9099
WPS_URL := http://0.0.0.0:$(WPS_PORT)

# If WPS_URL is overridden, this should also be overridden to match.
WPS_OUTPUT_URL := http://localhost:$(WPS_PORT)/outputs

GDAL_VERSION := $(shell gdal-config --version)

Expand Down Expand Up @@ -244,7 +248,7 @@ refresh-notebooks:
NB_REFRESH_FILE := ""
.PHONY: refresh-notebooks-impl
refresh-notebooks-impl:
bash -c 'WPS_URL="$(WPS_URL)" FINCH_WPS_URL="$(FINCH_WPS_URL)" FLYINGPIGEON_WPS_URL="$(FLYINGPIGEON_WPS_URL)" jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=240 --output "$(NB_REFRESH_FILE)" "$(NB_REFRESH_FILE)"; sed -i "s@$(WPS_URL)/outputs/@$(OUTPUT_URL)/@g" "$(NB_REFRESH_FILE)"'
bash -c 'WPS_URL="$(WPS_URL)" FINCH_WPS_URL="$(FINCH_WPS_URL)" FLYINGPIGEON_WPS_URL="$(FLYINGPIGEON_WPS_URL)" jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=240 --output "$(NB_REFRESH_FILE)" --output-dir . "$(NB_REFRESH_FILE)"; sed -i "s@$(WPS_OUTPUT_URL)/@$(OUTPUT_URL)/@g" "$(NB_REFRESH_FILE)"'

.PHONY: test_pdb
test_pdb:
Expand Down

0 comments on commit abbecd7

Please sign in to comment.