Repository navigation
[Extensions] Add external extension ecosystem - #127
Conversation
[EEGBrowser] Implement eegplot browser foundation
Implement EEGBrowser Phase 2 UI shell
…nto phase/eegbrowser-3-marking # Conflicts: # src/eegprep/functions/guifunc/eegbrowser.py # src/eegprep/functions/sigprocfunc/eegplot.py # tests/test_eegplot.py
[EEGBrowser] Add marking and rejection callbacks
Implement pop_eegplot menu session workflows
[EEGBrowser] Integrate rejection workflows
Implement advanced EEGBrowser display modes
Add extension SDK registry
[Extensions] Integrate runtime contributions
Add extension governance validation tooling
# Conflicts: # docs/source/api/extensions.rst # src/eegprep/__init__.py # src/eegprep/functions/adminfunc/plugin_menu.py # tests/test_package_exports.py
# Conflicts: # docs/source/api/extensions.rst
# Conflicts: # docs/source/user_guide/extensions.rst # docs/source/user_guide/index.rst
Harden extension closeout coverage
|
Claude finished @suraj-ranganath's task in 8m 12s —— View job Code review — PR #127 (extension ecosystem)Reviewed the extension-specific scope (
The SDK, registry, declarative-menu insertion, packaged-help routing ( Blocking
Both bugs live in core dispatch ( Important
Nits
Test gaps
EEGLAB parity notes
|
|
🤖 Detailed epic specification and closeout notes for #127. Stacking note This PR targets origin/develop but is stacked on the EEGBrowser epic branch. Please merge or retarget after #111 lands; until then, the full diff against develop includes both the already-reviewed EEGBrowser stack and the isolated extension ecosystem delta. The extension-only delta is feature/eegbrowser-completion...feature/eegprep-extension-completion: 66 files, 8975 insertions, 168 deletions. Parent epic Fixes #112, Epic: Build EEGPrep external extension ecosystem. Constituent phase issues Phase 1, #113: Extension SDK, registry, discovery, and compatibility contract. Added the public extension SDK in src/eegprep/extensions.py: ExtensionSpec, ExtensionAction, ExtensionPopFunction, ExtensionMenu, ExtensionResource, LazyImport, ExtensionDependency, ExtensionRegistry, validation helpers, status/source enums, duplicate contribution detection, failed-import isolation, disabled/incompatible/missing-dependency states, and entry-point discovery through eegprep.extensions. Phase 2, #114: Runtime integration for menus, actions, help, console, history, and bundled plugins. Added src/eegprep/extension_runtime.py and integrated registered extensions with the main menu tree, MenuActionDispatcher, pophelp, EEGPrepMainWindow, eegprep-console, and EEGPrepSession history/command echo behavior. Bundled plugin surfaces now share the same extension record model as external packages while still supporting --no-plugins. Phase 3, #115: Extension Manager UX, curated catalog metadata, and safe install guidance. Expanded plugin_menu into the EEGPrep Extension Manager. It lists bundled, installed, curated-only, disabled, incompatible, missing-dependency, invalid, unknown, and failed extensions; shows details, errors, catalog conflicts, trust warnings, copyable uv/pip install/update commands, and never downloads, installs, updates, removes, or unzips code. Phase 4, #116: Researcher authoring toolkit, template package, examples, and scaffolding. Added examples/extensions with a reusable template package, file I/O, GUI dialog, optional dependency, browser/plot, and signal-transform examples. Added extension author checklist and tests that show how to register menus, pop_* functions, help resources, sample data, package resources, and pyproject entry points. Phase 4b, #119: Extension docs, trust levels, and agent skill. Added docs/source/user_guide/extensions.rst, docs/source/user_guide/extension_curation.rst, docs/source/api/extensions.rst, and the .agents/skills/eegprep-extension-development skill. The docs explain PyPI, GitHub, editable local, and private-index install paths; required extension format; trust levels; package-resource rules; console/history expectations; and the curated catalog process. Phase 5, #117: Governance, security, catalog validation, compatibility policy, and extension test harness. Added src/eegprep/extension_catalog.py, tools/validate_extension_catalog.py, the eegprep-validate-extension-catalog CLI entry point, ExtensionTestHarness, catalog validation reports, curated metadata checks, package/entry-point verification, import checks, archive rejection, version compatibility policy, and trust-boundary messaging. Phase 6, #118: Cross-platform hardening, performance, integration QA, and epic closeout. Added cross-platform-style tests for paths with spaces, real dist-info entry-point discovery, no-plugin startup safety, lazy startup checks, public API exports, package resource behavior, manager rendering, catalog validator CLI, and closeout docs. Final cleanup kept import eegprep lightweight and ensured extension entry points are not loaded at import time. What this enables Researchers can now build EEGPrep extensions as normal Python packages instead of asking maintainers to manually host or add zip submissions. Extensions can be distributed through PyPI, GitHub, editable local installs, private package indexes, or private lab repositories, then discovered in the same environment through Python entry points. Extensions can declaratively contribute menu actions, pop_* functions, packaged help, package data, capabilities, dependencies, and compatibility metadata. GUI users see menu contributions automatically; console users get registered pop_* functions in eegprep-console with the same EEGPrepSession synchronization behavior as core pop_* functions. One broken extension no longer has to break EEGPrep startup. Failed imports, invalid specs, missing dependencies, incompatible versions, disabled extensions, and catalog conflicts are visible in the Extension Manager and logs without becoming active runtime contributions. The Extension Manager gives users safe copyable install/update guidance but deliberately does not execute package-manager commands. This keeps the trust boundary explicit: installing Python packages executes third-party code, so EEGPrep provides metadata and guidance rather than downloading arbitrary zips or running untrusted installs. Core implementation surfaces src/eegprep/extensions.py defines the extension SDK and registry. The registry imports only lightweight entry-point registration functions, validates ExtensionSpec objects, checks dependencies/resources/compatibility, marks duplicate contributions invalid, and keeps LazyImport targets unloaded until the user invokes an action. src/eegprep/extension_runtime.py turns active records into menu contributions, action/pop-function lookup maps, help resources, and console resolvers. Menu insertion preserves existing EEGPrep menu order and anchors while logging missing paths rather than crashing. src/eegprep/functions/adminfunc/plugin_menu.py provides the headless and Qt Extension Manager surfaces. It merges installed registry records with curated catalog metadata and exposes the same inventory through plugin_menu(show=False), format_plugin_menu(), and File > Manage EEGPrep extensions. src/eegprep/functions/guifunc/menu_actions.py dispatches extension actions through the same session/history path as core GUI actions. It supports command-only results, EEG-only results, (EEG, com), and (ALLEEG, EEG, CURRENTSET, com) result shapes. src/eegprep/functions/adminfunc/console.py binds extension pop_* functions into the synchronized console namespace. Bare console calls and assigned calls both update EEG/ALLEEG/CURRENTSET/LASTCOM/ALLCOM consistently through EEGPrepSession. src/eegprep/functions/guifunc/pophelp.py resolves packaged extension help resources before failing clearly. Runtime code does not fall back to src/eegprep/eeglab for extension help. src/eegprep/extension_catalog.py defines metadata-only catalog loading, safe command generation, compatibility checks, and catalog validation. The packaged catalog is intentionally empty at launch but the schema and validator are ready for curated entries. Tests and evidence Focused extension suite run on this branch: uv run --no-sync pytest tests/test_extension_integration.py tests/test_extension_runtime.py tests/test_extension_catalog.py tests/test_extension_testing.py tests/test_extension_authoring_toolkit.py tests/test_extension_docs.py tests/test_plugin_menu.py tests/test_package_exports.py tests/test_extensions.py Result: 110 passed. Static and type checks run: uv run --no-sync ruff check . Results: all passed. Catalog validator smoke run: uv run --no-sync eegprep-validate-extension-catalog src/eegprep/resources/extension_catalog.json --json Result: ok true, no errors, no warnings. Manual sanity check confirmed bundled registry discovery, ExtensionRuntime menu contribution preparation, and headless Extension Manager inventory. The Extension Manager Qt surface is covered by tests/test_plugin_menu.py using an offscreen QDialog render path. Review status A regular github-pr-review-style pass found no validated actionable issues in the extension delta. The earlier OC autoreview helper could not complete due to a local Codex CLI service_tier configuration issue, not an EEGPrep code failure; after that, the requested regular review was completed with the checks above. Known review note Because this branch is stacked on #111, reviewers should avoid treating the EEGBrowser files in the full develop diff as new extension-epic work. Review the extension delta after #111 merges, or compare against origin/feature/eegbrowser-completion for the isolated scope. |
|
🤖 GUI evidence for the extension epic. The only new GUI surface in the isolated extension delta is the EEGPrep Extension Manager from Phase 3 (#124). That phase included this visual QA artifact: This is not committed on the final epic branch; it is linked here as review evidence. The final branch also keeps automated Qt coverage for the manager in tests/test_plugin_menu.py. |

Add external extension SDK, entry-point discovery, runtime menu/help/console integration, Extension Manager/catalog UX, authoring examples, governance validation, and closeout hardening. Stacked on the previous EEGBrowser epic PR #111; review after that merges.
Fixes #112