Skip to content

Commit 66f1d9e

Browse files
authored
Merge pull request #4 from ClimateImpactLab/feature/update-version
add zipped packages to Zenodo-upload
2 parents bca173a + 441fe9b commit 66f1d9e

File tree

5 files changed

+41
-24
lines changed

5 files changed

+41
-24
lines changed

.gitignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,8 @@ target/
8888
# Mypy cache
8989
.mypy_cache/
9090

91-
# dask
92-
dask-worker-space
91+
# other
92+
dask-worker-space
93+
nb_logs
94+
.virtual_documents
95+
shared_gcs.py

HISTORY.rst

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
History
22
=======
33

4+
v1.1.2
5+
------
6+
* Update zenodo-upload.ipynb to include packages
7+
* Update readme to emphasize environment.yml
8+
49
v1.1.1
510
------
611
* Update package dependencies

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The requisite packages for executing the full Depsky et al. 2023 workflow are id
3030

3131
```bash
3232
mamba env create -f /path/to/environment.yml
33+
mamba activate pyciam
3334
```
3435

3536
## Quickstart

environment/environment.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: pyciam
22
channels:
33
- conda-forge
4-
54
dependencies:
65
- bottleneck=1.3
76
- bokeh=2.4.3 # for use of dask dashboard

notebooks/post-processing/zenodo-upload.ipynb

+30-21
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"cell_type": "code",
55
"execution_count": 1,
66
"id": "706cee66-6557-402d-ae97-679ed202a9fe",
7-
"metadata": {},
7+
"metadata": {
8+
"tags": []
9+
},
810
"outputs": [],
911
"source": [
1012
"import sys\n",
@@ -14,25 +16,19 @@
1416
},
1517
{
1618
"cell_type": "code",
17-
"execution_count": 2,
19+
"execution_count": 4,
1820
"id": "29a54dac-abdc-4a95-967f-2289fc1c9ecb",
19-
"metadata": {},
20-
"outputs": [
21-
{
22-
"name": "stderr",
23-
"output_type": "stream",
24-
"text": [
25-
"/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",
26-
" from distributed.utils import LoopRunner, format_bytes\n"
27-
]
28-
}
29-
],
21+
"metadata": {
22+
"tags": []
23+
},
24+
"outputs": [],
3025
"source": [
3126
"import json\n",
3227
"from os import environ\n",
3328
"from pathlib import Path\n",
3429
"from shutil import make_archive\n",
3530
"from tempfile import TemporaryDirectory\n",
31+
"from pathlib import Path\n",
3632
"\n",
3733
"import dask.config\n",
3834
"import requests\n",
@@ -45,12 +41,14 @@
4541
"cell_type": "code",
4642
"execution_count": 3,
4743
"id": "d37ca26f-091d-4cb6-be02-385464e0b687",
48-
"metadata": {},
44+
"metadata": {
45+
"tags": []
46+
},
4947
"outputs": [
5048
{
5149
"data": {
5250
"text/plain": [
53-
"<dask.config.set at 0x7fb0070b1fd0>"
51+
"<dask.config.set at 0x112a25b70>"
5452
]
5553
},
5654
"execution_count": 3,
@@ -86,7 +84,9 @@
8684
"TITLES = {\n",
8785
" \"SLIIDERS\": \"SLIIDERS: Sea Level Impacts Input Dataset by Elevation, Region, and Scenario\",\n",
8886
" \"pyCIAM\": \"Estimates of Global Coastal Losses Under Multiple Sea Level Rise Scenarios\",\n",
89-
"}"
87+
"}\n",
88+
"PYCIAM_CODE_PATH=Path(\"pyCIAM-1.1.2.zip\")\n",
89+
"SLIIDERS_CODE_PATH=Path(\"sliiders-1.1.1.zip\")"
9090
]
9191
},
9292
{
@@ -235,7 +235,12 @@
235235
" shared.PATHS_SURGE_LOOKUP[\"seg_adm\"],\n",
236236
" ],\n",
237237
" },\n",
238-
"}"
238+
"}\n",
239+
"\n",
240+
"if PYCIAM_CODE_PATH is not None:\n",
241+
" ORIGINAL_PATHS[\"pyCIAM\"][\"source\"] = [PYCIAM_CODE_PATH]\n",
242+
"if SLIIDERS_CODE_PATH is not None:\n",
243+
" ORIGINAL_PATHS[\"SLIIDERS\"][\"source\"] = [SLIIDERS_CODE_PATH"
239244
]
240245
},
241246
{
@@ -434,15 +439,19 @@
434439
" )\n",
435440
" uploads[name] += upload_file_list(\n",
436441
" this_dep, kind[\"products\"], \"products/\", overwrite=False\n",
437-
" )"
442+
" )\n",
443+
" if \"source\" in kind.keys(): \n",
444+
" uploads[name] += upload_file_list(\n",
445+
" this_dep, kind[\"source\"], \"source/\", overwrite=False\n",
446+
" )"
438447
]
439448
}
440449
],
441450
"metadata": {
442451
"kernelspec": {
443-
"display_name": "Python 3 (ipykernel)",
452+
"display_name": "Python [conda env:sliiders]",
444453
"language": "python",
445-
"name": "python3"
454+
"name": "conda-env-sliiders-py"
446455
},
447456
"language_info": {
448457
"codemirror_mode": {
@@ -454,7 +463,7 @@
454463
"name": "python",
455464
"nbconvert_exporter": "python",
456465
"pygments_lexer": "ipython3",
457-
"version": "3.9.10"
466+
"version": "3.10.9"
458467
},
459468
"widgets": {
460469
"application/vnd.jupyter.widget-state+json": {

0 commit comments

Comments
 (0)