excel-codegen 0.9.0__tar.gz → 0.9.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/CHANGELOG.md +30 -1
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/PKG-INFO +16 -4
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/README.md +15 -3
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/docs/publishing.md +41 -1
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/docs/template_guide.md +1 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/__init__.py +1 -1
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen.egg-info/PKG-INFO +16 -4
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/pyproject.toml +1 -1
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/uv.lock +1 -1
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/.python-version +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/LICENSE +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/MANIFEST.in +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/docs/cli.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/docs/setup.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/__main__.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/cli.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/derived.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/example_pack.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/README.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/ABS_FPI_load_cases.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/ABS_FPI_load_cases_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/ABS_FPI_load_cases_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/README.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_external.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_external.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_external_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_external_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_internal.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_internal.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_internal_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_internal_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/compose.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/COT1-d20.559-mu60.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/COT1-d20.559-mu60_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/EXT-T15-mu0-kf-1.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/EXT-T15-mu0-kf-1_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/EXT-T15-mu90-kf+1.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/EXT-T15-mu90-kf+1_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/EXT-T20.559-mu90-kf+1.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/EXT-T20.559-mu90-kf+1_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/WBT6-d15.059-mu0.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/WBT6-d15.059-mu0_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/WBT6-d8-mu90.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/WBT6-d8-mu90_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/WBT7-d20.559-mu90.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/WBT7-d20.559-mu90_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/templates/ext_body.js.j2 +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/templates/ext_summary.md.j2 +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/templates/int_body.js.j2 +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/templates/int_summary.md.j2 +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/example.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/example_formula.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/generated/uart_init_Case1.c +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/generated/uart_init_Case2.c +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/generated/uart_summary_Case1.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/generated/uart_summary_Case2.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/generated_formula/uart_init_Case1.c +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/generated_formula/uart_init_Case2.c +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/generated_formula/uart_pins_Case1.csv +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/generated_formula/uart_pins_Case2.csv +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/template.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/template_formula.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/template_formula_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/template_formula_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/template_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/template_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/case_control.deck +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_01_LC1.inc +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_02_LC2.inc +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_03_LC3.inc +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_04_COMB4.inc +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_05_LC5.inc +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_summary_01_LC1.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_summary_02_LC2.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_summary_03_LC3.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_summary_04_COMB4.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_summary_05_LC5.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/nastran_case_control.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/nastran_case_control.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/nastran_case_control_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/nastran_case_control_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/excel_io.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/formula.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/formula_eval.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/jinja_env.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/models.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/renderer.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/utils.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen.egg-info/SOURCES.txt +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen.egg-info/dependency_links.txt +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen.egg-info/entry_points.txt +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen.egg-info/requires.txt +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen.egg-info/top_level.txt +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/setup.cfg +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/setup.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/conftest.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_abs_fpi_group.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_asserts.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_check_report.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_cli.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_comments.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_constraints.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_derived.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_doctor.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_engine_default.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_examples_command.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_excel_io.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_extends.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_formula.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_formula_eval.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_formula_if.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_group.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_include.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_local_direction.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_nastran_case_control.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_renderer.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_run_scripts.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.1}/tests/test_setup_script.py +0 -0
|
@@ -4,11 +4,30 @@
|
|
|
4
4
|
0.3.0 加公式模式 → 0.4.0 补齐公式模式的验证链 → 0.5.0 派生参数 → 0.5.x 跨平台与文档 →
|
|
5
5
|
0.6.0 取值约束 / `extends` / 行内 `{% if %}` / 质量护栏 → 0.7.0 校验与复用补齐 →
|
|
6
6
|
0.8.0 行列风格 / 成员表落地 / NASTRAN 工况控制 → 0.8.1 环境体检(`setup.sh`)→
|
|
7
|
-
0.9.0 内置示例随包发布(`excel-codegen examples
|
|
7
|
+
0.9.0 内置示例随包发布(`excel-codegen examples`)→ 0.9.1 文档修正。逐条实测证据见
|
|
8
8
|
[`abs_fpi/FINDINGS.md`](abs_fpi/FINDINGS.md)。
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
+
## 0.9.1 — 文档修正:PyPI 项目描述(2026-09-30)
|
|
13
|
+
|
|
14
|
+
**纯文档,工具行为无变化。**
|
|
15
|
+
|
|
16
|
+
0.9.0 是本项目首个 PyPI 版本,但它的项目描述取自**打包那一刻的 README**,而那版 README
|
|
17
|
+
还写着"PyPI 发布流程已就绪、**尚未首次发布**" —— 在一本已经发布的页面上自相矛盾。
|
|
18
|
+
PyPI 的项目描述不能事后编辑,只能发新版本覆盖,于是有了这个补丁版。
|
|
19
|
+
|
|
20
|
+
* README「安装」拆成两路:**只是要用**(`uv tool install` / `pipx install` /
|
|
21
|
+
`pip install excel-codegen`)与**改工具本身**(克隆 + `pip install -e ".[dev]"`),
|
|
22
|
+
并注记当前版本;
|
|
23
|
+
* [`docs/publishing.md`](docs/publishing.md) 记下首次发布已完成,并新增
|
|
24
|
+
**「排错:`invalid-publisher`」**:含义(OIDC token 有效,但 PyPI 上没有对得上的
|
|
25
|
+
publisher;**一个字节都没上传,版本没被烧**)、对着日志里的 OIDC claims 逐字核对的
|
|
26
|
+
5 个字段、两个最常见的错法(Workflow name 写成 `.github/workflows/release.yml`、
|
|
27
|
+
Environment name 留空),以及改完怎么重发(`rerun-failed-jobs`,或删 tag 重推)。
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
12
31
|
## 0.9.0 — 内置示例随包发布 + `excel-codegen examples`(2026-09-30)
|
|
13
32
|
|
|
14
33
|
这一版把"干过真活的用例"变成**软件自带的东西**:装了 pip 包、没克隆仓库的人也能直接跑。
|
|
@@ -88,6 +107,16 @@ sdist 解包后 `pytest` 全过;`abs_fpi/build.py --check` 公式求值 28 项
|
|
|
88
107
|
三个工作簿 `check` 全过;探针 A–H / G / N 全部通过;
|
|
89
108
|
净 venv 只装 wheel 后 `examples --copy` / `check` / `render` / `init` / `*_render.sh` 全走通。
|
|
90
109
|
|
|
110
|
+
### 已发布
|
|
111
|
+
|
|
112
|
+
**0.9.0 是本项目首个 PyPI 版本**(tag `v0.9.0` → `release.yml` → Trusted Publishing,
|
|
113
|
+
仓库里不存任何 token):<https://pypi.org/project/excel-codegen/0.9.0/>
|
|
114
|
+
|
|
115
|
+
发布后做了一次**从 PyPI 装**的闭环验证(不是从本地 dist):干净 venv 里
|
|
116
|
+
`pip install excel-codegen` → `examples --copy` → 对随包发布的 `abs_fpi_internal.xlsx`
|
|
117
|
+
跑 `check`(OK)→ `render --outdir` 导出 → `init` 生成新工作簿;
|
|
118
|
+
`uv tool install excel-codegen` 同样通过。
|
|
119
|
+
|
|
91
120
|
---
|
|
92
121
|
|
|
93
122
|
## 0.8.1 — 坏掉的旧 venv 必须在装依赖之前被拦住(2026-09-30)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: excel_codegen
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.1
|
|
4
4
|
Summary: Excel 模板参数填写 + Jinja2 代码生成器(支持 Prefix/Value/Suffix 组合)
|
|
5
5
|
Author: JG. Luo
|
|
6
6
|
License-Expression: MIT
|
|
@@ -142,6 +142,19 @@ excel-codegen render -c examples/basic/example_formula.yaml \
|
|
|
142
142
|
|
|
143
143
|
需要 **Python 3.11+**(Windows / Linux / macOS 均可)。
|
|
144
144
|
|
|
145
|
+
**只是要用它**(不克隆仓库):
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
uv tool install excel-codegen # 推荐
|
|
149
|
+
pipx install excel-codegen # 或
|
|
150
|
+
pip install excel-codegen # 或
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`),
|
|
154
|
+
`excel-codegen examples --copy ./examples` 就能拿到带工作簿的示例。
|
|
155
|
+
|
|
156
|
+
**改这个工具本身**(开发):
|
|
157
|
+
|
|
145
158
|
```bash
|
|
146
159
|
# 推荐:uv —— 不用建 venv、不用 pip、不用管本机 Python 版本
|
|
147
160
|
curl -LsSf https://astral.sh/uv/install.sh | sh # Windows 见 docs/setup.md
|
|
@@ -151,11 +164,10 @@ python3 -m venv ~/.venvs/excel_codegen && source ~/.venvs/excel_codegen/bin/acti
|
|
|
151
164
|
pip install -e ".[dev]"
|
|
152
165
|
```
|
|
153
166
|
|
|
154
|
-
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`)。
|
|
155
167
|
跨平台细节、外置盘注意事项与 Python 版本策略见 [`docs/setup.md`](docs/setup.md)。
|
|
156
168
|
|
|
157
|
-
> **PyPI
|
|
158
|
-
>
|
|
169
|
+
> **已发布到 PyPI**:当前版本 **0.9.1**([PyPI 页面](https://pypi.org/project/excel-codegen/))。
|
|
170
|
+
> 之后的发版流程(Trusted Publishing,仓库里不存 token)见 [`docs/publishing.md`](docs/publishing.md)。
|
|
159
171
|
|
|
160
172
|
## 开发
|
|
161
173
|
|
|
@@ -109,6 +109,19 @@ excel-codegen render -c examples/basic/example_formula.yaml \
|
|
|
109
109
|
|
|
110
110
|
需要 **Python 3.11+**(Windows / Linux / macOS 均可)。
|
|
111
111
|
|
|
112
|
+
**只是要用它**(不克隆仓库):
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
uv tool install excel-codegen # 推荐
|
|
116
|
+
pipx install excel-codegen # 或
|
|
117
|
+
pip install excel-codegen # 或
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`),
|
|
121
|
+
`excel-codegen examples --copy ./examples` 就能拿到带工作簿的示例。
|
|
122
|
+
|
|
123
|
+
**改这个工具本身**(开发):
|
|
124
|
+
|
|
112
125
|
```bash
|
|
113
126
|
# 推荐:uv —— 不用建 venv、不用 pip、不用管本机 Python 版本
|
|
114
127
|
curl -LsSf https://astral.sh/uv/install.sh | sh # Windows 见 docs/setup.md
|
|
@@ -118,11 +131,10 @@ python3 -m venv ~/.venvs/excel_codegen && source ~/.venvs/excel_codegen/bin/acti
|
|
|
118
131
|
pip install -e ".[dev]"
|
|
119
132
|
```
|
|
120
133
|
|
|
121
|
-
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`)。
|
|
122
134
|
跨平台细节、外置盘注意事项与 Python 版本策略见 [`docs/setup.md`](docs/setup.md)。
|
|
123
135
|
|
|
124
|
-
> **PyPI
|
|
125
|
-
>
|
|
136
|
+
> **已发布到 PyPI**:当前版本 **0.9.1**([PyPI 页面](https://pypi.org/project/excel-codegen/))。
|
|
137
|
+
> 之后的发版流程(Trusted Publishing,仓库里不存 token)见 [`docs/publishing.md`](docs/publishing.md)。
|
|
126
138
|
|
|
127
139
|
## 开发
|
|
128
140
|
|
|
@@ -79,6 +79,9 @@ git push -u origin main
|
|
|
79
79
|
用 **Trusted Publishing(OIDC)** —— 仓库里不存任何 token,GitHub 每次发布时向 PyPI
|
|
80
80
|
换一张短期凭据。
|
|
81
81
|
|
|
82
|
+
> ✅ **首次发布已完成**:`v0.9.0` → <https://pypi.org/project/excel-codegen/0.9.0/>
|
|
83
|
+
> 下面的一次性配置留档,之后每次发版直接跳到「每次发版」。
|
|
84
|
+
|
|
82
85
|
### 一次性配置(只在第一次做)
|
|
83
86
|
|
|
84
87
|
1. **注册 PyPI 账号**并开启两步验证(发版必需)。
|
|
@@ -94,7 +97,6 @@ git push -u origin main
|
|
|
94
97
|
|
|
95
98
|
> 项目名写成 `excel-codegen`(连字符)是因为**分发的名字**与**导入的名字**可以不同:
|
|
96
99
|
> `pip install excel-codegen` 装进来的是 `import excel_codegen`。
|
|
97
|
-
> 已确认 PyPI 上 `excel-codegen` 与 `excel_codegen` 都还没被占用。
|
|
98
100
|
3. GitHub 仓库 → Settings → Environments → 新建一个叫 **`pypi`** 的环境
|
|
99
101
|
(可以顺手加 "Required reviewers",发版前多一道人工确认)。
|
|
100
102
|
4. 确认 `pyproject.toml` 的 `[project.urls]` 都是真地址(占位符在 PyPI 页面上会变成
|
|
@@ -134,4 +136,42 @@ pipx install excel-codegen
|
|
|
134
136
|
pip install excel-codegen
|
|
135
137
|
```
|
|
136
138
|
|
|
139
|
+
> 装完 `excel-codegen examples --copy ./examples` 就能拿到带工作簿的内置示例。
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
### 排错:`invalid-publisher`
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
Trusted publishing exchange failure:
|
|
147
|
+
* `invalid-publisher`: valid token, but no corresponding publisher
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**含义**:OIDC token 本身没问题(签名有效),只是 PyPI 上**没有能对上的 (pending) publisher**。
|
|
151
|
+
**一个字节都没上传**,所以版本号没有被烧掉 —— 改完直接重跑即可。
|
|
152
|
+
|
|
153
|
+
对着日志里渲染出来的 claims 逐字核对 PyPI 表单(下面是 `v0.9.0` 的实际值):
|
|
154
|
+
|
|
155
|
+
| 日志里的 claim | PyPI 表单字段 | 实际值 |
|
|
156
|
+
| --- | --- | --- |
|
|
157
|
+
| `repository_owner` | Owner | `Dog-Chest` |
|
|
158
|
+
| `repository` | Repository name | `excel_codegen`(**下划线**) |
|
|
159
|
+
| `workflow_ref` 的文件名 | Workflow name | `release.yml`(**只写文件名**,别写路径) |
|
|
160
|
+
| `environment` | Environment name | `pypi`(**留空就对不上**) |
|
|
161
|
+
| 发行包 METADATA 的 `Name` | PyPI Project Name | `excel_codegen` → 归一化成 `excel-codegen` |
|
|
162
|
+
|
|
163
|
+
最常见的两个错:**Workflow name 写成 `.github/workflows/release.yml`**、
|
|
164
|
+
**Environment name 留空**(workflow 里用的是 `pypi`)。
|
|
165
|
+
另外确认加的是 **pypi.org 生产站**的 pending publisher,不是 TestPyPI 的。
|
|
166
|
+
|
|
167
|
+
**改完怎么重发**(不用重新走一遍 build):
|
|
168
|
+
|
|
169
|
+
1. 首选:Actions 页面打开上次失败的 run → **Re-run failed jobs**
|
|
170
|
+
(用 API 则是 `POST /repos/{owner}/{repo}/actions/runs/{id}/rerun-failed-jobs`,
|
|
171
|
+
需要 `actions: write` 权限的 token);
|
|
172
|
+
2. 没有那个权限时:**删掉 tag 再重推**,同样安全(版本没烧):
|
|
173
|
+
```bash
|
|
174
|
+
git push origin --delete v0.9.0 && git push origin v0.9.0
|
|
175
|
+
```
|
|
176
|
+
|
|
137
177
|
这样同事就不需要克隆仓库了 —— 「多平台零配置」这条线到此才算闭环。
|
|
@@ -776,6 +776,7 @@ Prefix/Suffix 是按变量(不是按 Case)生效的。见 4.4:再加一个
|
|
|
776
776
|
| **0.8.0** | **行列风格 `excel.local_direction`**:Local 表可切成“一行一个工况”(见 §19);公式模式与求值器支持二维 `INDEX` / 行区间 `MATCH`;**`filename` 里可用任意参数**;abs_fpi 舱数据改用成员表;新增 NASTRAN 工况控制用例(§20) |
|
|
777
777
|
| 0.8.1 | 只动开发环境脚本 `setup.sh` 与测试:复用旧 venv 之前先体检(解释器版本 / `site-packages` / `pip`),拦住在换过 Python 后"能执行却什么也 import 不到"的坏环境(见 `docs/setup.md`)。**工具行为无变化** |
|
|
778
778
|
| **0.9.0** | **内置示例随包发布 + 新增 `excel-codegen examples`**:`basic` / `nastran` / `abs_fpi` 三个示例(含已填好样例参数的工作簿)进 wheel 与 sdist,`--copy DIR` 一键拷出 —— 装了 pip 包、没克隆仓库的人也能用(见 [`excel_codegen/examples/README.md`](../excel_codegen/examples/README.md));`docs/setup.md` 补 Windows 用法。另修一个真 bug:**`setup.sh` 在 macOS(bash 3.2)上第一屏就 `unbound variable` 退出** —— `$VAR` 紧邻中文要写成 `${VAR}` |
|
|
779
|
+
| 0.9.1 | 纯文档:0.9.0 的 PyPI 项目描述取自打包时的 README,上面还写着"尚未首次发布",发这个补丁版覆盖;README「安装」拆成"只是要用 / 改工具本身"两路;`docs/publishing.md` 记下首次发布并新增 `invalid-publisher` 排错。**工具行为无变化** |
|
|
779
780
|
|
|
780
781
|
---
|
|
781
782
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: excel_codegen
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.1
|
|
4
4
|
Summary: Excel 模板参数填写 + Jinja2 代码生成器(支持 Prefix/Value/Suffix 组合)
|
|
5
5
|
Author: JG. Luo
|
|
6
6
|
License-Expression: MIT
|
|
@@ -142,6 +142,19 @@ excel-codegen render -c examples/basic/example_formula.yaml \
|
|
|
142
142
|
|
|
143
143
|
需要 **Python 3.11+**(Windows / Linux / macOS 均可)。
|
|
144
144
|
|
|
145
|
+
**只是要用它**(不克隆仓库):
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
uv tool install excel-codegen # 推荐
|
|
149
|
+
pipx install excel-codegen # 或
|
|
150
|
+
pip install excel-codegen # 或
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`),
|
|
154
|
+
`excel-codegen examples --copy ./examples` 就能拿到带工作簿的示例。
|
|
155
|
+
|
|
156
|
+
**改这个工具本身**(开发):
|
|
157
|
+
|
|
145
158
|
```bash
|
|
146
159
|
# 推荐:uv —— 不用建 venv、不用 pip、不用管本机 Python 版本
|
|
147
160
|
curl -LsSf https://astral.sh/uv/install.sh | sh # Windows 见 docs/setup.md
|
|
@@ -151,11 +164,10 @@ python3 -m venv ~/.venvs/excel_codegen && source ~/.venvs/excel_codegen/bin/acti
|
|
|
151
164
|
pip install -e ".[dev]"
|
|
152
165
|
```
|
|
153
166
|
|
|
154
|
-
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`)。
|
|
155
167
|
跨平台细节、外置盘注意事项与 Python 版本策略见 [`docs/setup.md`](docs/setup.md)。
|
|
156
168
|
|
|
157
|
-
> **PyPI
|
|
158
|
-
>
|
|
169
|
+
> **已发布到 PyPI**:当前版本 **0.9.1**([PyPI 页面](https://pypi.org/project/excel-codegen/))。
|
|
170
|
+
> 之后的发版流程(Trusted Publishing,仓库里不存 token)见 [`docs/publishing.md`](docs/publishing.md)。
|
|
159
171
|
|
|
160
172
|
## 开发
|
|
161
173
|
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "excel_codegen"
|
|
8
|
-
version = "0.9.
|
|
8
|
+
version = "0.9.1"
|
|
9
9
|
description = "Excel 模板参数填写 + Jinja2 代码生成器(支持 Prefix/Value/Suffix 组合)"
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
# 支持下限 = **CI 真正测过的最老版本**(见 .github/workflows/ci.yml)。
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/ABS_FPI_load_cases.xlsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_external.xlsx
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_external.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_internal.xlsx
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/abs_fpi_internal.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/generated/WBT6-d8-mu90.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/templates/ext_body.js.j2
RENAMED
|
File without changes
|
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/abs_fpi/templates/int_body.js.j2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/example_formula.yaml
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/generated/uart_init_Case1.c
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/generated/uart_init_Case2.c
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/template_formula.xlsx
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/template_formula_render.bat
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/template_formula_render.sh
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/basic/template_render.bat
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_01_LC1.inc
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_02_LC2.inc
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_03_LC3.inc
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_04_COMB4.inc
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/generated/cc_05_LC5.inc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/nastran_case_control.xlsx
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.1}/excel_codegen/examples/nastran/nastran_case_control.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|