Sikuwa first commit
Some checks are pending
CI / Test (Python 3.10 on macos-latest) (push) Waiting to run
CI / Test (Python 3.11 on macos-latest) (push) Waiting to run
CI / Test (Python 3.12 on macos-latest) (push) Waiting to run
CI / Test (Python 3.8 on macos-latest) (push) Waiting to run
CI / Test (Python 3.9 on macos-latest) (push) Waiting to run
CI / Test (Python 3.10 on ubuntu-latest) (push) Waiting to run
CI / Test (Python 3.11 on ubuntu-latest) (push) Waiting to run
CI / Test (Python 3.12 on ubuntu-latest) (push) Waiting to run
CI / Test (Python 3.8 on ubuntu-latest) (push) Waiting to run
CI / Test (Python 3.9 on ubuntu-latest) (push) Waiting to run
CI / Test (Python 3.10 on windows-latest) (push) Waiting to run
CI / Test (Python 3.11 on windows-latest) (push) Waiting to run
CI / Test (Python 3.12 on windows-latest) (push) Waiting to run
CI / Test (Python 3.8 on windows-latest) (push) Waiting to run
CI / Test (Python 3.9 on windows-latest) (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Release (push) Blocked by required conditions
Documentation / Build Documentation (push) Waiting to run

This commit is contained in:
so陈
2026-02-20 23:53:48 +08:00
commit 13a1072c6f
57 changed files with 13519 additions and 0 deletions

32
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,32 @@
# CODEOWNERS
# 代码所有者配置
# 文档: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
# 默认所有者
* @FORGE24
# 核心模块
/sikuwa/builder.py @FORGE24
/sikuwa/compiler.py @FORGE24
/sikuwa/config.py @FORGE24
/sikuwa/cli.py @FORGE24
# 增量编译模块
/sikuwa/incremental/ @FORGE24
# C++ 扩展
/sikuwa/cpp_cache/ @FORGE24
# 国际化
/sikuwa/i18n/ @FORGE24
# 文档
/docs/ @FORGE24
*.md @FORGE24
# CI/CD 配置
/.github/ @FORGE24
/.gitee/ @FORGE24
# 测试
/tests/ @FORGE24

61
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,61 @@
---
name: Bug 报告
about: 报告问题以帮助改进项目
title: '[BUG] '
labels: bug
assignees: ''
---
## 环境信息
| 项目 | 值 |
|:---|:---|
| 操作系统 | |
| Python 版本 | |
| Sikuwa 版本 | |
| Nuitka 版本 | |
## 问题描述
### 预期行为
清晰描述预期的行为。
### 实际行为
清晰描述实际发生的行为。
## 复现步骤
1. 执行命令 '...'
2. 配置 '...'
3. 查看 '...'
4. 出现错误
## 配置文件
如适用,请提供 `sikuwa.toml` 配置文件内容:
```toml
# 粘贴配置文件内容
```
## 日志信息
```
# 粘贴相关日志或错误信息
```
## 截图
如适用,添加截图以帮助说明问题。
## 其他信息
任何其他相关的上下文信息。
## 检查清单
- [ ] 已搜索现有 Issue确认问题未被报告
- [ ] 已使用最新版本测试
- [ ] 已提供完整的复现步骤

View File

@@ -0,0 +1,51 @@
---
name: 功能请求
about: 提出新功能或改进建议
title: '[FEATURE] '
labels: enhancement
assignees: ''
---
## 功能描述
清晰简洁地描述所需的功能。
## 使用场景
描述此功能将解决什么问题或满足什么需求。
## 期望方案
描述期望的解决方案或实现方式。
## 备选方案
描述考虑过的其他替代方案。
## 实现建议
如有技术实现建议,请在此描述:
```python
# 示例代码或伪代码
```
## 相关资源
- 参考链接
- 相关文档
- 类似项目实现
## 优先级评估
| 指标 | 评估 |
|:---|:---|
| 影响范围 | 低 / 中 / 高 |
| 实现难度 | 低 / 中 / 高 |
| 紧迫程度 | 低 / 中 / 高 |
## 检查清单
- [ ] 已搜索现有 Issue确认功能未被请求
- [ ] 已考虑功能的向后兼容性
- [ ] 愿意参与此功能的开发(如适用)

89
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,89 @@
## 变更描述
简要描述本次 Pull Request 的变更内容。
## 变更类型
请勾选适用的选项:
- [ ] Bug 修复 (fix)
- [ ] 新功能 (feat)
- [ ] 文档更新 (docs)
- [ ] 代码重构 (refactor)
- [ ] 性能优化 (perf)
- [ ] 测试相关 (test)
- [ ] 构建/CI (build/ci)
- [ ] 其他 (chore)
## 关联 Issue
Closes #(issue number)
## 变更详情
### 主要变更
- 变更点 1
- 变更点 2
- 变更点 3
### 技术说明
如需要,提供技术实现的详细说明。
## 测试说明
描述如何测试这些变更:
1. 测试步骤 1
2. 测试步骤 2
3. 预期结果
### 测试覆盖
- [ ] 添加了单元测试
- [ ] 添加了集成测试
- [ ] 手动测试通过
## 截图/录屏
如适用,添加截图或录屏展示变更效果。
## 检查清单
### 代码质量
- [ ] 代码符合项目风格规范
- [ ] 通过 `black` 格式化检查
- [ ] 通过 `mypy` 类型检查
- [ ] 无 linting 错误
### 测试
- [ ] 所有现有测试通过
- [ ] 添加了必要的新测试
- [ ] 测试覆盖率未降低
### 文档
- [ ] 更新了相关代码注释
- [ ] 更新了 README如需要
- [ ] 更新了 CHANGELOG如需要
- [ ] 更新了 API 文档(如需要)
### 兼容性
- [ ] 向后兼容
- [ ] 已考虑跨平台兼容性
- [ ] 无破坏性变更(或已在 CHANGELOG 中说明)
## 其他说明
任何其他需要审查者注意的信息。
## 审查要点
请审查者重点关注:
1. 关注点 1
2. 关注点 2

75
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test (Python ${{ matrix.python-version }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install click tomli tomli-w nuitka pytest pytest-cov
- name: Run tests
run: |
pytest tests/ -v
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black isort
- name: Check formatting
run: |
black --check . --exclude='.venv|build|dist' || true
isort --check . --skip=.venv --skip=build --skip=dist || true
release:
name: Release
runs-on: ubuntu-latest
needs: test
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

39
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Documentation
on:
push:
branches: [ main ]
paths:
- 'docs/**'
- 'sikuwa/**'
- 'README.md'
jobs:
build-docs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[docs]"
- name: Build documentation
run: |
cd docs
make html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html