Skip to content

Commit 5503091

Browse files
Plan UI usability (adding expedition.yaml guidance) (#277)
* remove duplicates and add thumbnail for surf tutorials * add tutorial doc on how to ineract with expedition.yaml * point to information on expedition.yaml in rest of docs * point to docs in yaml file * update yaml guidance thumbnail * use relative paths * fix thumbnails * remove duplicate note/tip * post review edits * Apply suggestions from code review Co-authored-by: Erik van Sebille <erikvansebille@gmail.com> * edits post code review --------- Co-authored-by: Erik van Sebille <erikvansebille@gmail.com>
1 parent 8c900a3 commit 5503091

7 files changed

Lines changed: 129 additions & 6 deletions

File tree

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
"user-guide/teacher-content/ILOs": "user-guide/_images/ILOs.jpg",
8181
"user-guide/teacher-content/UU-ocean-of-future/Tutorial1": "user-guide/_images/freepik_assignment.png",
8282
"user-guide/teacher-content/UU-ocean-of-future/Tutorial2": "user-guide/_images/freepik_assignment.png",
83+
"user-guide/tutorials/surf_collaborative_setup": "user-guide/_images/freepik_research_vessel.jpg",
84+
"user-guide/tutorials/surf_research_cloud_setup": "user-guide/_images/freepik_research_vessel.jpg",
85+
"user-guide/tutorials/working_with_expedition_yaml": "user-guide/_images/AnnaWeber.jpeg",
8386
}
8487

8588
sphinx_gallery_conf = {"default_thumb_file": "_static/virtual_ship_logo.png"}

docs/user-guide/assignments/Sail_the_ship.ipynb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@
156156
"\n",
157157
"The next step is to finalise the expedition schedule plan, including setting times and instrument selection choices for each waypoint, as well as configuring the ship (including any underway measurement instruments). \n",
158158
"\n",
159+
"<div class=\"alert alert-block alert-info\"> \n",
160+
"**NOTE**: This section describes the process of finalising the expedition schedule and instrument selection using the `virtualship plan` application. For expeditions with many waypoints, it can become cumbersome to use the planning tool (note, using VirtualShip in a remote terminal / cloud-based environment can also introduce lag in the user-interface). **In this case, you may prefer to edit the** `expedition.yaml` **file directly (see [here](../tutorials/working_with_expedition_yaml.md) for more details on how to do so)**.\n",
161+
"</div>\n",
162+
"\n",
163+
"\n",
159164
"The easiest way to do so is to use the bespoke VirtualShip planning tool. Enter the following command in Terminal: `virtualship plan EXPEDITION_NAME`.\n",
160165
"\n",
161166
"<div class=\"alert alert-block alert-success\"> \n",

docs/user-guide/quickstart.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ For advanced users: it is also possible to run the expedition initialisation ste
5858

5959
## 3) Expedition scheduling & ship configuration
6060

61+
```{important}
62+
This section describes the process of finalising the expedition schedule and instrument selection using the `virtualship plan` application. This is the recommended way for most users but when expeditions become larger with many waypoints, it can become cumbersome to use the planning tool (note, using VirtualShip in a remote terminal / cloud-based environment can also introduce lag in the user-interface). **In this case, you may prefer to edit the `expedition.yaml` file directly (see [here](./tutorials/working_with_expedition_yaml.md) for more details on how to do so)**.
63+
```
64+
6165
The next step is to finalise the expedition schedule plan, including setting times and instrument selection choices for each waypoint, as well as configuring the ship (such as its speed and underway measurement instruments). The easiest way to do so is to use the bespoke VirtualShip planning tool via the following command:
6266

6367
```
6468
virtualship plan EXPEDITION_NAME
6569
```
6670

67-
```{tip}
68-
Using the `virtualship plan` tool is optional. Advanced users can also edit the `expedition.yaml` file directly if preferred.
69-
```
70-
7171
The planning tool should look something like this and offers an intuitive way to make your selections:
7272

7373
![example_plan_app](example_plan_app.gif)

docs/user-guide/tutorials/index.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
maxdepth: 1
66
caption: Post-processing results
77
---
8-
surf_research_cloud_setup.ipynb
9-
surf_collaborative_setup.ipynb
108
ADCP_data_tutorial.ipynb
119
CTD_data_tutorial.ipynb
1210
Drifter_data_tutorial.ipynb
@@ -25,3 +23,11 @@ caption: SURF Research Cloud set up
2523
surf_research_cloud_setup.ipynb
2624
surf_collaborative_setup.ipynb
2725
```
26+
27+
```{nbgallery}
28+
---
29+
maxdepth: 1
30+
caption: Miscellaneous
31+
---
32+
working_with_expedition_yaml.md
33+
```
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
## Working with the `expedition.yaml` file
2+
3+
This tutorial will guide you through the structure of the `expedition.yaml` file and how to modify it.
4+
5+
The `expedition.yaml` file is ingested by `virtualship run` and is used to configure expeditions. It contains metadata and settings that define the parameters of an expedition, including information about ship speed, instrument configurations, waypoint timings and instrument selections.
6+
7+
This tutorial describes an alternative means to using the `virtualship plan` command, which provides a user-friendly interface for interacting with `expedition.yaml` but can become cumbersome for long, complex expeditions with many waypoints and instruments. Interacting with the `expedition.yaml` file directly tends to be faster for larger expeditions and experienced users.
8+
9+
### Editing the file
10+
11+
The `expedition.yaml` file can be opened and edited using any text editor that supports YAML format. Make your changes and save the file to write the changes to your expedition directory.
12+
13+
```{tip}
14+
The `expedition.yaml` file can also be opened and edited in Jupyter Lab environments using the built-in text editor. Simply navigate to the file in the file browser and (double) click to open it in a new tab.
15+
```
16+
17+
```{important}
18+
The `expedition.yaml` file is highly sensitive to indentation and formatting, so please ensure that you maintain the correct formatting (as described [below](#specifics-for-each-section)) when making modifications.
19+
```
20+
21+
### Structure
22+
23+
The `expedition.yaml` file is written in [YAML](https://en.wikipedia.org/wiki/YAML) format, which is a human-readable data serialization standard. Below is an annotated example of a simple `expedition.yaml` file with two waypoints:
24+
25+
```yaml
26+
# EXAMPLE EXPEDITION.YAML
27+
#
28+
schedule: # <-- 1. expedition schedule section
29+
waypoints:
30+
- instrument: # <-- Waypoint 1
31+
- CTD
32+
- CTD_BGC
33+
- ARGO_FLOAT
34+
- DRIFTER
35+
location:
36+
latitude: 45.604174
37+
longitude: -43.886739
38+
time: 1998-03-08 03:37:00
39+
- instrument: # <-- Waypoint 2
40+
- ARGO_FLOAT
41+
- DRIFTER
42+
- XBT
43+
location:
44+
latitude: 48.185988
45+
longitude: -32.988302
46+
time: 1998-03-10 03:05:00
47+
#
48+
instruments_config: # <-- 2. instrument configuration section
49+
adcp_config:
50+
num_bins: 40
51+
max_depth_meter: -1000.0
52+
period_minutes: 5.0
53+
ship_underwater_st_config:
54+
period_minutes: 5.0
55+
argo_float_config: ...
56+
ctd_bgc_config: ...
57+
ctd_config: ...
58+
drifter_config: ...
59+
xbt_config: ...
60+
#
61+
ship_config: # <-- 3. ship configuration section
62+
ship_speed_knots: 10.0
63+
```
64+
65+
```{note}
66+
In the example above, some instrument configuration parameters are replaced by ellipses (`...`) for brevity. In a real `expedition.yaml` file, these sections would contain detailed configuration settings for each instrument.
67+
```
68+
69+
### Specifics for each section
70+
71+
#### 1. `schedule`
72+
73+
This section contains a list of `waypoints` that define the expedition's route. Each waypoint includes:
74+
75+
- **Instruments (`instrument`)**: A list of instruments to be deployed at that waypoint. Add or remove instruments by adding or deleting entries on _new lines_. The instrument selection can also be left empty (i.e., no instruments deployed at that waypoint) by setting the parameter to: `instrument: null`.
76+
77+
```{tip}
78+
Full list of instruments supported for deployment at waypoints (case-sensitive): `CTD`, `CTD_BGC`, `DRIFTER`, `ARGO_FLOAT`, `XBT` (or `null`).
79+
```
80+
81+
- **Location (`location`)**: The geographical coordinates (latitude and longitude) of the waypoint. These must be in decimal degrees (DD) format and within valid ranges: latitude between -90 and 90, longitude between -180 and 180.
82+
83+
- **Time (`time`)**: The scheduled time for reaching the waypoint, specifically in YYYY-MM-DD HH:MM:SS format.
84+
85+
#### 2. `instruments_config`
86+
87+
This section defines the configuration settings for each instrument used in the expedition. Each instrument has its own subsection where specific parameters can be set.
88+
89+
Because **underway instruments** (e.g., ADCP, Ship Underwater ST) collect data continuously while the ship is moving, their deployment is not tied to specific waypoints. Instead, the presence of their configuration sections in `instruments_config` indicates that they will be active throughout the expedition. This means that if you wish to turn off an underway instrument, you can remove its configuration section or simply set it to `null`, for example:
90+
91+
```yaml
92+
instruments_config:
93+
adcp_config: null
94+
ship_underwater_st_config: null
95+
```
96+
97+
For **all other instruments**, e.g. CTD, ARGO_FLOAT etc., the parameters can often be left as the default values unless advanced customisations are required.
98+
99+
#### 3. `ship_config`
100+
101+
This section contains setting related to the ship itself, specifically:
102+
103+
- **Ship speed (`ship_speed_knots`)**: The speed of the ship in knots (nautical miles per hour; where 1 knot = 1.852 km/h). Note in most cases this should be left as the default value unless there is a specific reason to change it.
104+
105+
<!-- TODO: more details on ship configuration if added in the future -->

src/virtualship/static/expedition.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# see https://virtualship.readthedocs.io/en/latest/user-guide/tutorials/working_with_expedition_yaml.html for more details on how to edit this file
2+
#
13
schedule:
24
waypoints:
35
- instrument:

tests/expedition/expedition_dir/expedition.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# see https://virtualship.readthedocs.io/en/latest/user-guide/tutorials/working_with_expedition_yaml.html for more details on how to edit this file
2+
#
13
schedule:
24
waypoints:
35
- instrument:

0 commit comments

Comments
 (0)