webinterface.pages.utils.module_registry module#
Module registry for discovering and loading ProteoBench module metadata.
This module dynamically imports all pages_variables files to extract module metadata for the sidebar navigation system and documentation main page.
- class webinterface.pages.utils.module_registry.ModuleMetadata(label: str, path: str, file_path: str, category: str, release_stage: str, keywords: List[str], title: str, doc_url: str, documentation_description: str = '', results_repo: str | None = None)[source]#
Bases:
objectMetadata for a ProteoBench module.
- webinterface.pages.utils.module_registry.filter_modules(modules_by_category: Dict[str, List[ModuleMetadata]], search_query: str) Dict[str, List[ModuleMetadata]][source]#
Filter modules based on search query matching keywords or title.
- Parameters:
modules_by_category (Dict[str, List[ModuleMetadata]]) – Dictionary of modules organized by category.
search_query (str) – Search query string (case-insensitive).
- Returns:
Filtered dictionary of modules matching the search query.
- Return type:
Dict[str, List[ModuleMetadata]]
- webinterface.pages.utils.module_registry.get_all_modules() Dict[str, List[ModuleMetadata]][source]#
Discover and load all module metadata from pages_variables.
Automatically discovers all *_variables.py files in the pages directory and loads their dataclass definitions without requiring manual mapping.
- Returns:
Dictionary mapping categories (“DDA”, “DIA”, “Archived”, “Debug”) to lists of ModuleMetadata.
- Return type:
Dict[str, List[ModuleMetadata]]
- webinterface.pages.utils.module_registry.is_debug_enabled() bool[source]#
Return whether local debug pages should be shown.
Debug pages (category
"Debug") are intended only for local development and must never appear on the public server. They are enabled by setting the environment variablePROTEOBENCH_DEBUG=1before launching Streamlit, which the production server does not set.- Returns:
True if
PROTEOBENCH_DEBUGequals"1", otherwise False.- Return type: