Task #1858 (closed)
Opened 14 years ago
Closed 14 years ago
Encourage script writer style
Reported by: | jamoore | Owned by: | wmoore |
---|---|---|---|
Priority: | major | Milestone: | OMERO-Beta4.2 |
Component: | n.a. | Version: | n.a. |
Keywords: | n.a. | Cc: | dzmacdonald, jburel, jamoore |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2010-05-27 (10) |
Description (last modified by wmoore)
For lists and map parameters, the UI has no way of knowing the type of object expected and can only populate with strings. Then the script has to convert to Int, Image_ID, Color etc. This is OK, but would be nicer if the client could know what is expected, and not leave type-checking to the client.
Standard ways for:
- Script description should be one or two lines of text. Will be displayed as a tool tip in Insight's scripts menu. Also displayed in the script dialog - where any url will be 'clickable' - so can be used for more info on what the script does etc.
- defining parameters, Human readable form e.g. thumbnailSize should probably displayed as "thumbnail Size".
- Enumeration. Human readable e.g. MAXIMUMINTENSITY.
- defining related parameters. e.g. need a list of ids either dataset or image. Better to have a parameter: id, and a parameter type with 2 values available dataset and image
- How to handle result: unify the name of the parameters and what do to with the result e.g. fileAnnotation indicates that a file annotation has been created and can possibility be annotated.
- Clear parameters to determine the target e.g. Image, Dataset, etc. So we can remove script from the display depending on the selected objects. This will only be possible if the loading of the parameters is quick enough. Should they be cached as soon as they are uploaded or installed?
- Need to handle Units e.g. scale bar size in microns
- Good practice: add the type of object expected for list or map
e.g. better to say RList<RSting>, RList<RInt> so the client can
display the correct field in the first case a text field, in the second case a text field accepting only numerical value
- It will be nice to identify the target of a script e.g. datasets. Most of the scripts will work at the images level but will be nice to know if the script works at the dataset level.
This should probably be done at the top level i.e. not need to parse the parameters to know that. NOT TOP PRIORITY
Suggestions:
- Parameters name and enumeration. Use "_". If we go back to our example: use Thumbnail_Size, display Thumbnail Size (client will handle the transformation). For the Enumeration, Maximum_Intensity => Maximum Intensity
- Results: See Insight 1385
Change History (28)
comment:1 Changed 14 years ago by jmoore
- Milestone changed from Unscheduled to OMERO-Beta4.2
- Remaining Time changed from 2 to 1
comment:2 Changed 14 years ago by jmoore
- Owner jmoore deleted
comment:3 Changed 14 years ago by cxallan
- Owner set to cxallan
comment:4 Changed 14 years ago by wmoore
- Cc dzmacdonald jburel added
- Description modified (diff)
- Owner changed from cxallan to wmoore
- Priority changed from minor to major
- Sprint set to 2010-04-30 (8)
comment:5 Changed 14 years ago by jburel
- Description modified (diff)
comment:6 Changed 14 years ago by jburel
- Status changed from new to assigned
comment:7 Changed 14 years ago by jburel
- Description modified (diff)
comment:8 Changed 14 years ago by jburel
- Description modified (diff)
comment:9 Changed 14 years ago by wmoore
- Description modified (diff)
comment:10 Changed 14 years ago by wmoore
comment:11 Changed 14 years ago by wmoore
- Description modified (diff)
comment:12 Changed 14 years ago by jburel
- Description modified (diff)
comment:13 Changed 14 years ago by wmoore
comment:14 Changed 14 years ago by jmoore
Notes from May 6th chat (Donald, Jean-Marie, Josh, Will)
Script Style - unify how we handle parameters (UI on the fly) - "A_B" rather than "aB" - Using list of IObject? Yes. - enumerations with actions? -- DOWNLOAD, VIEW, ... possibly something like "CREATED" / "UPDATED" -- OTHER (key-value pair) -- VIEW: popping up image viewer in client -- need explanation of all of these - convention -- return rstring "status_message" -- possibly not enough time for UI - grouping -- scale bar (on/off, width, etc.) -- notifications within the UI -- Group param? too complicated -- Dot notation? How to turn them off? -- Summary: using dot notation for lexicographical sorting --- will add a service in a later version
comment:15 Changed 14 years ago by jburel
- Description modified (diff)
comment:16 Changed 14 years ago by jburel
- Cc jmoore added
- Description modified (diff)
comment:17 Changed 14 years ago by jmoore
comment:18 Changed 14 years ago by jmoore
comment:19 Changed 14 years ago by jmoore
comment:20 Changed 14 years ago by jmoore
comment:21 Changed 14 years ago by jburel
- Description modified (diff)
comment:22 Changed 14 years ago by wmoore
- Description modified (diff)
comment:23 Changed 14 years ago by wmoore
- Description modified (diff)
comment:24 Changed 14 years ago by wmoore
comment:25 Changed 14 years ago by jmoore
comment:26 Changed 14 years ago by jmoore
- Sprint changed from 2010-04-30 (8) to 2010-05-13 (9)
comment:27 Changed 14 years ago by cxallan
- Sprint changed from 2010-05-13 (9) to 2010-05-27 (10)
comment:28 Changed 14 years ago by wmoore
- Remaining Time changed from 1 to 0
- Resolution set to fixed
- Status changed from assigned to closed
(In [6868]) Starting to adopt script-writing style. See #1858