|
|
1 неделя назад | |
|---|---|---|
| .. | ||
| common | 1 неделя назад | |
| README.md | 1 неделя назад | |
| __init__.py | 2 недель назад | |
app_qualityGate/)职责:审计器(配置统一/页面归口/产物反向呼应/链路缺口/可移植/日志/安全/中文表达/模块边界/页面指纹/产物清点与补缺/依赖台账)、三件交付文档的构建与插图、版本记录、打包器与开箱验证、卸载器
允许依赖:app_common, app_ETL, app_algorithmModel, app_ontology, app_backEnd, app_frontEnd
对外公开面:common/app_qualityGate_guanlan/api.py —— 模块间调用只许走这里(scripts/module_boundary_audit.py 机器检查)。
目录(P7 起,2026-09-28):
common/app_qualityGate_guanlan/
api.py 公开面(23 名:审计 17 + 文档 3 + 打包 3)
audits/ audit_chinese_terms · chain_gap_check · check_portability · check_transferable ·
config_audit · detail_deps · guanlan_baseline_manifest · inventory_products ·
log_audit · module_boundary_audit · page_fingerprint · pages_audit · pages_sweep ·
products_restore_missing · products_reverse_audit · products_state · security_scan
docs/ delivery_docs_build(三件交付文档构建)· delivery_docs_figures(插图)· version_log(版本记录)
pack/ pack_dist(打包器)· pack_verify_entry(开箱验证入口)· guanlan_uninstall(卸载器)
根引导脚本原地不动:install.ps1、install.sh、uninstall.bat|sh、check.bat、pack.bat|sh、start/stop.bat
是"解压即用"的引导层(README、src/entry_refs.py 的入口引用闭合门与 .gitattributes 的换行/编码约定都钉着它们),
它们调用的 Python 实现已迁入本模块,scripts/<件>.py 留 CLI 壳 ⇒ 引导脚本与既有命令行一字不改。
迁移状态:P7 已完成(2026-09-28) —— 23 个工具 / 7,426 行实体迁入;旧路径 scripts/<件>.py 全部留 CLI 壳
(公开名同面转发 + main();guanlan.py check 用 importlib 逐个载入这些路径,照旧可用)。
本轮实逮:① 迁入子包后 __file__ 取根(parents[1])失效(22 处)⇒ 统一公共层 install_root();
② 文件间 bare import(from products_reverse_audit import FAMILIES、import inventory_products as INV,4 处)
在包内会断 ⇒ 改相对导入;③ audit_chinese_terms 里的 here.parent 是"仓库根"语义 ⇒ 换 install_root();
④ 顺手补上 P4 遗留:该审计器的被审件 scripts/windscada_serve.py 早已是壳 ⇒ 改读实现位置
app_backEnd/common/app_backEnd_guanlan/serve.py。
验收:8 条质量门 stdout 逐字节等于迁移前(config / pages / chain_gap / products_reverse / detail_deps /
version_log / docs_verify / check_transferable),模块边界与可移植性 rc=0;23 个 scripts/ 壳经 importlib 载入且公开名同面;
新路径 python -m app_qualityGate....audits.<件> 直接可跑;打包器从新位置出包并开箱验证 5/5 + 卸载核验通过;guanlan.py check 全绿。
依据:
docs/重构方案_模块化_v0.1.md(用户令 2026-09-22:只重构目录与接口、零行为变化、逐版本可回滚)。