Skip to content

Commit

Permalink
GROK-17011: Wiki: Compute: Finished advanced scripting refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
GennadiyZakharov committed Nov 23, 2024
1 parent d5fd561 commit 52edeb1
Show file tree
Hide file tree
Showing 23 changed files with 918 additions and 1,124 deletions.
5 changes: 3 additions & 2 deletions help/compute/compute.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ category, description, input type (slider/combo box/etc), and others are also ta
The simple examples are available in the
[scripting](scripting/getting-started.md) tutorial.

The [RichFunctionView](scripting/advanced-scripting/advanced-scripting.mdx#enabling-richfunctionview-ui-editor)
The
[RichFunctionView](scripting/advanced-scripting/rich-function-view.md#enabling-richfunctionview-ui-editor)
editor allows you to create complex UI with parameter tabs and groups just by adding annotation comments.

The following picture demonstrates a working PK/PD model implemented in R with the autogenerated UI (look at the script
Expand Down Expand Up @@ -223,7 +224,7 @@ publish [packages](../develop/develop.md#packages) that contain models directly

### Environment

Model scripts could specify the required [environment](scripting/under-the-hood.mdx#environment-isolation),
Model scripts could specify the required [environment](scripting/advanced-scripting/under-the-hood.mdx#environment-isolation),
such as libraries used, their
versions, versions of the language interpreter, etc. We use
Conda environments for `Python`, and
Expand Down
2 changes: 1 addition & 1 deletion help/compute/jupyter-notebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Optionally: R, Julia and JavaScript.
## Environments

Each script can be run in an isolated environment, with predefined packages configuration, same as for
[Script Environments](scripting/under-the-hood.mdx#environment-isolation). The environment can be specified in the notebook properties.
[Script Environments](scripting/advanced-scripting/under-the-hood.mdx#environment-isolation). The environment can be specified in the notebook properties.

## Importing notebooks

Expand Down
107 changes: 0 additions & 107 deletions help/compute/scripting/advanced-scripting/adding-input-viewers.mdx

This file was deleted.

68 changes: 0 additions & 68 deletions help/compute/scripting/advanced-scripting/adding-readme.mdx

This file was deleted.

83 changes: 9 additions & 74 deletions help/compute/scripting/advanced-scripting/advanced-scripting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,84 +9,19 @@ import TabItem from '@theme/TabItem';
import BrowserWindow from '@site/src/components/browser-window';
```

Use **RichFunctionView** as an advanced UI editor to create a complex full-featured interface for your script.
This section contains advanced options for script development.

It has all the features of the [basic scripting](../scripting-features/scripting-features.md). In addition, it allows you to:
* Using the [Rich Function View](./rich-function-view.md) UI editor,
you can create a complex full-featured interface for your script.
* You can [convert your script to a package fucntion](./convert-script-to-package-function.mdx),
and [share Python and R environments across scripts](./share-envs.mdx).
* Some details regarding default script environments are given in the section
[Under the hood](./under-the-hood.mdx).
* Advanced integration options allow you to
[call your script via REST](./call-via-rest.md) or [embed is as iFrame](./embed-as-iframe.mdx),

Enhance inputs & outputs:
- [Fold input categories](folded-categories.mdx)
- [Add complex validations](validating-inputs.mdx)
- [Use custom inputs](customize-inputs.mdx)
- [Visualize input dataframes](adding-input-viewers.mdx)
- [Group outputs](grouping-outputs.mdx)

Review historical script runs:
- [Save and access run history](review-history.mdx)
- [Compare historical runs](compare-history.mdx)
- [Customize comparison](customize-comparison.mdx)

Upload external data:
- [Upload data](upload-experimental-data.mdx)
- [Customize data upload](customize-data-upload.mdx)

Provide custom docs and export:
- [Automatic script rerun](automatic-rerun.mdx)
- [Export results](exporting-to-file.mdx) of script results.
- [Add readme files](adding-readme.mdx)

:::tip Ensure computations are correct

Use the RichFunctionView only when you are sure that the script works as expected.
Features of the RichFunctionView affect GUI only and do not affect computations.

:::

## Enabling RichFunctionView UI editor

To enable **RichFunctionView**, add `editor: Compute:RichFunctionViewEditor` tag
to your following code as it is shown:

```mdx-code-block
<Tabs>
<TabItem value="result" label="Result" default>
```

```mdx-code-block
<BrowserWindow bodyStyle={{'padding': '0px'}} url=''>
```

<img src={require('../_pics/rich-function-demo.gif').default} style={{'border-radius': '5px'}}/>

```mdx-code-block
</BrowserWindow>
```

```mdx-code-block
</TabItem>
<TabItem value="python" label="Python / R / Octave / Julia">
```

```python title="Your script header"
#editor: Compute:RichFunctionViewEditor
```

```mdx-code-block
</TabItem>
<TabItem value="js" label="Javascript / NodeJS">
```

```javascript title="Your script header"
//editor: Compute:RichFunctionViewEditor
```

```mdx-code-block
</TabItem>
</Tabs>
```

:::caution Package dependency

The `RichFunctionViewEditor` is a part of the `Compute` package.
Ensure that the `Compute` package is installed before working with `RichFunctionViewEditor`

:::
92 changes: 0 additions & 92 deletions help/compute/scripting/advanced-scripting/analyze-sensitivity.mdx

This file was deleted.

Loading

0 comments on commit 52edeb1

Please sign in to comment.