Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 5, 2023
1 parent 6a5028c commit 9d7227f
Show file tree
Hide file tree
Showing 23 changed files with 13,236 additions and 13,236 deletions.
450 changes: 225 additions & 225 deletions docs/notebooks/00_Introduction_to_JupyterLab.ipynb

Large diffs are not rendered by default.

590 changes: 295 additions & 295 deletions docs/notebooks/01_Getting_watershed_boundaries.ipynb

Large diffs are not rendered by default.

1,436 changes: 718 additions & 718 deletions docs/notebooks/02_Extract_geographical_watershed_properties.ipynb

Large diffs are not rendered by default.

1,698 changes: 849 additions & 849 deletions docs/notebooks/03_Extracting_forcing_data.ipynb

Large diffs are not rendered by default.

1,650 changes: 825 additions & 825 deletions docs/notebooks/04_Emulating_hydrological_models.ipynb

Large diffs are not rendered by default.

1,170 changes: 585 additions & 585 deletions docs/notebooks/05_Advanced_RavenPy_configuration.ipynb

Large diffs are not rendered by default.

706 changes: 353 additions & 353 deletions docs/notebooks/06_Raven_calibration.ipynb

Large diffs are not rendered by default.

458 changes: 229 additions & 229 deletions docs/notebooks/07_Making_and_using_hotstart_files.ipynb

Large diffs are not rendered by default.

4,768 changes: 2,384 additions & 2,384 deletions docs/notebooks/08_Getting_and_bias_correcting_CMIP6_data.ipynb

Large diffs are not rendered by default.

436 changes: 218 additions & 218 deletions docs/notebooks/09_Hydrological_impacts_of_climate_change.ipynb

Large diffs are not rendered by default.

1,020 changes: 510 additions & 510 deletions docs/notebooks/10_Data_assimilation.ipynb

Large diffs are not rendered by default.

592 changes: 296 additions & 296 deletions docs/notebooks/11_Climatological_ESP_forecasting.ipynb

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions docs/notebooks/12_Performing_hindcasting_experiments.ipynb

Large diffs are not rendered by default.

2,612 changes: 1,306 additions & 1,306 deletions docs/notebooks/Assess_probabilistic_flood_risk.ipynb

Large diffs are not rendered by default.

746 changes: 373 additions & 373 deletions docs/notebooks/Comparing_hindcasts_and_ESP_forecasts.ipynb

Large diffs are not rendered by default.

472 changes: 236 additions & 236 deletions docs/notebooks/Distributed_hydrological_modelling.ipynb

Large diffs are not rendered by default.

430 changes: 215 additions & 215 deletions docs/notebooks/HydroShare_integration.ipynb

Large diffs are not rendered by default.

532 changes: 266 additions & 266 deletions docs/notebooks/Hydrological_realtime_forecasting.ipynb

Large diffs are not rendered by default.

278 changes: 139 additions & 139 deletions docs/notebooks/Managing_Jupyter_Environments.ipynb
Original file line number Diff line number Diff line change
@@ -1,142 +1,142 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "4f561d83-4d79-4896-a4d5-723dadf9dceb",
"metadata": {},
"source": [
"# Managing Jupyter Environments\n",
"\n",
"This Notebook shows how to customize your Jupyter environment to install packages, reset the environment to defaults, and exporting the environment for reproducibility. We also provide some information on general guidelines on using the PAVICS-Hydro JupyterLab instance.\n",
"\n",
"## Installing packages\n",
"It is possible to install packages to the environment if they are not currently installed. To do so, we should prioritize \"mamba\" which can be seen as a faster/more efficient conda, and use pip if mamba fails. We can install packages by issuing the command in a notebook cell. Here we will try importing the \"seaborn\" package, which is not installed by default on PAVICS."
]
"cells": [
{
"cell_type": "markdown",
"id": "4f561d83-4d79-4896-a4d5-723dadf9dceb",
"metadata": {},
"source": [
"# Managing Jupyter Environments\n",
"\n",
"This Notebook shows how to customize your Jupyter environment to install packages, reset the environment to defaults, and exporting the environment for reproducibility. We also provide some information on general guidelines on using the PAVICS-Hydro JupyterLab instance.\n",
"\n",
"## Installing packages\n",
"It is possible to install packages to the environment if they are not currently installed. To do so, we should prioritize \"mamba\" which can be seen as a faster/more efficient conda, and use pip if mamba fails. We can install packages by issuing the command in a notebook cell. Here we will try importing the \"seaborn\" package, which is not installed by default on PAVICS."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "df83766d-036e-4685-b90b-7c2887967eba",
"metadata": {},
"outputs": [],
"source": [
"# Attempt to install seaborn. This will fail when run for the first time!\n",
"\n",
"# UNCOMMENT THE FOLLOWING LINE TO TEST THE EXISTENCE OF THE SEABORN PACKAGE. It is currently commented to ensure the automatic notebook checks do not fail for an obvious reason.\n",
"# import seaborn"
]
},
{
"cell_type": "markdown",
"id": "121d9b5e-23b0-4948-8acb-616602c3df02",
"metadata": {},
"source": [
"This has failed because the package is not currently installed. Let's install it using mamba. The same command can be used with pip, simply replace \"mamba\" with \"pip\"."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a29b12d8-4e9e-4aeb-abf9-9096dd6e24a5",
"metadata": {},
"outputs": [],
"source": [
"# Install using mamba, and provide the \"--yes\" option to pre-confirm installation\n",
"!mamba install seaborn --yes\n",
"\n",
"# This will take a few seconds to download, install and confirm installation."
]
},
{
"cell_type": "markdown",
"id": "b5b07347-c7e2-48ee-b525-6cd3bd0bff51",
"metadata": {},
"source": [
"We can now import the newly installed package:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5a82d19e-79e6-4529-9b3b-a6fc5d2a4b60",
"metadata": {},
"outputs": [],
"source": [
"# This will now work.\n",
"import seaborn"
]
},
{
"cell_type": "markdown",
"id": "88cc7291-d5b4-4df7-9746-d0183380be3a",
"metadata": {},
"source": [
"## Resetting the environment\n",
"If a package is installed that causes conflicts or causes code to break, it is possible to reset the environment by closing the server and respawning a new one, that will have the default packages installed. To do so, simply go to:\n",
"--> File\n",
" --> Hub Control Panel\n",
" --> Stop my server.\n",
"\n",
"\n",
"Doing so will kill the server, but it will nonetheless keep all of your files. Respawning the server will open a fresh default environment. You can test this now! When you try and re-run the notebook, the first cell will fail again because 'seaborn' will have not been installed yet on this server instance."
]
},
{
"cell_type": "markdown",
"id": "e67814b2-d84a-47dd-8c34-a02d6b7903c3",
"metadata": {},
"source": [
"## Exporting your environment\n",
"\n",
"To export your environment to replicate it elsewhere (such as a local installation, or to make a backup in case of future updates), you need to export two elements:\n",
" - The data\n",
" - The installed packages\n",
"\n",
"The data can be exported using the explorer on the left. You can select the files you want to download directly, or you can select \"Download current folder as an archive\". This will allow you to keep a copy of your data on your personal computer. However, note that data stored on this server is not removed or purged. Users are encouraged to use storage on an as-needed basis and to remove data that is not required to free-up resources for other users. PAVICS developers will contact users that use unreasonable amounts of storage space in order to find an alternative solution. The same reasoning also applies to computing power. Users can run multiple kernels/notebooks in parallel, but users are encouraged to use resources on an as-needed basis, with power users potentially being contacted to find alternative solutions.\n",
"\n",
"The environment can be exported using the following commands:\n",
"\n",
"**Export it to text in this Notebook:**\n",
"\n",
"```shell\n",
"conda env export\n",
"```\n",
"\n",
"### Other methods to export environments\n",
"You can also export the environment to files, using these commands:\n",
"\n",
"**Export it to file with explicit packages and channels:**\n",
"\n",
"```shell\n",
"conda list --explicit>ENV.txt\n",
"```\n",
"**Export it cross-platform:**\n",
"\n",
"```shell\n",
"conda env export --from-history>ENV.yml\n",
"```\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.16"
}
},
{
"cell_type": "code",
"execution_count": null,
"id": "df83766d-036e-4685-b90b-7c2887967eba",
"metadata": {},
"outputs": [],
"source": [
"# Attempt to install seaborn. This will fail when run for the first time!\n",
"\n",
"# UNCOMMENT THE FOLLOWING LINE TO TEST THE EXISTENCE OF THE SEABORN PACKAGE. It is currently commented to ensure the automatic notebook checks do not fail for an obvious reason.\n",
"# import seaborn"
]
},
{
"cell_type": "markdown",
"id": "121d9b5e-23b0-4948-8acb-616602c3df02",
"metadata": {},
"source": [
"This has failed because the package is not currently installed. Let's install it using mamba. The same command can be used with pip, simply replace \"mamba\" with \"pip\"."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a29b12d8-4e9e-4aeb-abf9-9096dd6e24a5",
"metadata": {},
"outputs": [],
"source": [
"# Install using mamba, and provide the \"--yes\" option to pre-confirm installation\n",
"!mamba install seaborn --yes\n",
"\n",
"# This will take a few seconds to download, install and confirm installation."
]
},
{
"cell_type": "markdown",
"id": "b5b07347-c7e2-48ee-b525-6cd3bd0bff51",
"metadata": {},
"source": [
"We can now import the newly installed package:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5a82d19e-79e6-4529-9b3b-a6fc5d2a4b60",
"metadata": {},
"outputs": [],
"source": [
"# This will now work.\n",
"import seaborn"
]
},
{
"cell_type": "markdown",
"id": "88cc7291-d5b4-4df7-9746-d0183380be3a",
"metadata": {},
"source": [
"## Resetting the environment\n",
"If a package is installed that causes conflicts or causes code to break, it is possible to reset the environment by closing the server and respawning a new one, that will have the default packages installed. To do so, simply go to:\n",
"--> File\n",
" --> Hub Control Panel\n",
" --> Stop my server.\n",
"\n",
"\n",
"Doing so will kill the server, but it will nonetheless keep all of your files. Respawning the server will open a fresh default environment. You can test this now! When you try and re-run the notebook, the first cell will fail again because 'seaborn' will have not been installed yet on this server instance."
]
},
{
"cell_type": "markdown",
"id": "e67814b2-d84a-47dd-8c34-a02d6b7903c3",
"metadata": {},
"source": [
"## Exporting your environment\n",
"\n",
"To export your environment to replicate it elsewhere (such as a local installation, or to make a backup in case of future updates), you need to export two elements:\n",
" - The data\n",
" - The installed packages\n",
"\n",
"The data can be exported using the explorer on the left. You can select the files you want to download directly, or you can select \"Download current folder as an archive\". This will allow you to keep a copy of your data on your personal computer. However, note that data stored on this server is not removed or purged. Users are encouraged to use storage on an as-needed basis and to remove data that is not required to free-up resources for other users. PAVICS developers will contact users that use unreasonable amounts of storage space in order to find an alternative solution. The same reasoning also applies to computing power. Users can run multiple kernels/notebooks in parallel, but users are encouraged to use resources on an as-needed basis, with power users potentially being contacted to find alternative solutions.\n",
"\n",
"The environment can be exported using the following commands:\n",
"\n",
"**Export it to text in this Notebook:**\n",
"\n",
"```shell\n",
"conda env export\n",
"```\n",
"\n",
"### Other methods to export environments\n",
"You can also export the environment to files, using these commands:\n",
"\n",
"**Export it to file with explicit packages and channels:**\n",
"\n",
"```shell\n",
"conda list --explicit>ENV.txt\n",
"```\n",
"**Export it cross-platform:**\n",
"\n",
"```shell\n",
"conda env export --from-history>ENV.yml\n",
"```\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.16"
}
},
"nbformat": 4,
"nbformat_minor": 5
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit 9d7227f

Please sign in to comment.