Skip to content

Commit

Permalink
Merge pull request #4 from ClimateImpactLab/feature/update-version
Browse files Browse the repository at this point in the history
add zipped packages to Zenodo-upload
  • Loading branch information
bolliger32 authored Mar 22, 2023
2 parents bca173a + 441fe9b commit 66f1d9e
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 24 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,8 @@ target/
# Mypy cache
.mypy_cache/

# dask
dask-worker-space
# other
dask-worker-space
nb_logs
.virtual_documents
shared_gcs.py
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion environment/environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: pyciam
channels:
- conda-forge

dependencies:
- bottleneck=1.3
- bokeh=2.4.3 # for use of dask dashboard
Expand Down
51 changes: 30 additions & 21 deletions notebooks/post-processing/zenodo-upload.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"cell_type": "code",
"execution_count": 1,
"id": "706cee66-6557-402d-ae97-679ed202a9fe",
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import sys\n",
Expand All @@ -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",
Expand All @@ -45,12 +41,14 @@
"cell_type": "code",
"execution_count": 3,
"id": "d37ca26f-091d-4cb6-be02-385464e0b687",
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"<dask.config.set at 0x7fb0070b1fd0>"
"<dask.config.set at 0x112a25b70>"
]
},
"execution_count": 3,
Expand Down Expand Up @@ -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\")"
]
},
{
Expand Down Expand Up @@ -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"
]
},
{
Expand Down Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down

0 comments on commit 66f1d9e

Please sign in to comment.