docs: improve developer onboarding and contribution experience (#1954)

Fix false diagnostic failures in make doctor by moving metaapi-cloud-sdk
from CORE_DEPENDENCIES to OPTIONAL_DEPENDENCIES in scripts/doctor.py.
Enhance scripts/bootstrap.sh to discover python3.11 when default python3
points to another version.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: triqbit <242833443+triqbit@users.noreply.github.com>
This commit is contained in:
Leo
2026-09-19 09:43:43 +00:00
committed by GitHub
co-authored by google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> triqbit
parent 481d2951ce
commit d90dbed6d6
3 changed files with 25 additions and 7 deletions
+1 -1
View File
@@ -1 +1 @@
3.11
3.11.9
+12 -5
View File
@@ -4,16 +4,23 @@ set -e
echo "=== MT5 AI/ML Trading Bot Bootstrapper ==="
# 1. Check Python
python3 --version || { echo "Python 3 not found"; exit 1; }
if ! python3 -c 'import sys; raise SystemExit(not (sys.version_info[:2] == (3, 11)))'; then
echo "Python 3.11 is required. Found: $(python3 --version 2>&1)"
PYTHON_EXEC="python3"
if command -v python3.11 &>/dev/null; then
if python3.11 -c 'import sys; sys.exit(0 if sys.version_info[:2] == (3, 11) else 1)' 2>/dev/null; then
PYTHON_EXEC="python3.11"
fi
fi
$PYTHON_EXEC --version || { echo "Python 3 not found"; exit 1; }
if ! $PYTHON_EXEC -c 'import sys; raise SystemExit(not (sys.version_info[:2] == (3, 11)))' 2>/dev/null; then
echo "Python 3.11 is required. Found: $($PYTHON_EXEC --version 2>&1)"
exit 1
fi
# 2. Setup virtual environment if not present
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
echo "Creating virtual environment using $PYTHON_EXEC..."
$PYTHON_EXEC -m venv venv
fi
# 3. Create required directories
+12 -1
View File
@@ -116,7 +116,6 @@ CORE_DEPENDENCIES = {
"pydantic": ("pydantic", "2.10.4"),
"pydantic-settings": ("pydantic_settings", "2.7.0"),
"sqlalchemy": ("sqlalchemy", "2.0.36"),
"metaapi-cloud-sdk": ("metaapi_cloud_sdk", "29.1.1"),
"torch": ("torch", "2.5.1"),
"fastapi": ("fastapi", "0.115.6"),
"structlog": ("structlog", "24.4.0"),
@@ -144,6 +143,10 @@ CORE_DEPENDENCIES = {
"optuna": ("optuna", "4.9.0"),
}
OPTIONAL_DEPENDENCIES = {
"metaapi-cloud-sdk": ("metaapi_cloud_sdk", "29.1.1"),
}
def check_dependencies(dependencies=None):
try:
@@ -195,6 +198,14 @@ def check_dependencies(dependencies=None):
except ImportError:
missing.append(display_name)
if dependencies is None:
for display_name, val in OPTIONAL_DEPENDENCIES.items():
module_name = val[0] if isinstance(val, tuple) else val
try:
__import__(module_name)
except ImportError:
optional_missing.append(display_name)
if missing:
remedy = "Run 'make bootstrap' to install missing dependencies."
return DiagnosticCheck(