diff --git a/.github/workflows/02_deploy.yml b/.github/workflows/02_deploy.yml index 288c61f4..a01099e5 100644 --- a/.github/workflows/02_deploy.yml +++ b/.github/workflows/02_deploy.yml @@ -38,6 +38,16 @@ jobs: - name: Get current datetime in ISO format id: date run: echo "::set-output name=date::$(date -u +'%Y-%m-%d')" + - uses: jakejarvis/s3-sync-action@master + with: + args: --delete + env: + SOURCE_DIR: 'notebooks' + DEST_DIR: 'notebooks' + AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} - name: Create GitHub release id: gh_release uses: softprops/action-gh-release@v1 diff --git a/docs/source/conf.py b/docs/source/conf.py index db6042b5..3028261b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,10 +24,10 @@ # -- Notebook URLs ----------------------------------------------------------- rst_prolog = """ -.. _nb_logistic_regression: https://mybinder.org/v2/gh/IMMM-SFA/msd_uncertainty_ebook/main?labpath=notebooks%2Fbasin_users_logistic_regression.ipynb -.. _nb_saltelli_sobol: https://mybinder.org/v2/gh/IMMM-SFA/msd_uncertainty_ebook/main?labpath=notebooks%2Fsa_saltelli_sobol_ishigami.ipynb -.. _nb_hymod: https://mybinder.org/v2/gh/IMMM-SFA/msd_uncertainty_ebook/main?labpath=notebooks%2Fhymod.ipynb -.. _nb_fishery_dynamics: https://mybinder.org/v2/gh/IMMM-SFA/msd_uncertainty_ebook/main?labpath=notebooks%2Ffishery_dynamics.ipynb +.. _nb_logistic_regression: https://uc-ebook.msdlive.org/user-redirect/lab/tree/examples/basin_users_logistic_regression.ipynb +.. _nb_saltelli_sobol: https://uc-ebook.msdlive.org/user-redirect/lab/tree/examples/sa_saltelli_sobol_ishigami.ipynb +.. _nb_hymod: https://uc-ebook.msdlive.org/user-redirect/lab/tree/examples/hymod.ipynb +.. _nb_fishery_dynamics: https://uc-ebook.msdlive.org/user-redirect/lab/tree/examples/fishery_dynamics.ipynb """ diff --git a/notebooks/basin_users_logistic_regression.ipynb b/notebooks/basin_users_logistic_regression.ipynb index fe699366..cad23eb5 100644 --- a/notebooks/basin_users_logistic_regression.ipynb +++ b/notebooks/basin_users_logistic_regression.ipynb @@ -30,6 +30,19 @@ "In this tutorial, we will be loading in data that has been produced in Hadjimichael et al. (2020). Before we start our analysis, we'll load the relevant Python libraries, example data, and information for the three users." ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### **NOTE:** If you are running this notebook locally, run the following command to install the required package data:\n", + "\n", + "```python\n", + "msdbook.install_package_data()\n", + "```\n", + "\n", + "##### Otherwise, proceed with the following" + ] + }, { "cell_type": "code", "execution_count": null, @@ -51,9 +64,6 @@ "import matplotlib as mpl\n", "import matplotlib.pyplot as plt\n", "\n", - "# load example data from Hadjimichael et al. (2020)\n", - "msdbook.install_package_data()\n", - "\n", "# Select the IDs for the three users that we will perform the analysis for\n", "all_IDs = ['7000550','7200799','3704614'] \n", "usernames = ['Medium seniority irrigation',\n", diff --git a/notebooks/fishery_dynamics.ipynb b/notebooks/fishery_dynamics.ipynb index d11c7263..06c1cc3a 100644 --- a/notebooks/fishery_dynamics.ipynb +++ b/notebooks/fishery_dynamics.ipynb @@ -62,6 +62,19 @@ "In this tutorial, we will be loading in data that has been produced in Hadjimichael et al. (2020). Before we start our analysis, we'll load the relevant Python libraries. __NOTE__: To step through the notebook, execute each gray (code) box by typing \"Shift+Enter\"." ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### **NOTE:** If you are running this notebook locally, run the following command to install the required package data:\n", + "\n", + "```python\n", + "msdbook.install_package_data()\n", + "```\n", + "\n", + "##### Otherwise, proceed with the following" + ] + }, { "cell_type": "code", "execution_count": null, @@ -81,9 +94,6 @@ "from SALib.analyze import sobol\n", "from matplotlib import patheffects as pe\n", "\n", - "# load example data\n", - "msdbook.install_package_data()\n", - "\n", "%matplotlib inline\n", "%config InlineBackend.print_figure_kwargs = {'bbox_inches':None}\n" ] diff --git a/notebooks/hymod.ipynb b/notebooks/hymod.ipynb index 8046beb2..aaf82b0f 100644 --- a/notebooks/hymod.ipynb +++ b/notebooks/hymod.ipynb @@ -104,6 +104,19 @@ "In the following section of code, we'll load the necessary python libraries and read in the input file. For this exercise we'll only use the first eleven years of data. The first five rows of the input dataset are printed to show what they look like:" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### **NOTE:** If you are running this notebook locally, run the following command to install the required package data:\n", + "\n", + "```python\n", + "msdbook.install_package_data()\n", + "```\n", + "\n", + "##### Otherwise, proceed with the following" + ] + }, { "cell_type": "code", "execution_count": null, @@ -120,9 +133,6 @@ "from sklearn import metrics\n", "from matplotlib import pyplot as plt\n", "\n", - "# load example data\n", - "msdbook.install_package_data()\n", - "\n", "# load the Leaf River HYMOD input file\n", "leaf_data = msdbook.load_hymod_input_file()\n", "\n",