Skip to content

Commit

Permalink
Workflows
Browse files Browse the repository at this point in the history
Testing notebooks
  • Loading branch information
sdc50 committed Sep 14, 2018
1 parent ea2d856 commit d025742
Show file tree
Hide file tree
Showing 32 changed files with 2,439 additions and 1,066 deletions.
9 changes: 8 additions & 1 deletion conda_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name: quest

channels:
- conda-forge
- erdc
- pyviz/label/dev

dependencies:
- python=3
Expand Down Expand Up @@ -44,6 +44,7 @@ dependencies:
# test dependencies
- pytest-cov
- coveralls
- nbval

# docs dependencies
- sphinx
Expand All @@ -56,3 +57,9 @@ dependencies:
- pillow
- requests
- whitebox_tools

# notebook examples dependencies
- holoviews
- geoviews
- parambokeh
- cartopy
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"execution_count": 1,
"metadata": {},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'gsshapy'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-1-29db8e3d9ca6>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mgeopandas\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mgpd\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mgsshapy\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmodeling\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mGSSHAModel\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 7\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mquest\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mcolors\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpyplot\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'gsshapy'"
]
}
],
"source": [
"%matplotlib inline\n",
"from datetime import datetime, timedelta\n",
Expand All @@ -52,9 +62,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"VICKSBURG = 'vicksburg'\n",
Expand Down Expand Up @@ -86,9 +94,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"def download_data(service_uri, bbox, collection):\n",
Expand Down Expand Up @@ -125,9 +131,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"elevation_service = 'svc://usgs-ned:13-arc-second'\n",
Expand All @@ -149,9 +153,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"## Delete all collections\n",
Expand Down Expand Up @@ -192,9 +194,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"def watershed_delineation(elevation, outlet):\n",
Expand Down Expand Up @@ -264,9 +264,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"# read in elevation data\n",
Expand Down Expand Up @@ -351,9 +349,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"# make the directory for the output\n",
Expand All @@ -376,9 +372,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"# workaround for crs not being saved correctly\n",
Expand All @@ -399,9 +393,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"elevation_file_path = quest.api.get_metadata(elevation)[elevation]['file_path']\n",
Expand All @@ -411,12 +403,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"\n",
"# generate GSSHA model files\n",
"model = GSSHAModel(project_name=gssha_model_name,\n",
" project_directory=gssha_model_directory,\n",
Expand Down Expand Up @@ -446,9 +435,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": []
}
Expand All @@ -469,9 +456,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.6.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 1
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.6"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit d025742

Please sign in to comment.