Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix local documentation links #396

Merged
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Unreleased Changes (3.9)
* No longer include the HTML docs or HISTORY.rst in the macOS distribution.
* Bumped the ``shapely`` requirements to ``>=1.7.1`` to address a library
import issue on Mac OS Big Sur.
* Fixing model local documentation links for Windows and Mac binaries.
* The InVEST binary builds now launch on Mac OS 11 "Big Sur". This was
addressed by defining the ``QT_MAC_WANTS_LAYER`` environment variable.
* Coastal Blue Carbon
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,13 @@ $(WINDOWS_INSTALLER_FILE): $(INVEST_BINARIES_DIR) $(USERGUIDE_ZIP_FILE) build/vc
makensis /DVERSION=$(VERSION) /DBINDIR=$(INVEST_BINARIES_DIR) /DARCHITECTURE=$(PYTHON_ARCH) /DFORKNAME=$(INSTALLER_NAME_FORKUSER) /DDATA_LOCATION=$(DATA_BASE_URL) installer\windows\invest_installer.nsi

DMG_CONFIG_FILE := installer/darwin/dmgconf.py
mac_dmg: $(MAC_DISK_IMAGE_FILE)
mac_dmg: $(MAC_DISK_IMAGE_FILE)
$(MAC_DISK_IMAGE_FILE): $(DIST_DIR) $(MAC_APPLICATION_BUNDLE) $(USERGUIDE_HTML_DIR)
dmgbuild -Dinvestdir=$(MAC_APPLICATION_BUNDLE) -s $(DMG_CONFIG_FILE) "InVEST $(VERSION)" $(MAC_DISK_IMAGE_FILE)

mac_app: $(MAC_APPLICATION_BUNDLE)
$(MAC_APPLICATION_BUNDLE): $(BUILD_DIR) $(INVEST_BINARIES_DIR)
./installer/darwin/build_app_bundle.sh $(VERSION) $(INVEST_BINARIES_DIR) $(MAC_APPLICATION_BUNDLE)
$(MAC_APPLICATION_BUNDLE): $(BUILD_DIR) $(INVEST_BINARIES_DIR) $(USERGUIDE_HTML_DIR)
./installer/darwin/build_app_bundle.sh $(VERSION) $(INVEST_BINARIES_DIR) $(USERGUIDE_HTML_DIR) $(MAC_APPLICATION_BUNDLE)

mac_zipfile: $(MAC_BINARIES_ZIP_FILE)
$(MAC_BINARIES_ZIP_FILE): $(DIST_DIR) $(MAC_APPLICATION_BUNDLE) $(USERGUIDE_HTML_DIR)
Expand Down
13 changes: 10 additions & 3 deletions installer/darwin/build_app_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# Arguments:
# $1 = the version string to use
# $2 = the path to the binary dir to package.
# $3 = the path to where the application bundle should be written.
# $3 = the path to the HTML documentation
# $4 = the path to where the application bundle should be written.

# remove temp files that can get in the way
tempdir=`basename $3`
Expand All @@ -21,13 +22,19 @@ mkdir -p "$tempdir"
# .command extension makes the scripts runnable by the user.
# Shell files without the `invest_` prefix will be left alone.
new_basename='InVEST'
_APPDIR="$3"
_APPDIR="$4"
_MACOSDIR="$_APPDIR/Contents/MacOS"
_RESOURCEDIR="$_APPDIR/Contents/Resources"
_INVEST_DIST_DIR="$_MACOSDIR/invest_dist"
_USERGUIDE_HTML_DIR="$_INVEST_DIST_DIR/documentation"
CONFIG_DIR="installer/darwin"
mkdir -p "${_MACOSDIR}"
mkdir -p "${_RESOURCEDIR}"
cp -r "$2" "$_MACOSDIR/invest_dist"

cp -r "$2" "$_INVEST_DIST_DIR"

mkdir -p "${_USERGUIDE_HTML_DIR}"
cp -r "$3" "$_USERGUIDE_HTML_DIR"
new_command_file="$_MACOSDIR/$new_basename"
cp $CONFIG_DIR/invest.icns "$_RESOURCEDIR/invest.icns"

Expand Down
2 changes: 1 addition & 1 deletion src/natcap/invest/ui/globio.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self):
label='GLOBIO',
target=natcap.invest.globio.execute,
validator=natcap.invest.globio.validate,
localdoc='../documentation/globio.html')
localdoc='globio.html')

self.lulc_to_globio_table_path = inputs.File(
args_key='lulc_to_globio_table_path',
Expand Down
2 changes: 1 addition & 1 deletion src/natcap/invest/ui/habitat_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self):
label='Habitat Quality',
target=natcap.invest.habitat_quality.execute,
validator=natcap.invest.habitat_quality.validate,
localdoc='../documentation/habitat_quality.html')
localdoc='habitat_quality.html')
self.current_landcover = inputs.File(
args_key='lulc_cur_path',
helptext=(
Expand Down
2 changes: 1 addition & 1 deletion src/natcap/invest/ui/hra.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self):
label='Habitat Risk Assessment',
target=hra.execute,
validator=hra.validate,
localdoc='../documentation/habitat_risk_assessment.html')
localdoc='habitat_risk_assessment.html')

self.info_table_path = inputs.File(
args_key='info_table_path',
Expand Down
2 changes: 1 addition & 1 deletion src/natcap/invest/ui/hydropower.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self):
label='Hydropower Water Yield',
target=hydropower_water_yield.execute,
validator=hydropower_water_yield.validate,
localdoc='../documentation/reservoirhydropowerproduction.html')
localdoc='reservoirhydropowerproduction.html')

self.precipitation = inputs.File(
args_key='precipitation_path',
Expand Down
2 changes: 1 addition & 1 deletion src/natcap/invest/ui/ndr.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self):
label='Nutrient Delivery Ratio Model (NDR)',
target=natcap.invest.ndr.ndr.execute,
validator=natcap.invest.ndr.ndr.validate,
localdoc='waterpurification.html')
localdoc='ndr.html')

self.dem_path = inputs.File(
args_key='dem_path',
Expand Down
2 changes: 1 addition & 1 deletion src/natcap/invest/ui/sdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self):
label='Sediment Delivery Ratio Model (SDR)',
target=natcap.invest.sdr.sdr.execute,
validator=natcap.invest.sdr.sdr.validate,
localdoc='../documentation/sdr.html')
localdoc='sdr.html')
self.dem_path = inputs.File(
args_key='dem_path',
helptext=(
Expand Down
2 changes: 1 addition & 1 deletion src/natcap/invest/ui/urban_flood_risk_mitigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self):
label='UrbanFloodRiskMitigation',
target=natcap.invest.urban_flood_risk_mitigation.execute,
validator=natcap.invest.urban_flood_risk_mitigation.validate,
localdoc='../documentation/urban_flood_risk_mitigation.html')
localdoc='urban_flood_mitigation.html')

self.aoi_watersheds_path = inputs.File(
args_key='aoi_watersheds_path',
Expand Down