Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: |
set -euo pipefail
python -m pip install --upgrade pip
python -m pip install -e . numpy pandas pytest pytest-cov requests ruff "jsonschema>=4.18,<5" "rfc3339-validator>=0.1.4,<1"
python -m pip install -e . numpy pandas pytest pytest-cov requests ruff import-linter pyright "jsonschema>=4.18,<5" "rfc3339-validator>=0.1.4,<1"

- name: Validate dependency constraint refs
run: |
Expand Down Expand Up @@ -78,6 +78,16 @@ jobs:
set -euo pipefail
ruff check .

- name: Run import-linter architecture contract
run: |
set -euo pipefail
PYTHONPATH=src lint-imports

- name: Run Pyright
run: |
set -euo pipefail
pyright

- name: Run unit tests
run: |
set -euo pipefail
Expand Down
29 changes: 29 additions & 0 deletions .importlinter
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[importlinter]
root_package = quant_platform_kit

[importlinter:contract:core-contracts-independent-of-adapters]
name = Core domain contracts do not import broker adapters, cloud, or notifications
type = forbidden
source_modules =
quant_platform_kit.risk
quant_platform_kit.position_sizing
quant_platform_kit.execution
quant_platform_kit.reconciliation
forbidden_modules =
quant_platform_kit.ibkr
quant_platform_kit.binance
quant_platform_kit.schwab
quant_platform_kit.longbridge
quant_platform_kit.quantconnect
quant_platform_kit.cloud
quant_platform_kit.notifications
ignore_imports =
# Legacy coupling frozen per ADR 0001; new imports across this boundary are blocked.
quant_platform_kit.common.execution_commands -> quant_platform_kit.cloud
quant_platform_kit.common.execution_state -> quant_platform_kit.cloud
quant_platform_kit.notifications.telegram -> quant_platform_kit.cloud
quant_platform_kit.strategy_lifecycle.performance_store -> quant_platform_kit.cloud
quant_platform_kit.risk.attention -> quant_platform_kit.notifications.presentation
quant_platform_kit.common.operational_notification_localization -> quant_platform_kit.notifications.presentation
quant_platform_kit.risk.attention_notify -> quant_platform_kit.notifications.telegram
quant_platform_kit.strategy_lifecycle.research_promotion.notifications -> quant_platform_kit.notifications.telegram
16 changes: 16 additions & 0 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"pythonVersion": "3.11",
"typeCheckingMode": "basic",
"include": [
"src/quant_platform_kit/execution",
"src/quant_platform_kit/reconciliation",
"src/quant_platform_kit/common/execution_capabilities.py",
"src/quant_platform_kit/common/execution_commands.py",
"src/quant_platform_kit/common/execution_outcomes.py",
"src/quant_platform_kit/common/execution_receipts.py",
"src/quant_platform_kit/common/execution_translation.py"
],
"extraPaths": [
"src"
]
}
Loading