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.

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, results_repo: str | None = None)[source]#

Bases: object

Metadata for a ProteoBench module.

category: str#
doc_url: str#
file_path: str#
keywords: List[str]#
label: str#
path: str#
release_stage: str#
results_repo: str | None = None#
title: str#
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”) to lists of ModuleMetadata.

Return type:

Dict[str, List[ModuleMetadata]]