forked from LengKundee/MQL5-Google-Onedrive
This commit introduces two key performance and safety improvements to the repository's maintenance scripts: 1. **Optimize `scripts/test_automation.py`**: - Replaced `concurrent.futures.ProcessPoolExecutor` with sequential execution for the integration test suite. - For short-lived subprocess calls, the overhead of starting multiple Python processes for isolation was significantly higher than the execution time of the tests themselves. - **Impact**: Reduced total execution time by ~26% (from 4.0s to 2.9s) and ensured deterministic, ordered output. 2. **Optimize `scripts/ci_validate_repo.py`**: - Consolidated two separate file iteration loops into a single `validate_files` pass. - Implemented a "size-before-read" check using `path.stat().st_size` before calling `path.read_bytes()`. - **Impact**: Improved memory efficiency and prevented potential Out-Of-Memory (OOM) errors by ensuring large files are rejected before being read into memory. Consolidating the loop also reduces redundant file system operations. Verified both changes by running the integration tests and the validator manually. |
||
|---|---|---|
| .. | ||
| analyze_pr_optimizations.py | ||
| check_ea_status.ps1 | ||
| ci_validate_repo.py | ||
| cleanup.ps1 | ||
| cleanup_accounts.ps1 | ||
| cleanup_guide.md | ||
| cleanup_mql5_folder.ps1 | ||
| cleanup_mt5_terminal.ps1 | ||
| deploy_cloud.py | ||
| deploy_cloud_simple.ps1 | ||
| deploy_dashboard.ps1 | ||
| deploy_exness.ps1 | ||
| deploy_exness_live.ps1 | ||
| deploy_mt5.sh | ||
| example_custom_script.py | ||
| jules_deploy.ps1 | ||
| jules_execute.py | ||
| load_vault.ps1 | ||
| load_vault.py | ||
| merge_best_prs.py | ||
| package_mt5.sh | ||
| pin_prs_issue.md | ||
| README.md | ||
| requirements_bot.txt | ||
| review_pull_requests.py | ||
| review_working_trees.py | ||
| setup_github_secrets.ps1 | ||
| start_bot.ps1 | ||
| start_dev_container.ps1 | ||
| startup.bat | ||
| startup.ps1 | ||
| startup.sh | ||
| startup_orchestrator.py | ||
| sync_github_pages.py | ||
| TELEGRAM_BOT_SETUP.md | ||
| telegram_deploy_bot.py | ||
| test_automation.py | ||
| web_dashboard.py | ||
Scripts Directory
This directory contains automation scripts for the MQL5 trading system.
Automation Scripts
Startup Scripts (Choose one based on your platform)
startup.bat- Windows batch script for simple automationstartup.ps1- PowerShell script with advanced features (recommended for Windows)startup.sh- Bash script for Linux/WSLstartup_orchestrator.py- Python orchestrator (cross-platform)
Helper Scripts
example_custom_script.py- Template for creating your own custom scriptstest_automation.py- Integration tests for all automation scripts
Deployment Scripts
ci_validate_repo.py- Repository validation (used by CI)deploy_mt5.sh- Deploy MQL5 files to MT5 data folderpackage_mt5.sh- Create distribution package
Quick Start
Windows Users
# Run once
.\startup.ps1
# Setup auto-start on boot
.\startup.ps1 -CreateScheduledTask
# Test without executing
.\startup.ps1 -DryRun
Linux/WSL Users
# Run once
./startup.sh
# Setup auto-start on boot (systemd)
./startup.sh --setup-systemd
# Setup auto-start on boot (cron)
./startup.sh --setup-cron
Python Orchestrator (All Platforms)
# Create default configuration
python startup_orchestrator.py --create-config
# Run with default config
python startup_orchestrator.py
# Run with monitoring
python startup_orchestrator.py --monitor 3600
# Dry run
python startup_orchestrator.py --dry-run
Testing
Run the integration tests:
python test_automation.py
Configuration
Edit ../config/startup_config.json to customize:
- What programs to start
- Startup order and delays
- Platform-specific settings
- MT5 terminal path
Documentation
Full documentation available in ../docs/:
Startup_Automation_Guide.md- Complete guideQuick_Start_Automation.md- Quick referenceWindows_Task_Scheduler_Setup.md- Windows setup details
Support
- Issues: GitHub Issues
- Email: Lengkundee01.org@domain.com
- WhatsApp: Agent community