Skip to content

Refactor plugin configuration and startup with Pydantic Settings - #19

Merged
strohganoff merged 5 commits into
mainfrom
refactor/plugin-configuration-and-startup
Nov 6, 2026
Merged

strohganoff merged 5 commits into
mainfrom
refactor/plugin-configuration-and-startup

Conversation

@strohganoff

@strohganoff strohganoff commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Replace manual TOML configuration wrappers and Typer with Pydantic Settings, preserving Stream Deck's host launch flags. Startup passes one argument list to both settings models and separates CLI setup from manager execution.

  • Load [tool.streamdeck] from the working directory's pyproject.toml; --plugin-dir controls module imports only.
  • Allow repeated --action-scripts and --event-listener / --event-listener-modules options to replace their respective TOML lists. Exclude environment, dotenv, secrets, and constructor field sources.
  • Validate launch information through RegistrationInfo, exposing plugin.uuid as plugin_uuid; the manager stores that normalized dictionary.
  • Cache module discovery per settings instance, sharing listener/event-model scanning and removing cross-configuration accumulation.
  • Preserve help registration across Pydantic Settings versions and refresh the tracked configuration guide. README links only to included files.

Compatibility: removes PyProjectConfigs, ToolSection, and Typer completion flags; run_plugin now takes both validated settings models. Discovery follows module namespace insertion order. Pipe-syntax annotations use a conditional backport on Python 3.9.

Validation: PR CI at commit 8a7528e passes the Python 3.9–3.13 test matrix and distribution-build/metadata/installed-wheel checks. A clean local export also passed all 186 tests on Python 3.13.18. Live Stream Deck startup remains unverified.

@strohganoff
strohganoff merged commit 0003dd0 into main Nov 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant