-
Notifications
You must be signed in to change notification settings - Fork 7
Intents docs #66
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
Open
ronpandolfi
wants to merge
3
commits into
master
Choose a base branch
from
multi-intents
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Intents docs #66
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,7 @@ Developer Documentation | |
| gui-plugin | ||
| entry-points | ||
| operation-plugin | ||
| intents | ||
| workflow | ||
| resources | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Intents Documentation | ||
|
|
||
| This documentation provides information on the use of Intents to annotate data, including how they're applied to `OperationPlugin`'s. | ||
|
|
||
| *If you are new to developing Xi-CAM operations, | ||
| it is recommended that you follow the [operations development guide](operation-plugin.md) first.* | ||
|
|
||
| For more general development resources, see the [Resources](resources.md) page. | ||
|
|
||
| ## What Is an Intent? | ||
|
|
||
| In Xi-CAM, an `Intent` generally represents a descriptive annotation of how to visualize data. | ||
| Basically, an `Intent` is a recipe for constructing a visualization. | ||
| When an `Intent` is associated with an operation, Xi-CAM may use it to automatically generate plots as you adjust your workflow. | ||
| An `Intent` can be embedded in a Databroker `BluesklyRun`, so they may be preserved along with derived (and also raw) data. | ||
|
|
||
| ### The Lifecycle of an Intent | ||
|
|
||
| A `GUIPlugin` that supports intents will contain a `CanvasManager`. | ||
| Active intents will be rendered into a `Canvas` owned by the `CanvasManager`. | ||
| When an `Intent` is activated, the manager may generate a new `Canvas` for its rendering. | ||
| In cases such as co-plotting, a pre-existing `Canvas` may be used; that choice is based on the corresponding intents' `match_key` attributes. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. provide example op of match_key |
||
|
|
||
| ## What Types of Intents are Available? | ||
|
|
||
| The list of intents is extensible via the `IntentPlugin`, however many use cases will fit into one of these generic types: | ||
|
|
||
| - PlotIntent | ||
| - ImageIntent | ||
| - ErrorBarIntent | ||
| - BarIntent | ||
|
|
||
| Although these types are primitive, additional specialized features can be added to them by specifying `mixin`'s. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is a mixin at a very high level? example of mixin |
||
|
|
||
| ## Adding Intents to Operations | ||
|
|
||
| The `@intent(...)` decorator can be used to annotate an `OperationPlugin` as shown: | ||
| ```eval_rst | ||
| .. autodecorator:: xicam.plugins.operationplugin.intent | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might need to explain what a canvas manager is? depends on how detailed we want the documentation to be here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate document for more advanced components