excel-codegen 0.9.0__tar.gz → 0.9.2__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.2}/CHANGELOG.md +43 -1
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/MANIFEST.in +1 -0
- excel_codegen-0.9.2/NOTICE.md +56 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/PKG-INFO +46 -6
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/README.md +44 -5
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/docs/publishing.md +41 -1
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/docs/template_guide.md +1 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/__init__.py +1 -1
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/README.md +13 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen.egg-info/PKG-INFO +46 -6
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen.egg-info/SOURCES.txt +1 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/pyproject.toml +3 -2
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/uv.lock +1 -1
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/.python-version +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/LICENSE +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/docs/cli.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/docs/setup.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/__main__.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/cli.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/derived.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/example_pack.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/README.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/ABS_FPI_load_cases.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/ABS_FPI_load_cases_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/ABS_FPI_load_cases_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/abs_fpi.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/abs_fpi_external.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/abs_fpi_external.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/abs_fpi_external_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/abs_fpi_external_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/abs_fpi_internal.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/abs_fpi_internal.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/abs_fpi_internal_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/abs_fpi_internal_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/compose.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/COT1-d20.559-mu60.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/COT1-d20.559-mu60_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/EXT-T15-mu0-kf-1.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/EXT-T15-mu0-kf-1_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/EXT-T15-mu90-kf+1.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/EXT-T15-mu90-kf+1_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/EXT-T20.559-mu90-kf+1.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/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.2}/excel_codegen/examples/abs_fpi/generated/WBT6-d15.059-mu0.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/WBT6-d15.059-mu0_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/WBT6-d8-mu90.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/WBT6-d8-mu90_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/WBT7-d20.559-mu90.js +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/generated/WBT7-d20.559-mu90_summary.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/templates/ext_body.js.j2 +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/templates/ext_summary.md.j2 +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/templates/int_body.js.j2 +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/templates/int_summary.md.j2 +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/example.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/example_formula.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/generated/uart_init_Case1.c +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/generated/uart_init_Case2.c +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/generated/uart_summary_Case1.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/generated/uart_summary_Case2.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/generated_formula/uart_init_Case1.c +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/generated_formula/uart_init_Case2.c +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/generated_formula/uart_pins_Case1.csv +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/generated_formula/uart_pins_Case2.csv +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/template.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/template_formula.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/template_formula_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/template_formula_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/template_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/template_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/case_control.deck +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_01_LC1.inc +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_02_LC2.inc +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_03_LC3.inc +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_04_COMB4.inc +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_05_LC5.inc +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_summary_01_LC1.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_summary_02_LC2.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_summary_03_LC3.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_summary_04_COMB4.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_summary_05_LC5.md +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/nastran_case_control.xlsx +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/nastran_case_control.yaml +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/nastran_case_control_render.bat +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/nastran_case_control_render.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/excel_io.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/formula.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/formula_eval.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/jinja_env.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/models.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/renderer.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/utils.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen.egg-info/dependency_links.txt +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen.egg-info/entry_points.txt +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen.egg-info/requires.txt +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen.egg-info/top_level.txt +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/setup.cfg +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/setup.sh +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/conftest.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_abs_fpi_group.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_asserts.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_check_report.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_cli.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_comments.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_constraints.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_derived.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_doctor.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_engine_default.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_examples_command.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_excel_io.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_extends.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_formula.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_formula_eval.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_formula_if.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_group.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_include.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_local_direction.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_nastran_case_control.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_renderer.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_run_scripts.py +0 -0
- {excel_codegen-0.9.0 → excel_codegen-0.9.2}/tests/test_setup_script.py +0 -0
|
@@ -4,9 +4,41 @@
|
|
|
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
|
+
---
|
|
11
|
+
## 0.9.2 — 弃用跳板:项目已改名为 spreadsheet_codegen(2026-09-30)
|
|
12
|
+
|
|
13
|
+
**本版本不再演进,功能与 0.9.1 完全相同。**
|
|
14
|
+
|
|
15
|
+
项目改名为 **`spreadsheet_codegen`**(PyPI:`spreadsheet-codegen`),原因是旧名里带
|
|
16
|
+
Microsoft 的商标 "Excel",作为**产品名**使用存在商标风险(PyPI 的 Acceptable Use Policy
|
|
17
|
+
禁止侵犯商标,且处罚不可申诉)。完整的排查与法律声明见 `NOTICE.md`。
|
|
18
|
+
|
|
19
|
+
* 请改用:`pip install spreadsheet-codegen` / `uv tool install spreadsheet-codegen`
|
|
20
|
+
* 新项目:<https://pypi.org/project/spreadsheet-codegen/>
|
|
21
|
+
* **旧名 `excel-codegen` 的所有版本随后会被 yank**(新装的人装不到,已被锁定的依赖不受影响)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 0.9.1 — 文档修正:PyPI 项目描述(2026-09-30)
|
|
26
|
+
|
|
27
|
+
**纯文档,工具行为无变化。**
|
|
28
|
+
|
|
29
|
+
0.9.0 是本项目首个 PyPI 版本,但它的项目描述取自**打包那一刻的 README**,而那版 README
|
|
30
|
+
还写着"PyPI 发布流程已就绪、**尚未首次发布**" —— 在一本已经发布的页面上自相矛盾。
|
|
31
|
+
PyPI 的项目描述不能事后编辑,只能发新版本覆盖,于是有了这个补丁版。
|
|
32
|
+
|
|
33
|
+
* README「安装」拆成两路:**只是要用**(`uv tool install` / `pipx install` /
|
|
34
|
+
`pip install excel-codegen`)与**改工具本身**(克隆 + `pip install -e ".[dev]"`),
|
|
35
|
+
并注记当前版本;
|
|
36
|
+
* [`docs/publishing.md`](docs/publishing.md) 记下首次发布已完成,并新增
|
|
37
|
+
**「排错:`invalid-publisher`」**:含义(OIDC token 有效,但 PyPI 上没有对得上的
|
|
38
|
+
publisher;**一个字节都没上传,版本没被烧**)、对着日志里的 OIDC claims 逐字核对的
|
|
39
|
+
5 个字段、两个最常见的错法(Workflow name 写成 `.github/workflows/release.yml`、
|
|
40
|
+
Environment name 留空),以及改完怎么重发(`rerun-failed-jobs`,或删 tag 重推)。
|
|
41
|
+
|
|
10
42
|
---
|
|
11
43
|
|
|
12
44
|
## 0.9.0 — 内置示例随包发布 + `excel-codegen examples`(2026-09-30)
|
|
@@ -88,6 +120,16 @@ sdist 解包后 `pytest` 全过;`abs_fpi/build.py --check` 公式求值 28 项
|
|
|
88
120
|
三个工作簿 `check` 全过;探针 A–H / G / N 全部通过;
|
|
89
121
|
净 venv 只装 wheel 后 `examples --copy` / `check` / `render` / `init` / `*_render.sh` 全走通。
|
|
90
122
|
|
|
123
|
+
### 已发布
|
|
124
|
+
|
|
125
|
+
**0.9.0 是本项目首个 PyPI 版本**(tag `v0.9.0` → `release.yml` → Trusted Publishing,
|
|
126
|
+
仓库里不存任何 token):<https://pypi.org/project/excel-codegen/0.9.0/>
|
|
127
|
+
|
|
128
|
+
发布后做了一次**从 PyPI 装**的闭环验证(不是从本地 dist):干净 venv 里
|
|
129
|
+
`pip install excel-codegen` → `examples --copy` → 对随包发布的 `abs_fpi_internal.xlsx`
|
|
130
|
+
跑 `check`(OK)→ `render --outdir` 导出 → `init` 生成新工作簿;
|
|
131
|
+
`uv tool install excel-codegen` 同样通过。
|
|
132
|
+
|
|
91
133
|
---
|
|
92
134
|
|
|
93
135
|
## 0.8.1 — 坏掉的旧 venv 必须在装依赖之前被拦住(2026-09-30)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# 商标、版权与免责声明(NOTICE)
|
|
2
|
+
|
|
3
|
+
本文件是 [excel_codegen](README.md) 的法律声明汇总。
|
|
4
|
+
|
|
5
|
+
> **本项目与下列任何厂商均无关联,也未获得其赞助、认可或背书。**
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. 商标归属
|
|
10
|
+
|
|
11
|
+
文档与示例中会出现下列名称。它们仅用于**说明兼容性、或说明所依据的规范**(描述性 /
|
|
12
|
+
指示性使用),相关商标归各自所有者所有:
|
|
13
|
+
|
|
14
|
+
| 名称 | 商标所有者 | 在本项目中的用途 |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| Microsoft Excel / Excel | Microsoft Corporation | 说明本工具生成与读写的是 Excel 工作簿(`.xlsx`) |
|
|
17
|
+
| NASTRAN | MSC Software Corporation(最初由 NASA 开发) | 说明示例生成的是 NASTRAN 工况控制语句 |
|
|
18
|
+
| GeniE | DNV AS | 说明示例生成的是 GeniE 的 JavaScript 函数体 |
|
|
19
|
+
| ABS(含 ABS FPI / Rules for Building and Classing) | American Bureau of Shipping | 说明示例实现的是一种船级社规范的载荷计算方法 |
|
|
20
|
+
| WPS | 金山办公(Kingsoft Office) | 说明生成的工作簿也能用 WPS 打开 |
|
|
21
|
+
| STM32 | STMicroelectronics | 示例中的 MCU 名称,仅作举例 |
|
|
22
|
+
| Python、PyPI | Python Software Foundation | 运行环境与分发平台 |
|
|
23
|
+
|
|
24
|
+
**本项目不使用**上述任何厂商的 logo、图标、字体或其他品牌视觉元素。
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. 关于规范文本与工程计算
|
|
29
|
+
|
|
30
|
+
`abs_fpi` 示例实现的是 **ABS《Rules for Building and Classing》**(5A-3-2/5.5 外压、
|
|
31
|
+
5.7 内压)中的面载荷计算方法。请注意:
|
|
32
|
+
|
|
33
|
+
* **规范文本本身受版权保护,版权归 American Bureau of Shipping 所有。** 本仓库只包含
|
|
34
|
+
为演示工具用法所必需的公式与系数,**不包含**规范原文、表格或图表;
|
|
35
|
+
* 使用者应**自行取得正式规范**,并以其为准;本项目的实现**未经 ABS 审核或认可**;
|
|
36
|
+
* 本项目**不是**任何船级社的送审工具,输出结果**不能替代**船级社的审查与批准。
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 3. 工程用途免责
|
|
41
|
+
|
|
42
|
+
本工具生成的是**工程计算代码**。生成结果可能因输入数据、模板版本、区域设置
|
|
43
|
+
(例如公式里 `TEXT()` 的数字格式串)等原因而与预期不符:
|
|
44
|
+
|
|
45
|
+
* **用于实际设计、建造或送审之前,必须由具备资格的人员独立复核**;
|
|
46
|
+
* 作者与贡献者**不对任何使用后果承担责任**(另见 [`LICENSE`](LICENSE) 的免责条款)。
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 4. 关于 AI 生成
|
|
51
|
+
|
|
52
|
+
本项目由 AI(DeepSeek)生成,人工负责提需求、定方向与验收(见 [README](README.md))。
|
|
53
|
+
|
|
54
|
+
请注意:纯 AI 生成内容在部分法域可能**不构成受版权保护的客体** —— 也就是说,
|
|
55
|
+
[`LICENSE`](LICENSE) 里的 MIT 授权对这部分内容未必可执行,你也未必能阻止他人复制。
|
|
56
|
+
这不影响你使用本项目,但会限制你**主张权利**。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: excel_codegen
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.2
|
|
4
4
|
Summary: Excel 模板参数填写 + Jinja2 代码生成器(支持 Prefix/Value/Suffix 组合)
|
|
5
5
|
Author: JG. Luo
|
|
6
6
|
License-Expression: MIT
|
|
@@ -18,6 +18,7 @@ Classifier: Topic :: Software Development :: Code Generators
|
|
|
18
18
|
Requires-Python: >=3.11
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
|
+
License-File: NOTICE.md
|
|
21
22
|
Requires-Dist: openpyxl>=3.1.2
|
|
22
23
|
Requires-Dist: jinja2>=3.1.2
|
|
23
24
|
Requires-Dist: pyyaml>=6.0
|
|
@@ -31,9 +32,23 @@ Requires-Dist: ruff>=0.6; extra == "dev"
|
|
|
31
32
|
Requires-Dist: mypy>=1.11; extra == "dev"
|
|
32
33
|
Dynamic: license-file
|
|
33
34
|
|
|
35
|
+
> # ⛔ 本项目已改名,请勿再使用
|
|
36
|
+
>
|
|
37
|
+
> **`excel-codegen` 已弃用**,请改用 **`spreadsheet-codegen`**:
|
|
38
|
+
>
|
|
39
|
+
> ```bash
|
|
40
|
+
> pip install spreadsheet-codegen # 或 uv tool install spreadsheet-codegen
|
|
41
|
+
> ```
|
|
42
|
+
>
|
|
43
|
+
> 改名原因:旧名里带 Microsoft 的商标 "Excel",存在被投诉下架的商标风险。
|
|
44
|
+
> 本版本(`0.9.2`)只是**弃用跳板** —— 功能与 `0.9.1` 完全相同,**不会再有任何更新**。
|
|
45
|
+
> 新项目:<https://pypi.org/project/spreadsheet-codegen/>
|
|
46
|
+
>
|
|
47
|
+
> ---
|
|
48
|
+
|
|
34
49
|
# excel_codegen
|
|
35
50
|
|
|
36
|
-
**在 Excel 里填参数,用 YAML + Jinja2 出代码。**
|
|
51
|
+
**在 Microsoft Excel 里填参数,用 YAML + Jinja2 出代码。**
|
|
37
52
|
|
|
38
53
|
[](https://github.com/Dog-Chest/excel_codegen/actions/workflows/ci.yml)
|
|
39
54
|

|
|
@@ -137,11 +152,25 @@ excel-codegen render -c examples/basic/example_formula.yaml \
|
|
|
137
152
|
| [`CHANGELOG.md`](CHANGELOG.md) | 版本变更历史 |
|
|
138
153
|
| [`abs_fpi/README.md`](abs_fpi/README.md) | 现场项目:怎么用、边界、四层校验链 |
|
|
139
154
|
| [`docs/publishing.md`](docs/publishing.md) | 维护者向:发布到 GitHub / PyPI、密钥与隐私 |
|
|
155
|
+
| [`NOTICE.md`](NOTICE.md) | **商标归属、规范版权与免责声明**(含 AI 生成与版权归属说明) |
|
|
140
156
|
|
|
141
157
|
## 安装
|
|
142
158
|
|
|
143
159
|
需要 **Python 3.11+**(Windows / Linux / macOS 均可)。
|
|
144
160
|
|
|
161
|
+
**只是要用它**(不克隆仓库):
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
uv tool install excel-codegen # 推荐
|
|
165
|
+
pipx install excel-codegen # 或
|
|
166
|
+
pip install excel-codegen # 或
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`),
|
|
170
|
+
`excel-codegen examples --copy ./examples` 就能拿到带工作簿的示例。
|
|
171
|
+
|
|
172
|
+
**改这个工具本身**(开发):
|
|
173
|
+
|
|
145
174
|
```bash
|
|
146
175
|
# 推荐:uv —— 不用建 venv、不用 pip、不用管本机 Python 版本
|
|
147
176
|
curl -LsSf https://astral.sh/uv/install.sh | sh # Windows 见 docs/setup.md
|
|
@@ -151,11 +180,10 @@ python3 -m venv ~/.venvs/excel_codegen && source ~/.venvs/excel_codegen/bin/acti
|
|
|
151
180
|
pip install -e ".[dev]"
|
|
152
181
|
```
|
|
153
182
|
|
|
154
|
-
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`)。
|
|
155
183
|
跨平台细节、外置盘注意事项与 Python 版本策略见 [`docs/setup.md`](docs/setup.md)。
|
|
156
184
|
|
|
157
|
-
> **PyPI
|
|
158
|
-
>
|
|
185
|
+
> **已发布到 PyPI**:当前版本 **0.9.1**([PyPI 页面](https://pypi.org/project/excel-codegen/))。
|
|
186
|
+
> 之后的发版流程(Trusted Publishing,仓库里不存 token)见 [`docs/publishing.md`](docs/publishing.md)。
|
|
159
187
|
|
|
160
188
|
## 开发
|
|
161
189
|
|
|
@@ -174,6 +202,18 @@ CI([配置](.github/workflows/ci.yml))在 **Windows / macOS / Linux × Pytho
|
|
|
174
202
|
> 语法错误,而在本地 3.12 上跑得好好的),`[tool.coverage.report]` 的 `fail_under = 85`
|
|
175
203
|
> 让覆盖率掉了就直接红。
|
|
176
204
|
|
|
205
|
+
## 商标与免责
|
|
206
|
+
|
|
207
|
+
* 本项目与 **Microsoft**、**MSC Software**、**DNV**、**ABS**、**金山办公**、**ST**
|
|
208
|
+
等厂商**均无关联**,也未获得其赞助或背书;文档中出现的产品名仅为说明兼容性或所依据
|
|
209
|
+
规范的**描述性使用**,相关商标归各自所有者所有;
|
|
210
|
+
* `abs_fpi` 示例依据 **ABS 规范**实现:**规范文本版权归 ABS 所有**,本仓库不含规范原文
|
|
211
|
+
与表格;该实现**未经 ABS 审核或认可**,使用前请自行取得正式规范并独立复核;
|
|
212
|
+
* 本工具生成的是**工程计算代码**:用于实际设计 / 建造 / 送审之前必须由具备资格的人员
|
|
213
|
+
独立复核,**不能替代**船级社审查;作者不对使用后果负责。
|
|
214
|
+
|
|
215
|
+
完整声明(含各商标的所有者清单、AI 生成与版权归属说明)见 [`NOTICE.md`](NOTICE.md)。
|
|
216
|
+
|
|
177
217
|
## License
|
|
178
218
|
|
|
179
|
-
MIT —— 见 [`LICENSE`](LICENSE)。
|
|
219
|
+
MIT —— 见 [`LICENSE`](LICENSE);商标、规范版权与免责声明见 [`NOTICE.md`](NOTICE.md)。
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
+
> # ⛔ 本项目已改名,请勿再使用
|
|
2
|
+
>
|
|
3
|
+
> **`excel-codegen` 已弃用**,请改用 **`spreadsheet-codegen`**:
|
|
4
|
+
>
|
|
5
|
+
> ```bash
|
|
6
|
+
> pip install spreadsheet-codegen # 或 uv tool install spreadsheet-codegen
|
|
7
|
+
> ```
|
|
8
|
+
>
|
|
9
|
+
> 改名原因:旧名里带 Microsoft 的商标 "Excel",存在被投诉下架的商标风险。
|
|
10
|
+
> 本版本(`0.9.2`)只是**弃用跳板** —— 功能与 `0.9.1` 完全相同,**不会再有任何更新**。
|
|
11
|
+
> 新项目:<https://pypi.org/project/spreadsheet-codegen/>
|
|
12
|
+
>
|
|
13
|
+
> ---
|
|
14
|
+
|
|
1
15
|
# excel_codegen
|
|
2
16
|
|
|
3
|
-
**在 Excel 里填参数,用 YAML + Jinja2 出代码。**
|
|
17
|
+
**在 Microsoft Excel 里填参数,用 YAML + Jinja2 出代码。**
|
|
4
18
|
|
|
5
19
|
[](https://github.com/Dog-Chest/excel_codegen/actions/workflows/ci.yml)
|
|
6
20
|

|
|
@@ -104,11 +118,25 @@ excel-codegen render -c examples/basic/example_formula.yaml \
|
|
|
104
118
|
| [`CHANGELOG.md`](CHANGELOG.md) | 版本变更历史 |
|
|
105
119
|
| [`abs_fpi/README.md`](abs_fpi/README.md) | 现场项目:怎么用、边界、四层校验链 |
|
|
106
120
|
| [`docs/publishing.md`](docs/publishing.md) | 维护者向:发布到 GitHub / PyPI、密钥与隐私 |
|
|
121
|
+
| [`NOTICE.md`](NOTICE.md) | **商标归属、规范版权与免责声明**(含 AI 生成与版权归属说明) |
|
|
107
122
|
|
|
108
123
|
## 安装
|
|
109
124
|
|
|
110
125
|
需要 **Python 3.11+**(Windows / Linux / macOS 均可)。
|
|
111
126
|
|
|
127
|
+
**只是要用它**(不克隆仓库):
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
uv tool install excel-codegen # 推荐
|
|
131
|
+
pipx install excel-codegen # 或
|
|
132
|
+
pip install excel-codegen # 或
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`),
|
|
136
|
+
`excel-codegen examples --copy ./examples` 就能拿到带工作簿的示例。
|
|
137
|
+
|
|
138
|
+
**改这个工具本身**(开发):
|
|
139
|
+
|
|
112
140
|
```bash
|
|
113
141
|
# 推荐:uv —— 不用建 venv、不用 pip、不用管本机 Python 版本
|
|
114
142
|
curl -LsSf https://astral.sh/uv/install.sh | sh # Windows 见 docs/setup.md
|
|
@@ -118,11 +146,10 @@ python3 -m venv ~/.venvs/excel_codegen && source ~/.venvs/excel_codegen/bin/acti
|
|
|
118
146
|
pip install -e ".[dev]"
|
|
119
147
|
```
|
|
120
148
|
|
|
121
|
-
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`)。
|
|
122
149
|
跨平台细节、外置盘注意事项与 Python 版本策略见 [`docs/setup.md`](docs/setup.md)。
|
|
123
150
|
|
|
124
|
-
> **PyPI
|
|
125
|
-
>
|
|
151
|
+
> **已发布到 PyPI**:当前版本 **0.9.1**([PyPI 页面](https://pypi.org/project/excel-codegen/))。
|
|
152
|
+
> 之后的发版流程(Trusted Publishing,仓库里不存 token)见 [`docs/publishing.md`](docs/publishing.md)。
|
|
126
153
|
|
|
127
154
|
## 开发
|
|
128
155
|
|
|
@@ -141,6 +168,18 @@ CI([配置](.github/workflows/ci.yml))在 **Windows / macOS / Linux × Pytho
|
|
|
141
168
|
> 语法错误,而在本地 3.12 上跑得好好的),`[tool.coverage.report]` 的 `fail_under = 85`
|
|
142
169
|
> 让覆盖率掉了就直接红。
|
|
143
170
|
|
|
171
|
+
## 商标与免责
|
|
172
|
+
|
|
173
|
+
* 本项目与 **Microsoft**、**MSC Software**、**DNV**、**ABS**、**金山办公**、**ST**
|
|
174
|
+
等厂商**均无关联**,也未获得其赞助或背书;文档中出现的产品名仅为说明兼容性或所依据
|
|
175
|
+
规范的**描述性使用**,相关商标归各自所有者所有;
|
|
176
|
+
* `abs_fpi` 示例依据 **ABS 规范**实现:**规范文本版权归 ABS 所有**,本仓库不含规范原文
|
|
177
|
+
与表格;该实现**未经 ABS 审核或认可**,使用前请自行取得正式规范并独立复核;
|
|
178
|
+
* 本工具生成的是**工程计算代码**:用于实际设计 / 建造 / 送审之前必须由具备资格的人员
|
|
179
|
+
独立复核,**不能替代**船级社审查;作者不对使用后果负责。
|
|
180
|
+
|
|
181
|
+
完整声明(含各商标的所有者清单、AI 生成与版权归属说明)见 [`NOTICE.md`](NOTICE.md)。
|
|
182
|
+
|
|
144
183
|
## License
|
|
145
184
|
|
|
146
|
-
MIT —— 见 [`LICENSE`](LICENSE)。
|
|
185
|
+
MIT —— 见 [`LICENSE`](LICENSE);商标、规范版权与免责声明见 [`NOTICE.md`](NOTICE.md)。
|
|
@@ -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
|
|
|
@@ -19,6 +19,19 @@ GeniE 会对被加载面的**每一个离散点**调用它,所以 x/y/z 是当
|
|
|
19
19
|
> 这是随包发布的**示例**。开发侧的现场脚本、探针与逐轮实测报告在仓库根的
|
|
20
20
|
> [`abs_fpi/`](../../../abs_fpi/)(不进包)。
|
|
21
21
|
|
|
22
|
+
> ⚠️ **规范版权与免责**
|
|
23
|
+
>
|
|
24
|
+
> * 本示例依据 **ABS《Rules for Building and Classing》**(5A-3-2/5.5 外压、5.7 内压)
|
|
25
|
+
> 实现。**规范文本版权归 American Bureau of Shipping 所有**;本仓库只包含演示所必需的
|
|
26
|
+
> 公式与系数,**不含**规范原文、表格或图表。
|
|
27
|
+
> * 使用者须**自行取得正式规范**并以其为准。本实现**未经 ABS 审核或认可**,
|
|
28
|
+
> 本项目与 ABS **无关联**,`ABS` 是 American Bureau of Shipping 的商标。
|
|
29
|
+
> * 输出**不能替代**船级社审查与批准。用于实际设计 / 建造 / 送审前,必须由具备资格的人员
|
|
30
|
+
> 独立复核。
|
|
31
|
+
> * 示例中的舱容与工况只是**示意数值**,不代表任何真实船舶。
|
|
32
|
+
>
|
|
33
|
+
> 完整声明见仓库根的 `NOTICE.md`(也随发行包发布在 `.dist-info/licenses/` 下)。
|
|
34
|
+
|
|
22
35
|
---
|
|
23
36
|
|
|
24
37
|
## 1. 三本工作簿
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: excel_codegen
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.2
|
|
4
4
|
Summary: Excel 模板参数填写 + Jinja2 代码生成器(支持 Prefix/Value/Suffix 组合)
|
|
5
5
|
Author: JG. Luo
|
|
6
6
|
License-Expression: MIT
|
|
@@ -18,6 +18,7 @@ Classifier: Topic :: Software Development :: Code Generators
|
|
|
18
18
|
Requires-Python: >=3.11
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
|
+
License-File: NOTICE.md
|
|
21
22
|
Requires-Dist: openpyxl>=3.1.2
|
|
22
23
|
Requires-Dist: jinja2>=3.1.2
|
|
23
24
|
Requires-Dist: pyyaml>=6.0
|
|
@@ -31,9 +32,23 @@ Requires-Dist: ruff>=0.6; extra == "dev"
|
|
|
31
32
|
Requires-Dist: mypy>=1.11; extra == "dev"
|
|
32
33
|
Dynamic: license-file
|
|
33
34
|
|
|
35
|
+
> # ⛔ 本项目已改名,请勿再使用
|
|
36
|
+
>
|
|
37
|
+
> **`excel-codegen` 已弃用**,请改用 **`spreadsheet-codegen`**:
|
|
38
|
+
>
|
|
39
|
+
> ```bash
|
|
40
|
+
> pip install spreadsheet-codegen # 或 uv tool install spreadsheet-codegen
|
|
41
|
+
> ```
|
|
42
|
+
>
|
|
43
|
+
> 改名原因:旧名里带 Microsoft 的商标 "Excel",存在被投诉下架的商标风险。
|
|
44
|
+
> 本版本(`0.9.2`)只是**弃用跳板** —— 功能与 `0.9.1` 完全相同,**不会再有任何更新**。
|
|
45
|
+
> 新项目:<https://pypi.org/project/spreadsheet-codegen/>
|
|
46
|
+
>
|
|
47
|
+
> ---
|
|
48
|
+
|
|
34
49
|
# excel_codegen
|
|
35
50
|
|
|
36
|
-
**在 Excel 里填参数,用 YAML + Jinja2 出代码。**
|
|
51
|
+
**在 Microsoft Excel 里填参数,用 YAML + Jinja2 出代码。**
|
|
37
52
|
|
|
38
53
|
[](https://github.com/Dog-Chest/excel_codegen/actions/workflows/ci.yml)
|
|
39
54
|

|
|
@@ -137,11 +152,25 @@ excel-codegen render -c examples/basic/example_formula.yaml \
|
|
|
137
152
|
| [`CHANGELOG.md`](CHANGELOG.md) | 版本变更历史 |
|
|
138
153
|
| [`abs_fpi/README.md`](abs_fpi/README.md) | 现场项目:怎么用、边界、四层校验链 |
|
|
139
154
|
| [`docs/publishing.md`](docs/publishing.md) | 维护者向:发布到 GitHub / PyPI、密钥与隐私 |
|
|
155
|
+
| [`NOTICE.md`](NOTICE.md) | **商标归属、规范版权与免责声明**(含 AI 生成与版权归属说明) |
|
|
140
156
|
|
|
141
157
|
## 安装
|
|
142
158
|
|
|
143
159
|
需要 **Python 3.11+**(Windows / Linux / macOS 均可)。
|
|
144
160
|
|
|
161
|
+
**只是要用它**(不克隆仓库):
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
uv tool install excel-codegen # 推荐
|
|
165
|
+
pipx install excel-codegen # 或
|
|
166
|
+
pip install excel-codegen # 或
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`),
|
|
170
|
+
`excel-codegen examples --copy ./examples` 就能拿到带工作簿的示例。
|
|
171
|
+
|
|
172
|
+
**改这个工具本身**(开发):
|
|
173
|
+
|
|
145
174
|
```bash
|
|
146
175
|
# 推荐:uv —— 不用建 venv、不用 pip、不用管本机 Python 版本
|
|
147
176
|
curl -LsSf https://astral.sh/uv/install.sh | sh # Windows 见 docs/setup.md
|
|
@@ -151,11 +180,10 @@ python3 -m venv ~/.venvs/excel_codegen && source ~/.venvs/excel_codegen/bin/acti
|
|
|
151
180
|
pip install -e ".[dev]"
|
|
152
181
|
```
|
|
153
182
|
|
|
154
|
-
装好后得到命令 `excel-codegen`(也可用 `python -m excel_codegen`)。
|
|
155
183
|
跨平台细节、外置盘注意事项与 Python 版本策略见 [`docs/setup.md`](docs/setup.md)。
|
|
156
184
|
|
|
157
|
-
> **PyPI
|
|
158
|
-
>
|
|
185
|
+
> **已发布到 PyPI**:当前版本 **0.9.1**([PyPI 页面](https://pypi.org/project/excel-codegen/))。
|
|
186
|
+
> 之后的发版流程(Trusted Publishing,仓库里不存 token)见 [`docs/publishing.md`](docs/publishing.md)。
|
|
159
187
|
|
|
160
188
|
## 开发
|
|
161
189
|
|
|
@@ -174,6 +202,18 @@ CI([配置](.github/workflows/ci.yml))在 **Windows / macOS / Linux × Pytho
|
|
|
174
202
|
> 语法错误,而在本地 3.12 上跑得好好的),`[tool.coverage.report]` 的 `fail_under = 85`
|
|
175
203
|
> 让覆盖率掉了就直接红。
|
|
176
204
|
|
|
205
|
+
## 商标与免责
|
|
206
|
+
|
|
207
|
+
* 本项目与 **Microsoft**、**MSC Software**、**DNV**、**ABS**、**金山办公**、**ST**
|
|
208
|
+
等厂商**均无关联**,也未获得其赞助或背书;文档中出现的产品名仅为说明兼容性或所依据
|
|
209
|
+
规范的**描述性使用**,相关商标归各自所有者所有;
|
|
210
|
+
* `abs_fpi` 示例依据 **ABS 规范**实现:**规范文本版权归 ABS 所有**,本仓库不含规范原文
|
|
211
|
+
与表格;该实现**未经 ABS 审核或认可**,使用前请自行取得正式规范并独立复核;
|
|
212
|
+
* 本工具生成的是**工程计算代码**:用于实际设计 / 建造 / 送审之前必须由具备资格的人员
|
|
213
|
+
独立复核,**不能替代**船级社审查;作者不对使用后果负责。
|
|
214
|
+
|
|
215
|
+
完整声明(含各商标的所有者清单、AI 生成与版权归属说明)见 [`NOTICE.md`](NOTICE.md)。
|
|
216
|
+
|
|
177
217
|
## License
|
|
178
218
|
|
|
179
|
-
MIT —— 见 [`LICENSE`](LICENSE)。
|
|
219
|
+
MIT —— 见 [`LICENSE`](LICENSE);商标、规范版权与免责声明见 [`NOTICE.md`](NOTICE.md)。
|
|
@@ -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.2"
|
|
9
9
|
description = "Excel 模板参数填写 + Jinja2 代码生成器(支持 Prefix/Value/Suffix 组合)"
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
# 支持下限 = **CI 真正测过的最老版本**(见 .github/workflows/ci.yml)。
|
|
@@ -13,7 +13,8 @@ readme = "README.md"
|
|
|
13
13
|
# 只需把这里、CI 矩阵、以及 README 的说明一起改掉(不要让文档比代码乐观)。
|
|
14
14
|
requires-python = ">=3.11"
|
|
15
15
|
license = "MIT"
|
|
16
|
-
|
|
16
|
+
# NOTICE.md 一起进 wheel 的 .dist-info/licenses/ 与 sdist —— 商标与免责声明要跟着分发走
|
|
17
|
+
license-files = ["LICENSE", "NOTICE.md"]
|
|
17
18
|
authors = [{ name = "JG. Luo" }]
|
|
18
19
|
keywords = ["excel", "openpyxl", "jinja2", "codegen", "template"]
|
|
19
20
|
classifiers = [
|
|
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.2}/excel_codegen/examples/abs_fpi/ABS_FPI_load_cases.xlsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/abs_fpi/abs_fpi_external.xlsx
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/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.2}/excel_codegen/examples/abs_fpi/abs_fpi_internal.xlsx
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/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.2}/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.2}/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.2}/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.2}/excel_codegen/examples/basic/example_formula.yaml
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/generated/uart_init_Case1.c
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/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.2}/excel_codegen/examples/basic/template_formula.xlsx
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/template_formula_render.bat
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/basic/template_formula_render.sh
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/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.2}/excel_codegen/examples/nastran/generated/cc_01_LC1.inc
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_02_LC2.inc
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_03_LC3.inc
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/excel_codegen/examples/nastran/generated/cc_04_COMB4.inc
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/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.2}/excel_codegen/examples/nastran/nastran_case_control.xlsx
RENAMED
|
File without changes
|
{excel_codegen-0.9.0 → excel_codegen-0.9.2}/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
|