diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 3751cf39d..be16399de 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -2,7 +2,7 @@ name: Py 3.7 3.8, 3.9 | Windows Mac Linux
on:
push:
- branches:
+ branches:
- master
- Develop
pull_request:
@@ -102,9 +102,60 @@ jobs:
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
+ hindcast-calls:
+ name: hindcast-${{ matrix.os }}/${{ matrix.python-version }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ max-parallel: 1
+ fail-fast: false
+ matrix:
+ os: ["windows-latest", "macos-latest"]
+ python-version: [3.9]
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Setup Conda
+ uses: s-weigand/setup-conda@v1
+ with:
+ activate-conda: false
+ conda-channels: conda-forge
+
+ - name: Python ${{ matrix.python-version }}
+ shell: bash -l {0}
+ run: |
+ conda create --name TEST python=${{ matrix.python-version }} numpy cython pip pytest hdf5 libnetcdf cftime netcdf4 coverage --strict-channel-priority
+ source activate TEST
+ export PATH="${CONDA_PREFIX}/bin:${CONDA_PREFIX}/Library/bin:$PATH" # so setup.py finds nc-config
+ pip install -e . --no-deps --force-reinstall
+
+ - name: Install MHKiT
+ shell: bash -l {0}
+ run: |
+ source activate TEST
+ python -m pip install --upgrade pip wheel
+ pip install coveralls
+ pip install .
+
+ - name: Run pytest
+ shell: bash -l {0}
+ run: |
+ source activate TEST
+ coverage run --rcfile=.github/workflows/.coveragehindcastrc -m pytest -c .github/workflows/pytest-hindcast.ini
+
+ - name: Upload coverage data to coveralls.io
+ shell: bash -l {0}
+ run: |
+ source activate TEST
+ coveralls --service=github
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
+ COVERALLS_PARALLEL: true
+
coveralls:
name: Indicate completion to coveralls.io
- needs: [conda-build, pip-build]
+ needs: [conda-build, pip-build, hindcast-calls]
runs-on: ubuntu-latest
container: python:3-slim
steps:
diff --git a/.hscfg b/.hscfg
index 33d8d9c33..f6f00424b 100644
--- a/.hscfg
+++ b/.hscfg
@@ -1,4 +1,4 @@
-hs_endpoint = https://developer.nrel.gov/api/hsds
-hs_username =
-hs_password =
+hs_endpoint = https://developer.nrel.gov/api/hsds
+hs_username =
+hs_password =
hs_api_key = 3K3JQbjZmWctY0xmIfSYvYgtIcM3CN0cb1Y2w9bf
diff --git a/examples/WPTO_hindcast_example.ipynb b/examples/WPTO_hindcast_example.ipynb
index 99d6fa33e..1881dd6e4 100644
--- a/examples/WPTO_hindcast_example.ipynb
+++ b/examples/WPTO_hindcast_example.ipynb
@@ -912,7 +912,9 @@
" fig.send_message('supports_binary', { value: fig.supports_binary });\n",
" fig.send_message('send_image_mode', {});\n",
" if (fig.ratio !== 1) {\n",
- " fig.send_message('set_dpi_ratio', { dpi_ratio: fig.ratio });\n",
+ " fig.send_message('set_device_pixel_ratio', {\n",
+ " device_pixel_ratio: fig.ratio,\n",
+ " });\n",
" }\n",
" fig.send_message('refresh', {});\n",
" };\n",
@@ -1291,22 +1293,7 @@
"};\n",
"\n",
"mpl.figure.prototype.handle_cursor = function (fig, msg) {\n",
- " var cursor = msg['cursor'];\n",
- " switch (cursor) {\n",
- " case 0:\n",
- " cursor = 'pointer';\n",
- " break;\n",
- " case 1:\n",
- " cursor = 'default';\n",
- " break;\n",
- " case 2:\n",
- " cursor = 'crosshair';\n",
- " break;\n",
- " case 3:\n",
- " cursor = 'move';\n",
- " break;\n",
- " }\n",
- " fig.rubberband_canvas.style.cursor = cursor;\n",
+ " fig.rubberband_canvas.style.cursor = msg['cursor'];\n",
"};\n",
"\n",
"mpl.figure.prototype.handle_message = function (fig, msg) {\n",
@@ -1418,7 +1405,7 @@
" };\n",
"};\n",
"\n",
- "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
+ "// from https://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
"mpl.findpos = function (e) {\n",
" //this section is from http://www.quirksmode.org/js/events_properties.html\n",
" var targ;\n",
@@ -1446,7 +1433,7 @@
"/*\n",
" * return a copy of an object with only non-object keys\n",
" * we need this to avoid circular references\n",
- " * http://stackoverflow.com/a/24161582/3208463\n",
+ " * https://stackoverflow.com/a/24161582/3208463\n",
" */\n",
"function simpleKeys(original) {\n",
" return Object.keys(original).reduce(function (obj, key) {\n",
@@ -1535,7 +1522,7 @@
"///////////////// REMAINING CONTENT GENERATED BY embed_js.py /////////////////\n",
"// prettier-ignore\n",
"var _JSXTOOLS_RESIZE_OBSERVER=function(A){var t,i=new WeakMap,n=new WeakMap,a=new WeakMap,r=new WeakMap,o=new Set;function s(e){if(!(this instanceof s))throw new TypeError(\"Constructor requires 'new' operator\");i.set(this,e)}function h(){throw new TypeError(\"Function is not a constructor\")}function c(e,t,i,n){e=0 in arguments?Number(arguments[0]):0,t=1 in arguments?Number(arguments[1]):0,i=2 in arguments?Number(arguments[2]):0,n=3 in arguments?Number(arguments[3]):0,this.right=(this.x=this.left=e)+(this.width=i),this.bottom=(this.y=this.top=t)+(this.height=n),Object.freeze(this)}function d(){t=requestAnimationFrame(d);var s=new WeakMap,p=new Set;o.forEach((function(t){r.get(t).forEach((function(i){var r=t instanceof window.SVGElement,o=a.get(t),d=r?0:parseFloat(o.paddingTop),f=r?0:parseFloat(o.paddingRight),l=r?0:parseFloat(o.paddingBottom),u=r?0:parseFloat(o.paddingLeft),g=r?0:parseFloat(o.borderTopWidth),m=r?0:parseFloat(o.borderRightWidth),w=r?0:parseFloat(o.borderBottomWidth),b=u+f,F=d+l,v=(r?0:parseFloat(o.borderLeftWidth))+m,W=g+w,y=r?0:t.offsetHeight-W-t.clientHeight,E=r?0:t.offsetWidth-v-t.clientWidth,R=b+v,z=F+W,M=r?t.width:parseFloat(o.width)-R-E,O=r?t.height:parseFloat(o.height)-z-y;if(n.has(t)){var k=n.get(t);if(k[0]===M&&k[1]===O)return}n.set(t,[M,O]);var S=Object.create(h.prototype);S.target=t,S.contentRect=new c(u,d,M,O),s.has(i)||(s.set(i,[]),p.add(i)),s.get(i).push(S)}))})),p.forEach((function(e){i.get(e).call(e,s.get(e),e)}))}return s.prototype.observe=function(i){if(i instanceof window.Element){r.has(i)||(r.set(i,new Set),o.add(i),a.set(i,window.getComputedStyle(i)));var n=r.get(i);n.has(this)||n.add(this),cancelAnimationFrame(t),t=requestAnimationFrame(d)}},s.prototype.unobserve=function(i){if(i instanceof window.Element&&r.has(i)){var n=r.get(i);n.has(this)&&(n.delete(this),n.size||(r.delete(i),o.delete(i))),n.size||r.delete(i),o.size||cancelAnimationFrame(t)}},A.DOMRectReadOnly=c,A.ResizeObserver=s,A.ResizeObserverEntry=h,A}; // eslint-disable-line\n",
- "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
+ "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
"\n",
"mpl.extensions = [\"eps\", \"jpeg\", \"pgf\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
"\n",
@@ -1769,11 +1756,6 @@
"};\n",
"\n",
"mpl.figure.prototype._key_event_extra = function (event, _name) {\n",
- " var manager = IPython.notebook.keyboard_manager;\n",
- " if (!manager) {\n",
- " manager = IPython.keyboard_manager;\n",
- " }\n",
- "\n",
" // Check for shift+enter\n",
" if (event.shiftKey && event.which === 13) {\n",
" this.canvas_div.blur();\n",
@@ -1830,7 +1812,7 @@
{
"data": {
"text/html": [
- ""
+ "