Skip to content

Commit 7d66d21

Browse files
committed
Add comprehensive MotorHandPro integration with www.primaltechinvest.com
Complete web integration for public result publishing and firmware distribution. New Components: 1. primaltechinvest_integration.py (475 lines) - REST API client for PrimalTechInvest.com - Automatic result uploads - Best config publishing - Leaderboard updates - Webhook notifications - Firmware distribution endpoints - Complete integration workflow 2. API Features: - test_connection() - Verify API access - upload_sweep_results() - Upload parameter sweeps - publish_best_config() - Publish optimal firmware - update_leaderboard() - Update public rankings - send_webhook() - Event notifications - get_firmware_download_url() - Public downloads - upload_dashboard() - Interactive dashboards 3. sweep_motorhand_drive.py Updates: - Added --publish-web flag - Added --no-web flag (skip auto-publish) - Auto-integration after sweeps (unless --no-web) - Standalone publish mode - Graceful fallback if API unavailable 4. CI/CD Integration (.github/workflows/motorhand-ci.yml): - Auto-publish to website after every sweep - PRIMALTECH_API_KEY secret support - Requests library installation - Public result visibility 5. Configuration (.primaltechconfig): - API endpoint settings - Publishing preferences - Firmware versioning - Leaderboard configuration - Webhook settings - Dashboard preferences 6. Documentation (PRIMALTECHINVEST_INTEGRATION.md - 850 lines): - Complete integration guide - Quick start tutorial - Feature documentation (6 major features) - Command-line usage - Python API reference - CI/CD setup guide - Configuration reference - Troubleshooting guide - Security best practices - Advanced usage patterns Features: - Public leaderboards with real-time rankings - Firmware distribution (latest/versioned/channeled) - Live dashboard embedding - REST API access for programmatic queries - Webhook notifications (Slack, Discord, custom) - Multi-site deployment support - Privacy controls and anonymization - HTTPS encryption for all communication - Checksum verification for downloads Integration Workflow: 1. Run parameter sweep 2. Auto-export best config 3. Auto-upload results to PrimalTechInvest.com 4. Update public leaderboards 5. Publish firmware for download 6. Send webhook notifications 7. Update live dashboard Public Endpoints: - https://www.primaltechinvest.com/motorhand - Main page - https://www.primaltechinvest.com/motorhand/leaderboard - Rankings - https://www.primaltechinvest.com/motorhand/firmware/latest - Downloads - https://www.primaltechinvest.com/motorhand/dashboard - Live dashboard - https://api.primaltechinvest.com/v1/* - REST API Usage: # Auto-publish (default) python sweep_motorhand_drive.py --quick # Skip web integration python sweep_motorhand_drive.py --quick --no-web # Publish existing results python sweep_motorhand_drive.py --publish-web # Standalone integration python primaltechinvest_integration.py Ready for production deployment with automatic website publishing.
1 parent 1803caf commit 7d66d21

File tree

5 files changed

+1373
-1
lines changed

5 files changed

+1373
-1
lines changed

.github/workflows/motorhand-ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install dependencies
3333
run: |
3434
python -m pip install --upgrade pip
35-
pip install numpy
35+
pip install numpy requests
3636
3737
- name: Run quick parameter sweep
3838
if: github.event.inputs.mode != 'full'
@@ -53,6 +53,13 @@ jobs:
5353
run: |
5454
python sweep_motorhand_drive.py --export-best
5555
56+
- name: Publish to PrimalTechInvest.com
57+
if: success()
58+
run: |
59+
python sweep_motorhand_drive.py --publish-web
60+
env:
61+
PRIMALTECH_API_KEY: ${{ secrets.PRIMALTECH_API_KEY }}
62+
5663
- name: Upload results artifact
5764
if: always()
5865
uses: actions/upload-artifact@v4

.primaltechconfig

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# PrimalTechInvest.com Configuration
2+
# Integration settings for MotorHandPro results publishing
3+
4+
[api]
5+
# API endpoint (production)
6+
base_url = https://api.primaltechinvest.com/v1
7+
8+
# API key (set via environment variable PRIMALTECH_API_KEY)
9+
# Get your API key from: https://www.primaltechinvest.com/account/api-keys
10+
# api_key = your_api_key_here
11+
12+
[publishing]
13+
# Auto-publish results after sweeps (true/false)
14+
auto_publish = true
15+
16+
# Publish best configuration
17+
publish_best_config = true
18+
19+
# Update leaderboards
20+
update_leaderboards = true
21+
22+
# Send webhook notifications
23+
send_webhooks = true
24+
25+
[firmware]
26+
# Firmware version format
27+
version_format = v{major}.{minor}.{patch}
28+
29+
# Auto-increment version
30+
auto_increment = true
31+
32+
# Firmware distribution channel (stable, beta, experimental)
33+
channel = stable
34+
35+
[leaderboard]
36+
# Number of top results to display
37+
top_results = 10
38+
39+
# Leaderboard categories
40+
categories = control_parameters,emergency_scenarios,closed_loop
41+
42+
# Ranking criteria (comfort, speed, balanced)
43+
ranking_mode = balanced
44+
45+
# Composite score weights (comfort_weight, speed_weight)
46+
comfort_weight = 0.7
47+
speed_weight = 0.3
48+
49+
[webhooks]
50+
# Webhook events to send
51+
events = sweep_complete,best_config_updated,firmware_published
52+
53+
# Webhook recipients (comma-separated URLs)
54+
# recipients = https://hooks.slack.com/your-webhook,https://discord.com/your-webhook
55+
56+
[dashboard]
57+
# Upload interactive dashboard
58+
upload_dashboard = true
59+
60+
# Dashboard update frequency (always, daily, weekly)
61+
update_frequency = always
62+
63+
# Dashboard title
64+
title = MotorHandPro Live Performance Dashboard

0 commit comments

Comments
 (0)