Skip to content

Commit e80f3c9

Browse files
committed
ci: add ruff validation for ibkr platform
1 parent cbb90d0 commit e80f3c9

5 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ jobs:
2121
run: |
2222
set -euo pipefail
2323
python -m pip install --upgrade pip
24-
python -m pip install -r requirements.txt pytest
24+
python -m pip install -r requirements.txt pytest ruff
25+
26+
- name: Run ruff
27+
run: |
28+
set -euo pipefail
29+
ruff check .
2530
2631
- name: Run unit tests
2732
run: |

.ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target-version = "py311"

main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
Runs on Cloud Run; connects to IB Gateway on GCE via ib_insync, alerts via Telegram.
55
"""
66
import os
7-
import time
87
import traceback
98
import requests
109
import pandas as pd
@@ -20,7 +19,6 @@
2019
from quant_platform_kit.common.models import OrderIntent
2120
from quant_platform_kit.ibkr import (
2221
connect_ib as ibkr_connect_ib,
23-
ensure_event_loop,
2422
fetch_historical_price_series,
2523
fetch_portfolio_snapshot,
2624
fetch_quote_snapshots,

runtime_config_support.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from typing import Any, Callable
77

88
from strategy_registry import (
9-
DEFAULT_STRATEGY_PROFILE,
109
IBKR_PLATFORM,
1110
resolve_strategy_definition,
1211
)

strategy_registry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from us_equity_strategies import get_strategy_definitions as get_us_equity_strategy_definitions
44

55
from quant_platform_kit.common.strategies import (
6+
StrategyDefinition,
67
US_EQUITY_DOMAIN,
78
get_supported_profiles_for_platform as qpk_get_supported_profiles_for_platform,
89
resolve_strategy_definition as qpk_resolve_strategy_definition,

0 commit comments

Comments
 (0)