Skip to content

Commit

Permalink
Merge pull request #121 from oda-hub/labelled-outputs
Browse files Browse the repository at this point in the history
labelled outputs
  • Loading branch information
burnout87 authored Jan 2, 2025
2 parents b254f03 + e164492 commit 55ee90d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions content/docs/guide-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,36 @@ if credentials_env:

A number of annotations, for the correspondent visualization over the mmoda frontend, are available:

* `oda:label`: to specify the title for the parameter
* `oda:description`: to specify a tooltip, displayed when we over, with the mouse, over the parameter itself
* `oda:label`: to specify the title for a parameter as well as for an output
* `oda:description`: to specify a tooltip, displayed when, with the mouse, we over the parameter or the output itself
* `oda:group`: to visually group together a set of parameters horizontally

In the example code below we add these additional metadata annotations:
In the example code below we add these additional metadata annotations, for three parameters:

```
param_1 = '' # http://odahub.io/ontology#String ; oda:label "First" ; oda:group "Group of parameters" ; oda:description "first"
param_2 = '' # http://odahub.io/ontology#String ; oda:label "Second" ; oda:group "Group of parameters" ; oda:description "second"
param_3 = '' # http://odahub.io/ontology#String ; oda:label "Third" ; oda:group "Group of parameters" ; oda:description "third"
```
```

Which, over the Mmoda interface, will result in the layout displayed in the image below:

![image](grouped_params.png)


Instead, in the snippet below, we add the same notations for three outputs (the `oda:group` annotation is not available for the output):

```
result = astroim # http://odahub.io/ontology#Image ; oda:description "restul test tooltip"
test_image = bin_image # http://odahub.io/ontology#ODAPictureProduct
test_long = test_long # http://odahub.io/ontology#String ; oda:label "Result" ; oda:description "test tooltip"
```

And those, over the Mmoda interface, will result in the following layout:


![image](labeled_outputs.png)

### How to upload a file to be used for the notebook execution

In order to define a file as one of the input notebook parameters, two possible annotations (from the MMODA [ontology](https://odahub.io/ontology/)) are available:
Expand Down
Binary file added content/docs/labeled_outputs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 55ee90d

Please sign in to comment.