Skip to content

Commit 3d6f493

Browse files
authored
chore: reorganize root files (ZhuLinsen#1257)
* chore: reorganize root files * fix: mark moved docs assets as binary
1 parent 76a758d commit 3d6f493

65 files changed

Lines changed: 77 additions & 58 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,20 @@
22
# 多个并发 PR 向 [Unreleased] 末尾追加条目时,Git 直接取两边所有行而不产生冲突标记。
33
# 适用于 append-only 的 changelog 文件。
44
docs/CHANGELOG.md merge=union
5+
6+
# Documentation image/design assets are binary. Keep GitHub review diffs from
7+
# trying to decode moved binary files as UTF-8.
8+
sources/**/*.ai binary
9+
sources/**/*.gif binary
10+
sources/**/*.ico binary
11+
sources/**/*.jpg binary
12+
sources/**/*.jpeg binary
13+
sources/**/*.png binary
14+
sources/**/*.psd binary
15+
docs/assets/**/*.ai binary
16+
docs/assets/**/*.gif binary
17+
docs/assets/**/*.ico binary
18+
docs/assets/**/*.jpg binary
19+
docs/assets/**/*.jpeg binary
20+
docs/assets/**/*.png binary
21+
docs/assets/**/*.psd binary
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Backend CI dependencies.
2-
-r requirements.txt
2+
-r ../requirements.txt
33

44
# Test and lint tooling used by backend-gate.
55
flake8

.github/scripts/ai_review.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
'docs/**',
1818
'.github/PULL_REQUEST_TEMPLATE.md',
1919
'requirements.txt',
20+
'.github/requirements-ci.txt',
2021
'pyproject.toml',
2122
'setup.cfg',
2223
'.github/workflows/*.yml',
@@ -69,7 +70,7 @@ def classify_files(files):
6970
frontend_files = [f for f in files if f.startswith('apps/dsa-web/') or f.endswith(('.tsx', '.ts'))]
7071
ci_files = [f for f in files if f.startswith('.github/workflows/')]
7172
config_files = [
72-
f for f in files if f in ('requirements.txt', 'pyproject.toml', 'setup.cfg', '.github/PULL_REQUEST_TEMPLATE.md')
73+
f for f in files if f in ('requirements.txt', '.github/requirements-ci.txt', 'pyproject.toml', 'setup.cfg', '.github/PULL_REQUEST_TEMPLATE.md')
7374
]
7475
return py_files, doc_files, frontend_files, ci_files, config_files
7576

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ jobs:
5252
cache: 'pip'
5353
cache-dependency-path: |
5454
requirements.txt
55-
requirements-ci.txt
55+
.github/requirements-ci.txt
5656
- name: 📦 Install dependencies
5757
run: |
5858
python -m pip install --upgrade pip
5959
for attempt in 1 2 3; do
60-
if python -m pip install -r requirements-ci.txt; then
60+
if python -m pip install -r .github/requirements-ci.txt; then
6161
break
6262
fi
6363
if [ "$attempt" -eq 3 ]; then
@@ -95,7 +95,7 @@ jobs:
9595
from src.notification import NotificationService; print('✅ notification')
9696
from data_provider import DataFetcherManager; print('✅ data_provider')
9797
from src.analyzer import GeminiAnalyzer; print('✅ analyzer')
98-
from patch.eastmoney_patch import eastmoney_patch; print('✅ patch')
98+
from src.patches.eastmoney_patch import eastmoney_patch; print('✅ patch')
9999
from bot.dispatcher import CommandDispatcher; print('✅ bot')
100100
from api.app import app; print('✅ api')
101101
print('✅ All Docker imports OK')

.github/workflows/pr-review.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
- 'AGENTS.md'
1717
- 'apps/dsa-web/**'
1818
- 'requirements.txt'
19+
- '.github/requirements-ci.txt'
1920
- 'pyproject.toml'
2021
- 'setup.cfg'
2122
- '.github/PULL_REQUEST_TEMPLATE.md'
@@ -115,7 +116,7 @@ jobs:
115116
run: |
116117
BASE_REF="${{ github.base_ref || 'main' }}"
117118
CHANGED_FILES=$(git diff --name-only origin/$BASE_REF...HEAD -- '*.py' 2>/dev/null || echo "")
118-
REVIEWABLE_FILES=$(git diff --name-only origin/$BASE_REF...HEAD -- '*.py' '*.md' 'docs/**' 'README.md' 'AGENTS.md' 'requirements.txt' 'pyproject.toml' 'setup.cfg' '.github/PULL_REQUEST_TEMPLATE.md' '.github/workflows/**' '.github/scripts/**' 2>/dev/null || echo "")
119+
REVIEWABLE_FILES=$(git diff --name-only origin/$BASE_REF...HEAD -- '*.py' '*.md' 'docs/**' 'README.md' 'AGENTS.md' 'requirements.txt' '.github/requirements-ci.txt' 'pyproject.toml' 'setup.cfg' '.github/PULL_REQUEST_TEMPLATE.md' '.github/workflows/**' '.github/scripts/**' 2>/dev/null || echo "")
119120
120121
if [ -z "$REVIEWABLE_FILES" ]; then
121122
echo "has_reviewable_changes=false" >> $GITHUB_OUTPUT

README.md

Lines changed: 4 additions & 4 deletions

SKILL.md

Lines changed: 7 additions & 7 deletions

data_provider/akshare_fetcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
before_sleep_log,
4242
)
4343

44-
from patch.eastmoney_patch import eastmoney_patch
44+
from src.patches.eastmoney_patch import eastmoney_patch
4545
from src.config import get_config
4646
from .base import BaseFetcher, DataFetchError, RateLimitError, STANDARD_COLUMNS, is_bse_code, is_st_stock, is_kc_cy_stock, normalize_stock_code
4747
from .realtime_types import (

data_provider/efinance_fetcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
)
5252
_EF_CALL_TIMEOUT = 30
5353

54-
from patch.eastmoney_patch import eastmoney_patch
54+
from src.patches.eastmoney_patch import eastmoney_patch
5555
from src.config import get_config
5656
from .base import BaseFetcher, DataFetchError, RateLimitError, STANDARD_COLUMNS,is_bse_code, is_st_stock, is_kc_cy_stock, normalize_stock_code, _is_hk_market
5757
from .realtime_types import (

docker/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ COPY *.py ./
4949
COPY api/ ./api/
5050
COPY data_provider/ ./data_provider/
5151
COPY bot/ ./bot/
52-
COPY patch/ ./patch/
5352
COPY src/ ./src/
5453
COPY strategies/ ./strategies/
5554
COPY --from=web-builder /app/static ./static/

0 commit comments

Comments
 (0)