Skip to content

Commit 8be01d0

Browse files
authored
Container for environment setup on codespaces (#22)
* fix path * environment setup
1 parent 99769cd commit 8be01d0

3 files changed

Lines changed: 27 additions & 4 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "CSSI Evaluation Workshop",
3+
"image": "mcr.microsoft.com/devcontainers/miniconda:3",
4+
5+
// Create the conda environment (includes editable package install + notebook extras),
6+
// register the Jupyter kernel, and activate the env in every new terminal session.
7+
"postCreateCommand": "conda env create -f cssi_env.yml && conda run -n cssi_evaluation python -m ipykernel install --user --name=cssi_evaluation --display-name='Python (cssi_evaluation)' && echo 'conda activate cssi_evaluation' >> ~/.bashrc",
8+
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"ms-python.python",
13+
"ms-toolsai.jupyter",
14+
"ms-toolsai.jupyter-keymap",
15+
"ms-toolsai.vscode-jupyter-slideshow"
16+
],
17+
"settings": {
18+
"python.defaultInterpreterPath": "/opt/conda/envs/cssi_evaluation/bin/python",
19+
"jupyter.notebookFileRoot": "${workspaceFolder}"
20+
}
21+
}
22+
}
23+
}

examples/collect_observations/dataCollectionHydrodata_parflow.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
"StartDate = '2003-10-01'\n",
157157
"EndDate = '2005-09-30'\n",
158158
"\n",
159-
"domain_data_path = '../parflow/domain_data/' # path to the model domain data\n",
159+
"domain_data_path = 'examples/parflow/domain_data/' # path to the model domain data\n",
160160
"\n",
161161
"# Path to save results (obs and mod stands for observation and modeled, respectively)\n",
162162
"OBS_OutputFolder = './obs_outputs_PF' \n",

examples/collect_observations/dataCollection_nwm.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"outputs": [],
109109
"source": [
110110
"# path to the model domain data\n",
111-
"domain_data_path = '../nwm/domain_data/' \n",
111+
"domain_data_path = 'examples/nwm/domain_data/' \n",
112112
"\n",
113113
"# Path to the watershed shapefile\n",
114114
"watershed = f\"{domain_data_path}TolumneRiver_18040009.shp\"\n",
@@ -124,8 +124,8 @@
124124
"EndDate = '2020-09-30'\n",
125125
"\n",
126126
"# Path to save results (obs and mod stands for observation and modeled, respectively)\n",
127-
"OBS_OutputFolder = '../nwm/obs_outputs' \n",
128-
"MOD_OutputFolder = '../nwm/mod_outputs'"
127+
"OBS_OutputFolder = 'examples/nwm/obs_outputs' \n",
128+
"MOD_OutputFolder = 'examples/nwm/mod_outputs'"
129129
]
130130
},
131131
{

0 commit comments

Comments
 (0)