gwsumm.tabs.registry module

Registry for GWSumm data tabs.

All Tabs should be registered for easy identification from the configuration INI files

gwsumm.tabs.registry.get_tab(name)[source]

Query the registry for the tab class registered to the given name

gwsumm.tabs.registry.register_tab(tab, name=None, force=False)[source]

Register a new summary Tab to the given name

Parameters:
tabtype

defining Class for this tab type.

namestr, optional

unique descriptive name for this type of tab, must not contain any spaces, e.g. ‘hveto’. If name=None, the Tab.type class attribute of the given tab will be used.

forcebool

overwrite existing registration for this type

Raises:
ValueError

if name is already registered and force not given as True