Skip to content

Commit

Permalink
0324 upgrades (#3)
Browse files Browse the repository at this point in the history
* upgrade coms

* Update coms

* migrate to rio_plot

* add fperf

* fix dsc

* remove fperf tests

* re-org post scripts

* remove pipeline

* promote scripts

* fix test_dsc

* run_dsc

* rename DscBaseSession

* start eval

* write_pick

* start run_dsc_vali_multi

* results pickle

* _get_fps_from_dsc_lib

* add test pick

* run_vali_multi_dsc

* fix definitions

* migrate off toy

* update test data

* update LFS

* run_vali_multi_dsc

* start plotters

* fastforward to fperf work

* clean up tests and environment

* run_vali_multi_dsc upgrades

* add test_run_dsc_vali_multi data

* setup plot scripts

* clean up class inheritance

* test_load_run_serx

* finish test_plot

* clean up imports

* Create pytest_all_hook.bat

* test hooks

* Update test_dsc.py

* Update pytest_all_hook.bat
  • Loading branch information
cefect authored Mar 28, 2023
1 parent b703018 commit 337ab6c
Show file tree
Hide file tree
Showing 106 changed files with 1,854 additions and 3,828 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
*.tif filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.svg filter=lfs diff=lfs merge=lfs -text
*.qgz filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,5 @@ dmypy.json

#windows shortcuts
*.lnk
definitions.py
*.msk
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
[submodule "whitebox-tools"]
path = whitebox-tools
url = https://github.com/cefect/whitebox-tools.git
[submodule "fperf"]
path = fperf
url = https://github.com/cefect/fperf
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,23 @@
PYTHONPATH:
PROJECT_DIR_NAME
PROJECT_DIR_NAME\coms
PROJECT_DIR_NAME\fperf
PROJECT_DIR_NAME\whitebox-tools
PROJECT_DIR_NAME\whitebox-tools\target\release (need to build first)

### Coms
git submodule add -b FloodDownscaler https://github.com/cefect/coms.git
cef's tools
`git submodule add -b FloodDownscaler https://github.com/cefect/coms.git`

### Whitebox tools
cefect's fork
git submodule https://github.com/cefect/whitebox-tools.git
flood grid performance tools
`git submodule add https://github.com/cefect/fperf`

v2.2.0
git switch c8d03fc3154a34d2d2904491ee36a7ab8239289c --detached

need to build this using rust (see below)
whitebox tools (cefect's fork)
`git submodule https://github.com/cefect/whitebox-tools.git`

v2.2.0
git switch c8d03fc3154a34d2d2904491ee36a7ab8239289c --detached
need to build this using rust (see below)



Expand All @@ -41,4 +44,6 @@ build a python environment per ./environment.yml
build whitebox-tools using rust
cargo build --release
takes a while
add submodules to pythonpath (see above)
add submodules to pythonpath (see above)

create and customize a definitions.py file (see the copy)
2 changes: 1 addition & 1 deletion coms
Submodule coms updated from c56af1 to d2c434
10 changes: 5 additions & 5 deletions definitions.py → definitions - Copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
I guess this is overwritten by local projects?
'''
import os




src_dir = os.path.dirname(os.path.abspath(__file__))
src_name = os.path.basename(src_dir)
Expand All @@ -22,7 +19,10 @@
#whitebox exe location
wbt_dir = os.path.join(src_dir, r'whitebox-tools\target\release')

#specify the latex install directory
os.environ['PATH'] += R";C:\Program Files\MiKTeX\miktex\bin\x64"



#spatial (mostly for testing)
epsg = 3857
bounds = (0, 0, 100, 100)

4 changes: 0 additions & 4 deletions dev/activate.bat

This file was deleted.

3 changes: 0 additions & 3 deletions dev/conda_activate.bat

This file was deleted.

8 changes: 0 additions & 8 deletions dev/conda_env_update.bat

This file was deleted.

4 changes: 1 addition & 3 deletions dscale_2207/Ahr_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
else:
raise KeyError(env_type)


if usetex:
os.environ['PATH'] += R";C:\Users\cefect\AppData\Local\Programs\MiKTeX\miktex\bin\x64"



import matplotlib
Expand Down
4 changes: 0 additions & 4 deletions env/activate.bat

This file was deleted.

24 changes: 17 additions & 7 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,26 @@ dependencies:
- matplotlib=3.6.*
- geopandas=0.12.*
- openpyxl
- numba=0.56.*
- cudatoolkit
- colorama
- pyyaml
#- numba=0.56.*
#- cudatoolkit
#- colorama
#- pyyaml
#- xarray=2022.12.*
#- dask
- numbagg
#- numbagg
#- rioxarray=0.13.*
- xlsxwriter=3.0.*
- georasters=0.5.*
- earthpy=0.9.*

- pip
- pip:
- earthpy==0.9.*
- palettable==3.3.*
- matplotlib-scalebar==0.8.*


variables:
#tell geopandas to use pygeos (instead of shapely)
USE_PYGEOS: 1
#remove any GDAL data
PROJ_LIB:
GDAL_DATA:
Loading

0 comments on commit 337ab6c

Please sign in to comment.