Skip to content

Commit 40ca338

Browse files
authored
feat(ci) Introducing dependabot (#2)
* refactor(docs): update README and CI script comments to English * feat(deps): add initial dependabot configuration for Python and GitHub Actions
1 parent 3994d7c commit 40ca338

3 files changed

Lines changed: 108 additions & 33 deletions

File tree

.github/dependabot.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
version: 2
2+
updates:
3+
# Python dependencies via pip
4+
- package-ecosystem: "pip"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "03:00"
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "FrostyHec"
13+
assignees:
14+
- "FrostyHec"
15+
commit-message:
16+
prefix: "build(deps)"
17+
prefix-development: "build(deps-dev)"
18+
include: "scope"
19+
pull-request-branch-name:
20+
separator: "/"
21+
allow:
22+
- dependency-type: "all"
23+
ignore:
24+
# Add packages to ignore if needed (example: numpy@2.0.0)
25+
26+
# Auto-merge minor and patch updates when CI passes
27+
auto-merge: true
28+
29+
# Group dependencies to reduce PR count
30+
groups:
31+
dev-dependencies:
32+
dependency-types:
33+
- "development"
34+
update-types:
35+
- "version-update:semver-minor"
36+
- "version-update:semver-patch"
37+
production-minor-patch:
38+
dependency-types:
39+
- "production"
40+
update-types:
41+
- "version-update:semver-minor"
42+
- "version-update:semver-patch"
43+
production-major:
44+
dependency-types:
45+
- "production"
46+
update-types:
47+
- "version-update:semver-major"
48+
49+
# GitHub Actions
50+
- package-ecosystem: "github-actions"
51+
directory: "/"
52+
schedule:
53+
interval: "weekly"
54+
day: "monday"
55+
time: "04:00"
56+
open-pull-requests-limit: 5
57+
reviewers:
58+
- "FrostyHec"
59+
assignees:
60+
- "FrostyHec"
61+
commit-message:
62+
prefix: "ci(actions)"
63+
include: "scope"
64+
65+
# Auto-merge all GitHub Actions updates when CI passes
66+
auto-merge: true
67+
68+
# Group all actions updates together
69+
groups:
70+
actions:
71+
patterns:
72+
- "*"
73+
update-types:
74+
- "version-update:semver-minor"
75+
- "version-update:semver-patch"
76+
- "version-update:semver-major"

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ Contributions are welcome! Please see our [Developer Guide](docs/developers_guid
129129

130130
## 📧 Contact
131131

132-
- **Author**: ZDHuang
133132
- **GitHub**: [@FrostyHec](https://github.com/FrostyHec)
134133
- **Repository**: [deep-solutions](https://github.com/FrostyHec/deep-solutions)
135134

scripts/ci-local.sh

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/bash
22
# =============================================================================
3-
# CI 本地模拟脚本
4-
# 用途: 在提交 PR 前模拟 CI 的所有检查步骤
3+
# CI local simulation script
4+
# Purpose: Run all CI checks locally before creating a PR
55
# =============================================================================
66

7-
set -e # 遇到错误立即退出
7+
set -e # Exit on error
88

9-
# 颜色定义
9+
# Color definitions
1010
RED='\033[0;31m'
1111
GREEN='\033[0;32m'
1212
YELLOW='\033[1;33m'
@@ -38,25 +38,25 @@ print_warning() {
3838
# =============================================================================
3939
print_header "Step 1/4: Lint & Format Check"
4040

41-
echo "检查代码格式..."
41+
echo "Checking code format..."
4242
if ruff format --check src/ tests/; then
43-
print_success "代码格式检查通过"
43+
print_success "Code format check passed"
4444
else
45-
print_error "代码格式检查失败"
45+
print_error "Code format check failed"
4646
echo ""
47-
echo "运行以下命令修复:"
47+
echo "Run the following to fix formatting:"
4848
echo " ruff format src/ tests/"
4949
exit 1
5050
fi
5151

5252
echo ""
53-
echo "运行 Linter..."
53+
echo "Running linter..."
5454
if ruff check src/ tests/; then
55-
print_success "Lint 检查通过"
55+
print_success "Lint check passed"
5656
else
57-
print_error "Lint 检查失败"
57+
print_error "Lint check failed"
5858
echo ""
59-
echo "尝试自动修复:"
59+
echo "Try auto-fixing with:"
6060
echo " ruff check --fix src/ tests/"
6161
exit 1
6262
fi
@@ -66,11 +66,11 @@ fi
6666
# =============================================================================
6767
print_header "Step 2/4: Type Check"
6868

69-
echo "运行 MyPy 类型检查..."
69+
echo "Running MyPy type checks..."
7070
if mypy src/; then
71-
print_success "类型检查通过"
71+
print_success "Type check passed"
7272
else
73-
print_error "类型检查失败"
73+
print_error "Type check failed"
7474
exit 1
7575
fi
7676

@@ -79,11 +79,11 @@ fi
7979
# =============================================================================
8080
print_header "Step 3/4: Run Tests"
8181

82-
echo "运行测试并生成报告..."
82+
echo "Running tests and generating reports..."
8383
if pytest --junitxml=pytest-report.xml --cov=deep_solutions --cov-report=xml --cov-report=term-missing; then
84-
print_success "所有测试通过"
84+
print_success "All tests passed"
8585
else
86-
print_error "测试失败"
86+
print_error "Tests failed"
8787
exit 1
8888
fi
8989

@@ -92,36 +92,36 @@ fi
9292
# =============================================================================
9393
print_header "Step 4/4: Build Check"
9494

95-
echo "清理旧的构建产物..."
95+
echo "Cleaning previous build artifacts..."
9696
rm -rf dist/ build/ *.egg-info
9797

98-
echo "构建包..."
98+
echo "Building package..."
9999
if python -m build; then
100-
print_success "包构建成功"
100+
print_success "Package build succeeded"
101101
else
102-
print_error "包构建失败"
102+
print_error "Package build failed"
103103
exit 1
104104
fi
105105

106106
echo ""
107-
echo "检查包..."
107+
echo "Checking distribution files..."
108108
if twine check dist/*; then
109-
print_success "包检查通过"
109+
print_success "Distribution check passed"
110110
else
111-
print_error "包检查失败"
111+
print_error "Distribution check failed"
112112
exit 1
113113
fi
114114

115115
# =============================================================================
116116
# Summary
117117
# =============================================================================
118-
print_header "总结"
118+
print_header "Summary"
119119

120-
echo -e "${GREEN}所有 CI 检查通过!${NC}"
120+
echo -e "${GREEN}All CI checks passed!${NC}"
121121
echo ""
122-
echo "生成的文件:"
123-
echo " - pytest-report.xml (测试报告)"
124-
echo " - coverage.xml (覆盖率报告)"
125-
echo " - dist/ (构建产物)"
122+
echo "Generated files:"
123+
echo " - pytest-report.xml (test report)"
124+
echo " - coverage.xml (coverage report)"
125+
echo " - dist/ (build artifacts)"
126126
echo ""
127-
print_success "代码已准备好创建 Pull Request"
127+
print_success "Code is ready to create a Pull Request"

0 commit comments

Comments
 (0)