This repository was archived by the owner on Mar 2, 2026. It is now read-only.
Add indicators plugin structure, tasks.yml and devcontainer setup#3
Open
Add indicators plugin structure, tasks.yml and devcontainer setup#3
Conversation
Brucesquared2
approved these changes
Oct 17, 2025
Brucesquared2
approved these changes
Oct 17, 2025
Co-authored-by: Brucesquared2 <192056090+Brucesquared2@users.noreply.github.com>
Brucesquared2
approved these changes
Oct 17, 2025
Co-authored-by: Brucesquared2 <192056090+Brucesquared2@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add plugin-style indicators structure and devcontainer setup
Add indicators plugin structure, tasks.yml and devcontainer setup
Oct 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds a plugin-style architecture for indicators (CLIME and Vortex) that can be dynamically loaded and executed via the existing FastAPI wrapper. The implementation enables easy integration of new indicators without modifying core application code.
What's New
Plugin Architecture
Created a new
src/indicators/package structure that allows indicators to be added as self-contained plugins:Each plugin exposes a
*_run(params: dict) -> dictfunction that:{"symbol": "BTCUSDT", "window": 14})Task Mapping System
Added
tasks.ymlat the repo root to map short task names to plugin callables:This enables simple, memorable endpoint names like
/run/vortexinstead of requiring full module paths in API calls.FastAPI Integration
Extended
app/main.pyto support the new task mapping system while preserving existingMDPS_ENTRYPOINTfunctionality:POST /run/{task_name}- Execute a named task from tasks.ymlPOST /run- Execute the default MDPS_ENTRYPOINT callableGET /status/{job_id}- Check job execution statusThe FastAPI wrapper automatically loads tasks.yml at startup and dynamically imports the specified callables, ensuring no code duplication and maintaining separation of concerns.
DevContainer Support
Added
.devcontainer/devcontainer.jsonwith a comprehensivepostCreateCommandthat:This enables one-click development environment setup in VS Code.
Package Structure
Updated
setup.pyto properly support thesrc/package layout:Example Usage
Starting the API
pip install -r requirements.txt -r requirements-api.txt pip install -e . uvicorn app.main:app --host 0.0.0.0 --port 8000Calling the Vortex Plugin
Response:
{ "job_id": "abc-123-...", "status_url": "/status/abc-123-..." }Checking Job Status
curl "http://localhost:8000/status/abc-123-..."Response:
{ "job_id": "abc-123-...", "status": "completed", "result": { "job": "vortex", "symbol": "BTCUSDT", "signals": [{"timestamp": 0, "signal": "hold"}], "metrics": {"window": 14, "symbol": "BTCUSDT"} } }Testing
All functionality has been tested and verified:
.gitignoreconfigured properly)Files Changed
Added:
tasks.yml- Task name to callable mappingsrc/indicators/vortex/vortex.py- Vortex indicator placeholdersrc/indicators/vortex/__init__.py- Vortex package initializationsrc/indicators/clime/clime.py- CLIME algorithm placeholdersrc/indicators/clime/__init__.py- CLIME package initializationsrc/indicators/__init__.py- Indicators package initializationsrc/indicators/README.md- Plugin structure documentationapp/main.py- FastAPI application with task routingrequirements-api.txt- API dependencies (FastAPI, Uvicorn, Pydantic, PyYAML).devcontainer/devcontainer.json- DevContainer configuration.gitignore- Ignore rules for build artifacts and secretsModified:
setup.py- Updated to support src/ package structureNext Steps
Users can now:
vortex.pyandclime.pywith production codesrc/indicators/tasks.ymlto register new tasksThe plugin architecture is extensible and ready for production use! 🚀
Original prompt
Add a plugin-style indicators structure, tasks mapping, and devcontainer setup to the MDPS repo so we can add CLIME and Vortex as plugins and call them via the existing FastAPI wrapper.
Create a new branch dev/monorepo-plugins and add/modify these files exactly as specified below. Do not commit any secrets. Target branch: main.
Files to add: