-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
62 lines (58 loc) · 1.99 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
62 lines (58 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Pre-commit hooks configuration for NexQuant
# See https://pre-commit.com for more information
repos:
# ── Test Coverage Check: new modules must have tests ──────────────
- repo: local
hooks:
- id: check-test-coverage
name: Check new rdagent modules have tests
entry: python scripts/check_test_coverage.py
language: system
pass_filenames: false
always_run: true
# ── MyPy Ratchet: no new type errors allowed ────────────────────
- repo: local
hooks:
- id: mypy-ratchet
name: MyPy ratchet (no new type errors)
entry: python scripts/check_mypy_ratchet.py
language: system
pass_filenames: false
always_run: true
# ── Qlib Unit Tests (MANDATORY) ──────────────────────────────────
- repo: local
hooks:
- id: qlib-unit-tests
name: Qlib Unit Tests (~490 tests)
entry: pytest
language: system
args:
- test/qlib/
- test/backtesting/
- -v
- --tb=short
- --cov=rdagent
- --cov-fail-under=33
- --cov-report=term
- --ignore=test/backtesting/test_ftmo_oos.py
- --ignore=test/backtesting/test_kronos_adapter.py
- --ignore=test/qlib/test_fin_quant_integration.py
pass_filenames: false
always_run: true
# ── Security Scanning (MANDATORY) ─────────────────────────────────
- repo: local
hooks:
- id: bandit-security-scan
name: Bandit Security Scan
entry: bandit
language: system
args:
- -r
- rdagent/
- -c
- .bandit.yml
- --severity-level=medium
- --confidence-level=medium
- --format=txt
pass_filenames: false
always_run: true