Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #11434 (closed)

Opened 11 years ago

Closed 11 years ago

Bug: Duplicate scripts menu items

Reported by: wmoore Owned by: wmoore
Priority: blocker Milestone: OMERO-4.4.9
Component: Scripting Version: n.a.
Keywords: n.a. Cc: jburel, jamoore, hflynn
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

The menu-items in the scripts menu (both clients) are generated from the folders that contain scripts (independent on path).

So, omero/Analysis_Scripts/test.py and omero/<Another Institute>/Analysis_Scripts/script.py will generate two "Analysis_Scripts" menu items.

See e-mail from Alex Herbert

I have followed the instructions on installation provided by Josh:

forked omero-user-scripts to my github account (aherbert)
cd OMERO_DIST/lib/scripts
git clone git@github.com:aherbert/omero-user-scripts.git test

I then put a script into test/util_scripts. This is picked up by the OMERO client but it shows as a different directory (see attached image). (I am using version 4.4.6)

If several contributors follow this model then the OMERO client will become cluttered with duplicate directories in the drop-down menu.

This could be solved by creating the scripts in the same directories as those used by the core OMERO install. This will dirty the vanilla install and prevent a clean approach to cloning a contributors scripts. Using a separate directory per contributor allows the easy removal of a contributors scripts by deleting their 'omero-user-scripts' directory or selected unwanted scripts from their directory structure.

To preserve the use of a separate 'omero-user-scripts' directory for each contributor the OMERO client will need updating to build a composite scripts drop-down menu. Currently the menu is built using the name of the parent directory containing the script. If two directories have the same name then two menu entries are created (as in the attached image). The menu could be created by merging all entries with the same directory name. This may cause name clashes for the script. These could be resolved using a number suffix:

/omero/util_scripts/Images_From_ROIs.py
/test/util_scripts/Images_From_ROIs.py

Becomes:

util_scripts/Images_From_ROIs
util_scripts/Images_From_ROIs (2)

The scripts could be further identified using the path name in the tooltip. Currently the tooltip displays just the script name. It could be altered to display the full script path (or a variant thereof), e.g:

util_scripts/Images_From_ROIs => [omero/util_scripts] Images_From_ROIs.py
util_scripts/ Images_From_ROIs (2) => [test/util_scripts] Images_From_ROIs.py

Change History (2)

comment:1 Changed 11 years ago by wmoore

Discussed today with JM & Josh - decided that we need to support arbitrary hierarchy levels of scripts in the menu.
Will implement a view of single list that switches to sub-menu list on click of dir. E.g. like github hierarchy browser.

comment:2 Changed 11 years ago by wmoore

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.64347 sec.)

We're Hiring!