Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
priscavdsluis committed Nov 7, 2023
1 parent b43aee5 commit 08fea01
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 33 deletions.
26 changes: 11 additions & 15 deletions docs/tutorials/dsd_2023/instructions.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</head>

<body class="stackedit">
<div class="stackedit__html"><h1 id="hydrolib-core-guide-for-delft-software-days-2023">HYDROLIB-core guide for Delft Software Days 2023</h1>
<div class="stackedit__html"><h1 id="hydrolib-core-guide-for-the-delft-software-days-2023">HYDROLIB-core guide for the Delft Software Days 2023</h1>
<h2 id="contents">Contents</h2>
<ul>
<li><a href="#hydrolib-core-guide-for-delft-software-days-2023">HYDROLIB-core guide for Delft Software Days 2023</a>
Expand Down Expand Up @@ -52,6 +52,8 @@ <h3 id="installation">Installation</h3>
<pre><code>conda create --name dsd_env python=3.11 git -c conda-forge -y
conda activate dsd_env
pip install hydromt_delft3dfm[examples] dfm_tools
pip install pyogrio
pip install openpyxl
conda deactivate
</code></pre>
<p>After executing these commands, an Anaconda environment with the latest HYDROLIB-core is created. After deactivation, you can reactivate this environment at any time by using the following command:</p>
Expand All @@ -62,22 +64,16 @@ <h3 id="installation">Installation</h3>
</code></pre>
<p>This will remove all the packages in the environment and the environment folder itself.</p>
<h3 id="run-the-demo-notebook">Run the demo notebook</h3>
<p>We’d like to be able to run the provided notebook. We can set it up with the following steps:</p>
<p>We’d like to be able to run the provided demo notebook. We can set it up with the following steps:</p>
<ol>
<li>Navigate to the <code>Modelbuilding_and_postprocessing-material\HYDROLIB-core</code> folder and go inside it</li>
<li>Open the command line interface in this location (for Windows: type <code>cmd</code> in the address bar and press Enter)</li>
<li>Call the following commands:</li>
<li>Open Visual Studio Code</li>
<li>Go to <em>File</em> &gt; <em>Open Folder…</em></li>
<li>Select the <em>HYDROLIB-core</em> folder</li>
<li>From the file explorer on the left, open the <em>demo.ipynb</em> inside the <em>demo</em> folder</li>
<li>On the top right, click on <em>Select Kernel</em> and then <em>Python Environments…</em></li>
<li>Select <em>dsd_env</em> from the drop-down list</li>
<li>Click on <em>Run all</em> to test if the notebook can be fully run</li>
</ol>
<pre><code>python -m ipykernel install --user --name=dsd_env
jupyter notebook
</code></pre>
<p>The first command makes sure that Jupyter can pick up on the created <code>dsd_env</code> environment.<br>
The second command opens Jupyter inside our work folder.</p>
<ol start="4">
<li>Once Jupyter has started, click on <code>demo.ipynb</code> inside the <code>demo</code> to open the notebook.</li>
<li>In the menubar, select <code>Kernel</code> &gt; <code>Change kernel</code> &gt; <code>dsd_env</code></li>
</ol>
<p>Now the environment that we are using for this notebook is the correct one.</p>
</div>
</body>

Expand Down
30 changes: 12 additions & 18 deletions docs/tutorials/dsd_2023/instructions.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# HYDROLIB-core guide for Delft Software Days 2023
# HYDROLIB-core guide for the Delft Software Days 2023

## Contents

- [HYDROLIB-core guide for Delft Software Days 2023](#hydrolib-core-guide-for-delft-software-days-2023)
- [HYDROLIB-core guide for the Delft Software Days 2023](#hydrolib-core-guide-for-the-delft-software-days-2023)
- [Contents](#contents)
- [Introduction](#introduction)
- [User guide](#user-guide)
Expand Down Expand Up @@ -40,6 +40,8 @@ Follow these steps:
conda create --name dsd_env python=3.11 git -c conda-forge -y
conda activate dsd_env
pip install hydromt_delft3dfm[examples] dfm_tools
pip install pyogrio
pip install openpyxl
conda deactivate
```

Expand All @@ -59,20 +61,12 @@ This will remove all the packages in the environment and the environment folder

### Run the demo notebook

We'd like to be able to run the provided notebook. We can set it up with the following steps:
We'd like to be able to run the provided demo notebook. We can set it up with the following steps:

1. Navigate to the `Modelbuilding_and_postprocessing-material\HYDROLIB-core` folder and go inside it
2. Open the command line interface in this location (for Windows: type `cmd` in the address bar and press Enter)
3. Call the following commands:
```
python -m ipykernel install --user --name=dsd_env
jupyter notebook
```

The first command makes sure that Jupyter can pick up on the created `dsd_env` environment.
The second command opens Jupyter inside our work folder.

4. Once Jupyter has started, click on `demo.ipynb` inside the `demo` to open the notebook.
5. In the menubar, select `Kernel` > `Change kernel` > `dsd_env`

Now the environment that we are using for this notebook is the correct one.
1. Open Visual Studio Code
2. Go to *File* > *Open Folder...*
3. Select the *HYDROLIB-core* folder
4. From the file explorer on the left, open the *demo.ipynb* inside the *demo* folder
5. On the top right, click on *Select Kernel* and then *Python Environments...*
6. Select *dsd_env* from the drop-down list
7. Click on *Run all* to test if the notebook can be fully run

0 comments on commit 08fea01

Please sign in to comment.