Skip to content

Commit

Permalink
update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
cefect committed Mar 22, 2024
1 parent 0385110 commit 8d70f62
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ downscale(<path_to_DEM>, <path_to_WSE>)
[2112_agg_pub](https://github.com/cefect/2112_agg_pub): public repo of analysis for aggregation paper.

## Installation
TODO: make installation more user-friendly (e.g., containerization or setup-tools)

build a python environment per ./environment.yml
Installing FloodDownscaler2 is complex and customizeable and requires three basic steps:
- build a python environment per ./environment.yml
- create and customize a ./definitions.py file (see below)
- install/setup whitebox-tools v2.2.0 (see below)

create and customize a ./definitions.py file (see below)

set paths for whitebox-tools v2.2.0
Once setup is complete, its highly advisable to test your install by updating/running ./example.bat
Typically, I build a conda/miniforge environment in windows ./env and write a batch script to activate this (`./env/conda_activate.bat`)

### setting up whitebox-tools
Some of the functions depend on whitebox-tools (wbt) python API. For these to work, installing FloodDownscaler2 requires installing whitebox-tools (if you haven't already) and telling FloodDownscaler2 where to find it. Below is some guidance/instructions for configuring wbt; however, there are a few ways to do this and not all ways work on all systems.
Expand Down Expand Up @@ -89,4 +92,9 @@ wrk_dir = r'L:\10_IO\fdsc2'
#whitebox exe location
wbt_dir = os.path.join(src_dir, r'whitebox-tools\target\release')
```
```

## Tests
pytests are in ./tests

NOTE: coverage is poor
3 changes: 3 additions & 0 deletions example.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
:: example windows batch script for using FloodDownscaler2's CLI
:: USE
:: 1) install/build FloodDownscaler2 per the readme
:: 2) configure the 'activate environment' section to properly activate your environment before the mian execution call (alternatively, you could call this batch script from your activated environment).

:: inputs/outputs
SET WSE_FP=%~dp0\tests\data\ahr\wse2_clip.tif
Expand Down

0 comments on commit 8d70f62

Please sign in to comment.