Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update template for monolithic operator pages #4

Merged
merged 5 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions filter.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
apiRules:
- exclude:
hasAttribute:
uid: System.ObsoleteAttribute
- exclude:
uidRegex: OpenEphys.Onix.DeviceNameConverter
- exclude:
uidRegex: OpenEphys.Onix.SingleDeviceFactory
- exclude:
uidRegex: OpenEphys.Onix.ManagedFrame
- exclude:
uidRegex: OpenEphys.Onix.DeviceContext
- exclude:
uidRegex: ^.*DeviceFactory
- exclude:
uidRegex: OpenEphys.Onix.ConfigureFmcLinkController
- exclude:
uidRegex: OpenEphys.Onix.ConfigureDS90UB9x
uid: System.ObsoleteAttribute
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion src/onix-bonsai-onix1
216 changes: 178 additions & 38 deletions template/ManagedReference.extension.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion template/ManagedReference.html.primary.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

{{>partials/class}}

{{>partials/enum}}
{{>partials/enum}}
177 changes: 0 additions & 177 deletions template/partials/class.methods.tmpl.partial

This file was deleted.

74 changes: 26 additions & 48 deletions template/partials/class.tmpl.partial
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,20 @@
{{/oe.operatorType}}
</div>

{{{oe.description}}}
{{#oe.device}}

<div class = "alert alert-danger">
This operator is a device operator. If you are using Open Ephys hardware, use an aggregate operator that corresponds to your particular headstage(s) instead. Aggregate operators confer the following benefits:
<ul style = "margin-bottom: 0">
<li>The <code>address</code> properties of aggregate operators are automatically configured whereas a device operators requires manual configuration of its <code>address</code> property. This improves ease of using Open Ephys hardware.</li>
<li>All devices that belong to a hub (which is a collection of devices i.e. a headstage or breakout board) are automatically included, excluding the possibility of omitting configuration of a device that belongs to a hub. This improves ease of using Open Ephys hardware.</li>
<li>The workflow is less cluttered with configuration operators as one aggregate operator can correspond to multiple device operators. This improves workflow readability.</li>
</ul>
</div>

{{/oe.device}}

<div>{{{oe.description}}}</div>

{{#showWorkflow}}
<div class="workflow"><p><img src="../workflows/operators/{{name.0.value}}.bonsai" alt="{{name.0.value}} Workflow"></p></div>
Expand All @@ -22,48 +35,35 @@

<h2>Inputs & Outputs</h2>

{{>partials/class.methods}}
{{>partials/diagram}}

{{/oe.operatorType}}

{{#oe.hasSubOperators}}

<h2>Properties</h2>

<div>{{name.0.value}} is a aggregate operator. It comprises of the following sub-operators: </div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are good, we should probably take this wording and apply it to the User Guide pages too

<br>

{{#oe.subOperators}}

<h3>{{{object}}}</h3>

<div>{{{object}}} is a {{{type}}} operator encapsulated by the {{name.0.value}} operator.</div>

{{#hasSubProperties}}

<table>

<tr>
<th>Property</th>
<th style = "white-space: nowrap;">Property</th>
<th style = "white-space: nowrap;">Type</th>
<th>Description</th>
</tr>

{{#subProperties}}

<tr>
<td>
<code>
{{{name}}}
</code>
</td>
<td>
{{{description}}}
{{#hasEnum}}
<dl style="margin-top: 1rem; margin-bottom: 0rem; display: grid; grid-template-columns: max-content auto;">
{{#enum}}
<dt style="grid-column-start: 1;"><code>{{{field&value}}}</code></dt>
<dd style="grid-column-start: 2; margin-bottom: 0rem;">{{{description}}}</dd>
{{/enum}}
</dl>
{{/hasEnum}}
</td>
</tr>

{{>partials/propertyTables}}
{{/subProperties}}

</table>
Expand All @@ -89,35 +89,13 @@
<table>

<tr>
<th>Property</th>
<th>Type</th>
<th style = "white-space: nowrap;">Property</th>
<th style = "white-space: nowrap;">Type</th>
<th>Description</th>
</tr>

{{#oe.properties}}

<tr>
<td>
<code>
{{{name}}}
</code>
</td>
<td>
{{{type}}}
</td>
<td>
{{{description}}}
{{#hasEnum}}
<dl style="margin-top: 1rem; margin-bottom: 0rem; display: grid; grid-template-columns: max-content auto;">
{{#enum}}
<dt style="grid-column-start: 1;"><code>{{{field&value}}}</code></dt>
<dd style="grid-column-start: 2; margin-bottom: 0rem;">{{{description}}}</dd>
{{/enum}}
</dl>
{{/hasEnum}}
</td>
</tr>

{{>partials/propertyTables}}
{{/oe.properties}}

</table>
Expand Down
2 changes: 1 addition & 1 deletion template/partials/device.visualize_mat.tmpl.partial
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p>To view nodes that output a <strong>CV.Mat</strong> data type, use a <code>MatVisualizer</code>. To enable visualization of the node, double-click it while the workflow is running, or right-click on it while the workflow is not running and choose <strong>Show Visualizer => Bonsai.Dsp.Design.MatVisualizer</strong>. The <code>MatVisualizer</code> can be found in the <code>Bonsai.Dsp.Design</code> package.</p>
<p>To view operators that output a <strong>CV.Mat</strong> data type, use a <code>MatVisualizer</code>. To enable visualization of the operator, double-click it while the workflow is running, or right-click on it while the workflow is not running and choose <strong>Show Visualizer => Bonsai.Dsp.Design.MatVisualizer</strong>. The <code>MatVisualizer</code> can be found in the <code>Bonsai.Dsp.Design</code> package.</p>
2 changes: 1 addition & 1 deletion template/partials/device.visualize_text.tmpl.partial
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p>The output of these nodes can be inspected using the <code>ObjectTextVisualizer</code>. To enable visualization of the node, double-click it while the workflow is running, or right-click on it while the workflow is not running and choose <strong>Show Visualizer => Bonsai.Design.ObjectTextVisualizer</strong>.</p>
<p>The output of these operators can be inspected using the <code>ObjectTextVisualizer</code>. To enable visualization of the operator, double-click it while the workflow is running, or right-click on it while the workflow is not running and choose <strong>Show Visualizer => Bonsai.Design.ObjectTextVisualizer</strong>.</p>
2 changes: 1 addition & 1 deletion template/partials/device.visualize_timeseries.tmpl.partial
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p>Nodes with a single data stream can be plotted using a <code>TimeSeriesVisualizer</code>. To enable visualization of the node, double-click it while the workflow is running, or right-click on it while the workflow is not running and choose <strong>Show Visualizer => Bonsai.Design.Visualizers.TimeSeriesVisualizer</strong>. The <code>TimeSeriesVisualizer</code> can be found in the <code>Bonsai.Design.Visualizers</code> package.</p>
<p>operators with a single data stream can be plotted using a <code>TimeSeriesVisualizer</code>. To enable visualization of the operator, double-click it while the workflow is running, or right-click on it while the workflow is not running and choose <strong>Show Visualizer => Bonsai.Design.Visualizers.TimeSeriesVisualizer</strong>. The <code>TimeSeriesVisualizer</code> can be found in the <code>Bonsai.Design.Visualizers</code> package.</p>
Loading