diff --git a/.gitignore b/.gitignore index 8449e86..be326cf 100644 --- a/.gitignore +++ b/.gitignore @@ -88,5 +88,8 @@ target/ # Mypy cache .mypy_cache/ -# dask -dask-worker-space \ No newline at end of file +# other +dask-worker-space +nb_logs +.virtual_documents +shared_gcs.py diff --git a/HISTORY.rst b/HISTORY.rst index 452d0a1..545ebd9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,11 @@ History ======= +v1.1.2 +------ +* Update zenodo-upload.ipynb to include packages +* Update readme to emphasize environment.yml + v1.1.1 ------ * Update package dependencies diff --git a/README.md b/README.md index 235e230..f485ea1 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ The requisite packages for executing the full Depsky et al. 2023 workflow are id ```bash mamba env create -f /path/to/environment.yml +mamba activate pyciam ``` ## Quickstart diff --git a/environment/environment.yml b/environment/environment.yml index c0b80ff..3de64b3 100644 --- a/environment/environment.yml +++ b/environment/environment.yml @@ -1,7 +1,6 @@ name: pyciam channels: - conda-forge - dependencies: - bottleneck=1.3 - bokeh=2.4.3 # for use of dask dashboard diff --git a/notebooks/post-processing/zenodo-upload.ipynb b/notebooks/post-processing/zenodo-upload.ipynb index 619a04e..aaea54c 100644 --- a/notebooks/post-processing/zenodo-upload.ipynb +++ b/notebooks/post-processing/zenodo-upload.ipynb @@ -4,7 +4,9 @@ "cell_type": "code", "execution_count": 1, "id": "706cee66-6557-402d-ae97-679ed202a9fe", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "import sys\n", @@ -14,25 +16,19 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "id": "29a54dac-abdc-4a95-967f-2289fc1c9ecb", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/srv/conda/envs/notebook/lib/python3.9/site-packages/dask_gateway/client.py:21: FutureWarning: format_bytes is deprecated and will be removed in a future release. Please use dask.utils.format_bytes instead.\n", - " from distributed.utils import LoopRunner, format_bytes\n" - ] - } - ], + "metadata": { + "tags": [] + }, + "outputs": [], "source": [ "import json\n", "from os import environ\n", "from pathlib import Path\n", "from shutil import make_archive\n", "from tempfile import TemporaryDirectory\n", + "from pathlib import Path\n", "\n", "import dask.config\n", "import requests\n", @@ -45,12 +41,14 @@ "cell_type": "code", "execution_count": 3, "id": "d37ca26f-091d-4cb6-be02-385464e0b687", - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 3, @@ -86,7 +84,9 @@ "TITLES = {\n", " \"SLIIDERS\": \"SLIIDERS: Sea Level Impacts Input Dataset by Elevation, Region, and Scenario\",\n", " \"pyCIAM\": \"Estimates of Global Coastal Losses Under Multiple Sea Level Rise Scenarios\",\n", - "}" + "}\n", + "PYCIAM_CODE_PATH=Path(\"pyCIAM-1.1.2.zip\")\n", + "SLIIDERS_CODE_PATH=Path(\"sliiders-1.1.1.zip\")" ] }, { @@ -235,7 +235,12 @@ " shared.PATHS_SURGE_LOOKUP[\"seg_adm\"],\n", " ],\n", " },\n", - "}" + "}\n", + "\n", + "if PYCIAM_CODE_PATH is not None:\n", + " ORIGINAL_PATHS[\"pyCIAM\"][\"source\"] = [PYCIAM_CODE_PATH]\n", + "if SLIIDERS_CODE_PATH is not None:\n", + " ORIGINAL_PATHS[\"SLIIDERS\"][\"source\"] = [SLIIDERS_CODE_PATH" ] }, { @@ -434,15 +439,19 @@ " )\n", " uploads[name] += upload_file_list(\n", " this_dep, kind[\"products\"], \"products/\", overwrite=False\n", - " )" + " )\n", + " if \"source\" in kind.keys(): \n", + " uploads[name] += upload_file_list(\n", + " this_dep, kind[\"source\"], \"source/\", overwrite=False\n", + " )" ] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python [conda env:sliiders]", "language": "python", - "name": "python3" + "name": "conda-env-sliiders-py" }, "language_info": { "codemirror_mode": { @@ -454,7 +463,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.10" + "version": "3.10.9" }, "widgets": { "application/vnd.jupyter.widget-state+json": {