Skip to content

Commit f009a70

Browse files
SilverRainZcodex
andcommitted
chore: Update project template to sphinx-notes/cookiecutter@233a8daa
Co-authored-by: OpenAI <noreply@openai.com>
1 parent a6412f8 commit f009a70

19 files changed

Lines changed: 112 additions & 67 deletions

.cruft.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/sphinx-notes/cookiecutter",
3-
"commit": "62cd96195962da3392cdc34125c95e9144a5f5ca",
3+
"commit": "233a8daa4e276a9559975a51178f29e7079dcafd",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {
@@ -12,6 +12,8 @@
1212
"version": "1.5",
1313
"github_owner": "sphinx-notes",
1414
"github_repo": "strike",
15+
"generated_file_header": "This file is generated from sphinx-notes/cookiecutter.",
16+
"dont_edit_header": "DO NOT EDIT.",
1517
"pypi_name": "sphinxnotes-strike",
1618
"pypi_owner": "SilverRainZ",
1719
"is_python_project": true,
@@ -20,7 +22,7 @@
2022
"sphinx_version": "7.0",
2123
"development_status": "3 - Alpha",
2224
"_template": "https://github.com/sphinx-notes/cookiecutter",
23-
"_commit": "62cd96195962da3392cdc34125c95e9144a5f5ca"
25+
"_commit": "233a8daa4e276a9559975a51178f29e7079dcafd"
2426
}
2527
},
2628
"directory": null

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is generated from sphinx-notes/cookiecutter.
2+
13
# Byte-compiled / optimized / DLL files
24
__pycache__/
35
*.py[cod]

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is generated from sphinx-notes/cookiecutter.
2+
13
repos:
24
- repo: https://github.com/astral-sh/ruff-pre-commit
35
rev: v0.14.11

AGENTS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!-- This file is generated from sphinx-notes/cookiecutter. -->
2+
3+
## 基本说明
4+
5+
这是一个由 SphinxNotes 开发的 Sphinx Extension,由 `sphinxnotes/cookiecutter` 生成,很多基础文件来自模板。
6+
7+
## 首先阅读
8+
9+
- 开始了解项目时,优先阅读 `docs/index.rst`
10+
- 如果任务和文档、Sphinx 配置或示例有关,继续阅读 `docs/` 下的其他文件
11+
12+
## 通用知识
13+
14+
- 使用 `make` 会构建 `docs/` 下的文档,文档自依赖当前项目,因此文档构建成功也意味着项目基本能正常构建
15+
- `docs/_build` 存放构建好的文档,`make clean` 清除所有构建结果
16+
- `make test` 运行测试,测试位于 `tests/`,可能的 e2e 测试位于 `tests/test_e2e.py`
17+
- `make doctest` 运行 Sphinx 文档测试
18+
- `make install` 使用 `pip install --user` 将项目安装到本地,跨项目测试时常用
19+
- `make tmpl-*` 用于模板同步,参看 "模板同步" 小节
20+
21+
## 关于 SphinxNotes 项目
22+
23+
- 同为 `sphinxnotes` 项目的其他仓库通常位于当前项目的上一级目录
24+
- 如果你在阅读代码时遇到本地依赖、模板来源或跨仓库复用关系,可以直接读取这些本地仓库文件,不必先猜测实现,也不必优先去远程搜索。
25+
- 当我提到 "所有项目" 的时候,请从当前项目的上一级目录的 `cookiecutter/project-list.txt` 获取项目列表
26+
- `docs/conf.py` 往往会直接从源码树导入当前项目,因此排查文档构建问题时,要同时检查运行时依赖和文档依赖。
27+
28+
## 模板同步
29+
30+
- 先确认任务是当前项目问题,还是模板问题;如果是模板问题,优先在 `sphinxnotes/cookiecutter` 中修复。
31+
- 模板变更完成后,优先使用 `make tmpl-update` 把改动同步回项目,而不是手工重复修改生成文件。
32+
- 如果 `make tmpl-update` 产生 `.rej`、冲突或三方合并失败,优先尝试 `make tmpl-apply-rej`,再手工解决冲突。
33+
- 手工解决冲突时,重点检查 `README.rst``pyproject.toml``.github/workflows/``docs/conf.py``docs/requirements.txt` 这些常见受影响文件。
34+
- 当模板同步结果确认无误后,优先使用 `make tmpl-update-done` 完成后续收尾步骤。
35+
36+
### 修改约定
37+
38+
- 修改模板生成文件时,保留原有注释,除非模板本身已经统一移除了这些注释。
39+
- 遇到 `CUSTOM ... START` / `END` 这类用户自定义区块时,必须保留这些锚点,并尽量保留区块中的用户内容。
40+
- 如果模板更新和项目内手工修改发生冲突,优先保护用户自定义内容,再整理模板变更。

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# This file is generated from sphinx-notes/cookiecutter.
2-
# You need to consider modifying the TEMPLATE or modifying THIS FILE.
32

43
include LICENSE
54
include README.rst

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# This file is generated from sphinx-notes/cookiecutter.
2-
# You need to consider modifying the TEMPLATE or modifying THIS FILE.
32

43
LANG = en_US.UTF-8
54

README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.. This file is generated from sphinx-notes/cookiecutter.
2-
You need to consider modifying the TEMPLATE or modifying THIS FILE.
32
43
==================
54
sphinxnotes-strike

docs/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# This file is generated from sphinx-notes/cookiecutter.
2-
# You need to consider modifying the TEMPLATE or modifying THIS FILE.
32

43
# Minimal makefile for Sphinx documentation
54

docs/_images/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This file is generated from sphinx-notes/cookiecutter.

docs/_static/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This file is generated from sphinx-notes/cookiecutter.

0 commit comments

Comments
 (0)