Skip to main content

DREDGE — A small Python utility (scaffold).

Project description

DREDGE

DEPENDADREDGEABOT Docker Image CI/CD Python CI

DREDGE — small Python package scaffold with String Theory integration.

📖 Documentation

🚀 Quick Start

Local Development (with Makefile)

# Clone and enter repository
git clone https://github.com/QueenFi703/DREDGE-Cli.git
cd DREDGE-Cli

# Install all dependencies (Python + Swift)
make install-all

# Run DREDGE server (port 3001)
make serve

# Or run MCP server (port 3002)
make mcp

# Run tests
make test-all

Container Development

Pre-built images are available on GitHub Container Registry:

# Pull and run latest CPU image
docker pull ghcr.io/queenfi703/dredge-cli:latest-cpu
docker run -p 3001:3001 ghcr.io/queenfi703/dredge-cli:latest-cpu

# Pull and run latest GPU image
docker pull ghcr.io/queenfi703/dredge-cli:latest-gpu
docker run -p 3002:3002 --gpus all ghcr.io/queenfi703/dredge-cli:latest-gpu

Or build and run locally:

# CPU-only Flask server
make docker-up-cpu

# GPU-enabled MCP server
make docker-up-gpu

# Full stack with monitoring
make docker-profile-full

See docs/CONTAINER_QUICKSTART.md for more container deployment options.

See BUILD.md for complete build instructions, CI triggers, and troubleshooting.

🚀 Quick Start with VS Code

Clone this repository directly into VS Code!

See the detailed VS Code Setup Guide for complete instructions on cloning, setting up, and developing in VS Code.

Quick clone command:

git clone https://github.com/QueenFi703/DREDGE-Cli.git
code DREDGE-Cli

Repository Structure

  • src/dredge/ - Python package source code
  • tests/ - Test files
  • docs/ - Documentation files (see docs/mobile-optimization.md for mobile guidance)
  • benchmarks/ - Benchmark scripts and results
  • swift/ - Swift implementation files
  • DREDGE-Cli.xcworkspace - Xcode workspace for Swift development
  • archives/ - Archived files (excluded from version control)

Install

Create a virtual environment and install:

python -m venv .venv source .venv/bin/activate # or .venv\Scripts\activate on Windows pip install -e .

Server Usage

DREDGE includes two web servers:

1. DREDGE x Dolly Server (Port 3001)

A web server for API-based interaction with Dolly integration.

Starting the Server

python -m dredge serve
# or
dredge-cli serve --host 0.0.0.0 --port 3001 --debug

API Endpoints

  • GET / - API information and available endpoints
  • GET /health - Health check endpoint
  • POST /lift - Lift an insight with Dolly integration
  • GET /quasimoto-gpu - Quasimoto GPU visualization (repository language statistics)

Example Usage

# Get API info
curl http://localhost:3001/

# Check health
curl http://localhost:3001/health

# Lift an insight
curl -X POST http://localhost:3001/lift \
  -H "Content-Type: application/json" \
  -d '{"insight_text": "Digital memory must be human-reachable."}'

# View Quasimoto GPU visualization
open http://localhost:3001/quasimoto-gpu

2. MCP Server (Port 3002) - Quasimoto Integration

A Model Context Protocol server for serving Quasimoto neural wave function models with String Theory integration.

Starting the MCP Server

python -m dredge mcp
# or
dredge-cli mcp --host 0.0.0.0 --port 3002 --debug

MCP Protocol Endpoint

  • GET / - MCP server capabilities and model information
  • POST /mcp - MCP protocol endpoint for model operations

Available Operations

  1. list_capabilities - List available models and operations
  2. load_model - Load Quasimoto models (1D, 4D, 6D, ensemble) or String Theory models
  3. inference - Run inference on loaded models
  4. get_parameters - Retrieve model parameters
  5. benchmark - Run performance benchmarks
  6. string_spectrum - Compute string theory vibrational spectrum
  7. string_parameters - Calculate fundamental string theory parameters
  8. unified_inference - Run unified DREDGE + Quasimoto + String Theory inference
  9. get_dependabot_alerts - Retrieve Dependabot security alerts for a repository
  10. explain_dependabot_alert - Get detailed explanation of a specific Dependabot alert
  11. update_dependabot_alert - Update Dependabot alert status (dismiss or reopen)

Example MCP Request

# List capabilities
curl http://localhost:3002/

# Load a model
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{"operation": "load_model", "params": {"model_type": "quasimoto_1d"}}'

# Run inference
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{"operation": "inference", "params": {"model_id": "quasimoto_1d_0", "inputs": {"x": [0.5], "t": [0.0]}}}'

Available Models

  • quasimoto_1d - 1D wave function (8 parameters)
  • quasimoto_4d - 4D spatiotemporal wave function (13 parameters)
  • quasimoto_6d - 6D high-dimensional wave function (17 parameters)
  • quasimoto_ensemble - Configurable ensemble models
  • string_theory - String theory neural network (configurable dimensions)

String Theory Integration

The MCP server now includes string theory models that integrate with Quasimoto wave functions:

# Compute string vibrational spectrum
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{"operation": "string_spectrum", "params": {"max_modes": 10, "dimensions": 10}}'

# Calculate fundamental string parameters
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{"operation": "string_parameters", "params": {"energy_scale": 1.0, "coupling_constant": 0.1}}'

# Run unified inference (DREDGE + Quasimoto + String Theory)
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "unified_inference",
    "params": {
      "dredge_insight": "Digital memory must be human-reachable",
      "quasimoto_coords": [0.5, 0.5, 0.5],
      "string_modes": [1, 2, 3]
    }
  }'

# Load a string theory model
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{"operation": "load_model", "params": {"model_type": "string_theory", "config": {"dimensions": 10, "hidden_size": 64}}}'

Dependabot Alert Management

The MCP server now includes Dependabot alert integration for conversational dependency management:

# Get all Dependabot alerts for a repository
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{"operation": "get_dependabot_alerts", "params": {"repo_owner": "QueenFi703", "repo_name": "DREDGE-Cli"}}'

# Explain a specific alert with AI-powered recommendations
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{"operation": "explain_dependabot_alert", "params": {"alert_id": 1, "repo_owner": "QueenFi703", "repo_name": "DREDGE-Cli"}}'

# Update an alert status (dismiss or reopen)
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "update_dependabot_alert",
    "params": {
      "alert_id": 1,
      "state": "dismissed",
      "dismissed_reason": "not_used",
      "dismissed_comment": "This dependency is not used in production"
    }
  }'

Note: Dependabot operations require a GITHUB_TOKEN environment variable with the security_events scope.

Available dismissed reasons:

  • fix_started - A fix has already been started
  • inaccurate - This alert is inaccurate or incorrect
  • no_bandwidth - No bandwidth to fix this
  • not_used - Dependency is not used
  • tolerable_risk - Risk is tolerable

GitHub Codespaces

The repository includes .devcontainer/devcontainer.json configured to:

  • Automatically forward ports 3001 and 3002 when running in GitHub Codespaces
  • Fetch the full git repository history (unshallow the repository) for complete commit access

Swift Development

DREDGE includes a Swift CLI implementation with MCP client and String Theory support. You can develop using:

Xcode Workspace

open DREDGE-Cli.xcworkspace

Swift Package Manager

# Build from root
swift build
swift run dredge-cli

# Or build from swift/ directory
cd swift
swift build
swift run dredge-cli

Swift Features

The Swift implementation includes:

  • String Theory Models - 10D superstring vibrational modes and energy calculations
  • MCP Client - Connect to MCP server for model operations
  • Unified Integration - Combine DREDGE insights, Quasimoto coordinates, and String Theory modes

See SWIFT_PACKAGE_GUIDE.md for detailed Swift development information.

Test

Run tests with pytest:

pip install -U pytest pytest

Development

  • Edit code in src/dredge
  • Update version in pyproject.toml
  • Tag releases with v and push tags

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dredge_cli-0.1.5.tar.gz (48.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dredge_cli-0.1.5-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

Details for the file dredge_cli-0.1.5.tar.gz.

File metadata

  • Download URL: dredge_cli-0.1.5.tar.gz
  • Upload date:
  • Size: 48.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dredge_cli-0.1.5.tar.gz
Algorithm Hash digest
SHA256 0deaf0b3665ba26c67ac5c0a3dda0ed2dc44849745bd2d5bda6cdd997da9bf56
MD5 014ae45be3f968e75c41c17425eb5496
BLAKE2b-256 a8866bc971f815907b9c7bae72f8d9136682735b0c8f3d3059b4758b1dca9507

See more details on using hashes here.

File details

Details for the file dredge_cli-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: dredge_cli-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 37.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dredge_cli-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ef8c93bd17ce95af2d7fe37609e00504bda54c366f447d9c51e164552c6d5720
MD5 a3d3a458f9512c0aedd91c5c974e63a5
BLAKE2b-256 5c0f9c77300197283a48014703d8c6f51699b3139072041d8cce9e39e3c6b73f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page