Opened 6 years ago

Closed 5 years ago

#2723 closed enhancement (fixed)

Lazy managers

Reported by: pett Owned by: pett
Priority: moderate Milestone:
Component: Tool Shed Version:
Keywords: Cc: Conrad Huang
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Would like the ability to start a manager later than ChimeraX startup, for managers that are not used often. For example, the Build Structure tool has various ways of starting a structure (single atom, PubChem ID, SMILES string, etc.) that I want to be extensible through the manager/provider mechanism, but would prefer not to have the Build Structure module executed every time ChimeraX starts simply because the module has a manager.

This implies that the Toolshed needs to support lazy managers. Also, notifying managers about new providers from newly loaded bundles was overlooked, and therefore the BundleAPI needs a find_manager() method so that the Toolshed can find the manager to notify.

Change History (5)

comment:1 by pett, 6 years ago

Component: UnassignedTool Shed

comment:2 by Greg Couch, 5 years ago

Cc: Conrad Huang added
Owner: changed from Conrad Huang to pett

Notifying managers from newly loaded bundles was done by Eric. Unclear if lazy managers are worth the work. A bundle's init.py can be structure so no additional modules are imported and minimize the overhead.

comment:3 by pett, 5 years ago

It's fine that you assigned it to me -- I intended to implement it myself now that I've worked with the toolshed code a little and understand it somewhat.

Importing nothing else in a managers init.py is frequently awkward/ugly because that's where the bundle's public API is, and where the manager will want to put classes and functions that providers need to use.

comment:4 by pett, 5 years ago

Status: assignedaccepted

comment:5 by pett, 5 years ago

Resolution: fixed
Status: acceptedclosed

A manager with the attribute autostart="false" is lazy.

Note: See TracTickets for help on using tickets.