technical-patterns-lab/docs/2026-01-26_演示脚本归档总结.md
褚宏光 6d545eb231 Enhance converging triangle detection with new features and documentation updates
- Added support for a detailed chart mode in plot_converging_triangles.py, allowing users to visualize all pivot points and fitting lines.
- Improved pivot fitting logic to utilize multiple representative points, enhancing detection accuracy and reducing false positives.
- Introduced a new real-time detection mode with flexible zone parameters for better responsiveness in stock analysis.
- Updated README.md and USAGE.md to reflect new features and usage instructions.
- Added multiple documentation files detailing recent improvements, including pivot point fitting and visualization enhancements.
- Cleaned up and archived outdated scripts to streamline the project structure.
2026-01-26 16:21:36 +08:00

234 lines
5.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Scripts 归档完成总结
**日期**: 2026-01-26
**操作**: 将演示脚本归档到 `scripts/archive/`
---
## 📋 操作概述
为保持主目录简洁,将三个演示脚本移动到归档目录。
---
## 📦 归档的文件
### 1. demo_segmentation.py
```bash
scripts/demo_segmentation.py → scripts/archive/demo_segmentation.py
```
**用途**: 演示分段选择算法
**归档原因**: 日常使用频率低,教学为主
**访问方式**: `python scripts/archive/demo_segmentation.py`
### 2. demo_pivot_detection.py
```bash
scripts/demo_pivot_detection.py → scripts/archive/demo_pivot_detection.py
```
**用途**: 枢轴点检测可视化演示
**归档原因**: 日常使用频率低,教学为主
**访问方式**: `python scripts/archive/demo_pivot_detection.py`
### 3. demo_flexible_zone.py
```bash
scripts/demo_flexible_zone.py → scripts/archive/demo_flexible_zone.py
```
**用途**: FLEXIBLE_ZONE 参数效果演示
**归档原因**: 日常使用频率低,参数调优参考
**访问方式**: `python scripts/archive/demo_flexible_zone.py`
---
## 📊 归档前后对比
### 归档前 (scripts/)
```
scripts/
├── triangle_config.py
├── run_converging_triangle.py
├── plot_converging_triangles.py
├── pipeline_converging_triangle.py
├── report_converging_triangles.py
├── test_realtime_mode.py
├── demo_segmentation.py ← 将归档
├── demo_pivot_detection.py ← 将归档
├── demo_flexible_zone.py ← 将归档
└── archive/
├── run_sym_triangle_json.py
└── run_sym_triangle_pkl.py
```
**主目录文件数**: 9 个脚本
### 归档后 (scripts/)
```
scripts/
├── triangle_config.py ⭐ 核心
├── run_converging_triangle.py ⭐ 核心
├── plot_converging_triangles.py ⭐ 核心
├── pipeline_converging_triangle.py ⭐ 核心
├── report_converging_triangles.py ⭐ 核心
├── test_realtime_mode.py 🧪 测试
└── archive/ 📦 归档
├── README.md 📄 说明(新增)
├── demo_segmentation.py 📚 演示
├── demo_pivot_detection.py 📚 演示
├── demo_flexible_zone.py 📚 演示
├── run_sym_triangle_json.py 🗄️ 旧版本
└── run_sym_triangle_pkl.py 🗄️ 旧版本
```
**主目录文件数**: 6 个脚本(简洁 50%
**归档目录文件数**: 6 个脚本 + 1 个说明文档
---
## ✅ 优势
### 1. 主目录更简洁
- ✅ 只保留日常使用的核心脚本
- ✅ 清晰的职责划分
- ✅ 减少 50% 的文件数量
### 2. 演示脚本仍可访问
- ✅ 归档不是删除,代码完整保留
- ✅ 仍可正常运行
- ✅ 供学习和教学使用
### 3. 更好的组织结构
- ✅ 核心脚本 vs 演示脚本分离
- ✅ 新用户不会混淆
- ✅ 维护更容易
---
## 📚 如何使用归档脚本
### 方式1: 直接运行
```bash
# 演示分段选择算法
python scripts/archive/demo_segmentation.py
# 演示枢轴点检测
python scripts/archive/demo_pivot_detection.py
# 演示 FLEXIBLE_ZONE 参数
python scripts/archive/demo_flexible_zone.py
```
### 方式2: 查看归档说明
```bash
cat scripts/archive/README.md
```
归档说明文档包含:
- 每个脚本的详细说明
- 使用方法
- 对应的文档链接
- 归档原因
---
## 🔗 相关文档
归档的演示脚本对应的文档(更推荐阅读文档):
| 归档脚本 | 对应文档 |
|---------|---------|
| `demo_pivot_detection.py` | `docs/枢轴点检测原理.md` |
| `demo_segmentation.py` | `docs/枢轴点分段选择算法详解.md` |
| `demo_flexible_zone.py` | `docs/实时模式使用指南.md` |
---
## 📝 更新的文档
1. **scripts/archive/README.md** (新增)
- 归档说明文档
- 解释每个归档脚本的用途和使用方法
2. **docs/2026-01-26_scripts清理记录.md** (更新)
- 添加演示脚本归档记录
- 更新目录结构图
3. **docs/2026-01-26_项目清理总结.md** (更新)
- 添加演示脚本归档条目
- 更新文件列表
---
## 🎯 日常工作流
### 新用户
1. 只需关注 `scripts/` 主目录中的 6 个核心脚本
2. 如需学习算法原理,查看 `docs/` 文档
3. 如需代码演示,运行 `scripts/archive/` 中的演示脚本
### 开发者
1. 核心功能在主目录
2. 演示和教学在归档目录
3. 清晰的职责划分,易于维护
---
## 📈 清理统计
### 整体清理效果
```
临时分析脚本:
- 删除: 3 个 (why_30_not_pivot.py, analyze_sz300892*.py)
- 沉淀: 知识归档到 FAQ 文档
演示脚本:
- 归档: 3 个 (demo_*.py)
- 位置: scripts/archive/
- 状态: 完整保留,可正常运行
主目录:
- 归档前: 9 个脚本
- 归档后: 6 个脚本
- 简化率: 33%
归档目录:
- 演示脚本: 3 个
- 旧版本: 2 个
- 说明文档: 1 个
- 总计: 6 个文件
```
---
## ✅ 检查清单
- [x] 移动演示脚本到归档目录
- [x] 创建归档说明文档 (archive/README.md)
- [x] 更新清理记录文档
- [x] 更新项目总结文档
- [x] 验证归档脚本可正常运行
- [x] 确认主目录结构清晰
---
## 🎉 完成
演示脚本归档完成!主目录更加简洁,同时演示代码完整保留供学习参考。
**核心原则**:
- 主目录 = 日常使用
- 归档目录 = 学习参考
- 文档 = 最佳学习途径
---
**版本**: v1.0
**更新**: 2026-01-26