diff --git a/doc/Changelog.md b/doc/Changelog.md index 93186e52..6c0352f6 100644 --- a/doc/Changelog.md +++ b/doc/Changelog.md @@ -17,9 +17,13 @@ og:description: See what's new in the latest release of Roseau Load Flow ! # Changelog +## Unreleased + +- {gh-pr}`267` Add a section in the documentation on Google Colab secrets. + ## Version 0.10.0 -- A wheel for Python 3.13 is also available. +- A wheel for Python 3.13 is available. - The wheels for Windows are now available. The problem was the same as the one of the [issue 28551](https://github.com/matplotlib/matplotlib/issues/28551) of the Matplotlib repository. - {gh-pr}`237` Improvements of the Sphinx configuration. diff --git a/doc/License.md b/doc/License.md index 5edf197d..17d865fe 100644 --- a/doc/License.md +++ b/doc/License.md @@ -93,10 +93,26 @@ the license key from versioning by adding it to your `.gitignore` file. ## How to set an environment variable? If you are not sure how to set an environment variable, [this article](https://www.bitecode.dev/p/environment-variables-for-beginners) -has instructions for Windows, MacOS and Linux. The section [Persisting an environment variable](https://www.bitecode.dev/i/121864947/persisting-an-environment-variable) +has instructions for Windows, macOS and Linux. The section [Persisting an environment variable](https://www.bitecode.dev/i/121864947/persisting-an-environment-variable) explains how to make the environment variable persistent on your machine so that you don't have to set it every time you open a new terminal. +### For Google Colab users + +The "Secrets" feature in Google Colab is very useful for defining local variables. In the left panel, open the 'Secrets' section. Create a new variable called `ROSEAU_LOAD_FLOW_LICENSE_KEY`, with the value being your license key. This variable is personal to you, and the toggle will allow you to enable access to the license key for notebooks of your choice. + +```{image} /_static/2024_09_16_Google_Colab_Environment_Variable.png +:alt: Google Colab environment variable +:align: center +``` + +To set the environment variable, add the following in a cell at the beginning of your notebook: + +``` +from google.colab import userdata +os.environ['ROSEAU_LOAD_FLOW_LICENSE_KEY'] = userdata.get('ROSEAU_LOAD_FLOW_LICENSE_KEY') +``` + ### For Jupyter Notebook users If you are using a _Jupyter Notebook_, you can follow these instructions to set the environment diff --git a/doc/_static/2024_09_16_Google_Colab_Environment_Variable.png b/doc/_static/2024_09_16_Google_Colab_Environment_Variable.png new file mode 100644 index 00000000..b3ff0016 --- /dev/null +++ b/doc/_static/2024_09_16_Google_Colab_Environment_Variable.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d0a5e9a1f3daee0a3e8dc46ebe7aee5fc66bb6c1ba03381d03f972ddcc00d61 +size 77012