staran 0.4.0__tar.gz → 0.4.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.
Files changed (29) hide show
  1. {staran-0.4.0/staran.egg-info → staran-0.4.1}/PKG-INFO +6 -6
  2. {staran-0.4.0 → staran-0.4.1}/README.md +5 -5
  3. {staran-0.4.0 → staran-0.4.1}/setup.py +1 -1
  4. {staran-0.4.0 → staran-0.4.1}/staran/schemas/document_generator.py +26 -13
  5. {staran-0.4.0 → staran-0.4.1/staran.egg-info}/PKG-INFO +6 -6
  6. {staran-0.4.0 → staran-0.4.1}/LICENSE +0 -0
  7. {staran-0.4.0 → staran-0.4.1}/setup.cfg +0 -0
  8. {staran-0.4.0 → staran-0.4.1}/staran/__init__.py +0 -0
  9. {staran-0.4.0 → staran-0.4.1}/staran/engines/__init__.py +0 -0
  10. {staran-0.4.0 → staran-0.4.1}/staran/engines/base.py +0 -0
  11. {staran-0.4.0 → staran-0.4.1}/staran/engines/hive.py +0 -0
  12. {staran-0.4.0 → staran-0.4.1}/staran/engines/spark.py +0 -0
  13. {staran-0.4.0 → staran-0.4.1}/staran/engines/turing.py +0 -0
  14. {staran-0.4.0 → staran-0.4.1}/staran/examples/__init__.py +0 -0
  15. {staran-0.4.0 → staran-0.4.1}/staran/examples/aum_longtail.py +0 -0
  16. {staran-0.4.0 → staran-0.4.1}/staran/examples/aum_longtail_old.py +0 -0
  17. {staran-0.4.0 → staran-0.4.1}/staran/features/__init__.py +0 -0
  18. {staran-0.4.0 → staran-0.4.1}/staran/features/engines.py +0 -0
  19. {staran-0.4.0 → staran-0.4.1}/staran/features/generator.py +0 -0
  20. {staran-0.4.0 → staran-0.4.1}/staran/features/manager.py +0 -0
  21. {staran-0.4.0 → staran-0.4.1}/staran/features/schema.py +0 -0
  22. {staran-0.4.0 → staran-0.4.1}/staran/schemas/__init__.py +0 -0
  23. {staran-0.4.0 → staran-0.4.1}/staran/schemas/aum/__init__.py +0 -0
  24. {staran-0.4.0 → staran-0.4.1}/staran/tools/__init__.py +0 -0
  25. {staran-0.4.0 → staran-0.4.1}/staran/tools/date.py +0 -0
  26. {staran-0.4.0 → staran-0.4.1}/staran.egg-info/SOURCES.txt +0 -0
  27. {staran-0.4.0 → staran-0.4.1}/staran.egg-info/dependency_links.txt +0 -0
  28. {staran-0.4.0 → staran-0.4.1}/staran.egg-info/requires.txt +0 -0
  29. {staran-0.4.0 → staran-0.4.1}/staran.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: staran
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: staran - 高性能Python工具库
5
5
  Home-page: https://github.com/starlxa/staran
6
6
  Author: StarAn
@@ -24,7 +24,7 @@ Dynamic: requires-dist
24
24
  Dynamic: requires-python
25
25
  Dynamic: summary
26
26
 
27
- # Star## ✨ v0.4.0 新特性
27
+ # Star## ✨ v0.4.1 新特性
28
28
 
29
29
  - 📋 **独立Schema模块** - 专门的表结构定义和管理模块
30
30
  - 📄 **文档自动生成** - 支持Markdown/PDF/HTML格式的技术文档生成
@@ -42,7 +42,7 @@ Dynamic: summary
42
42
 
43
43
  Staran是一个强大的特征工程和数据处理工具包,提供从数据到模型的完整解决方案。特别针对工银图灵平台优化,让特征工程和模型训练变得前所未有的简单。
44
44
 
45
- ## ✨ v0.4.0 新特性
45
+ ## ✨ v0.4.1 新特性
46
46
 
47
47
  - �️ **模块化引擎架构** - 独立的引擎模块,支持Spark、Hive、图灵平台
48
48
  - 🔧 **统一接口设计** - 所有引擎提供一致的SQL生成、执行和下载接口
@@ -361,7 +361,7 @@ tomorrow = date.add_days(1) # 202504 (智能处理)
361
361
 
362
362
  ```
363
363
  staran/
364
- ├── __init__.py # 主包入口,v0.4.0功能导出
364
+ ├── __init__.py # 主包入口,v0.4.1功能导出
365
365
  ├── schemas/ # 🆕 表结构定义与文档生成模块
366
366
  │ ├── __init__.py # Schema模块入口
367
367
  │ ├── document_generator.py # 文档生成器 (MD/PDF/HTML)
@@ -385,7 +385,7 @@ staran/
385
385
  │ ├── __init__.py # 工具模块
386
386
  │ └── date.py # Date类实现
387
387
  ├── setup.py # 安装配置
388
- ├── README.md # 本文档 v0.4.0
388
+ ├── README.md # 本文档 v0.4.1
389
389
  └── quick-upload.sh # 快速部署脚本
390
390
  ```
391
391
 
@@ -561,4 +561,4 @@ MIT License
561
561
 
562
562
  ---
563
563
 
564
- **Staran v0.4.0** - 模块化引擎架构,让机器学习特征工程变得前所未有的简单 🌟
564
+ **Staran v0.4.1** - 模块化引擎架构,让机器学习特征工程变得前所未有的简单 🌟
@@ -1,4 +1,4 @@
1
- # Star## ✨ v0.4.0 新特性
1
+ # Star## ✨ v0.4.1 新特性
2
2
 
3
3
  - 📋 **独立Schema模块** - 专门的表结构定义和管理模块
4
4
  - 📄 **文档自动生成** - 支持Markdown/PDF/HTML格式的技术文档生成
@@ -16,7 +16,7 @@
16
16
 
17
17
  Staran是一个强大的特征工程和数据处理工具包,提供从数据到模型的完整解决方案。特别针对工银图灵平台优化,让特征工程和模型训练变得前所未有的简单。
18
18
 
19
- ## ✨ v0.4.0 新特性
19
+ ## ✨ v0.4.1 新特性
20
20
 
21
21
  - �️ **模块化引擎架构** - 独立的引擎模块,支持Spark、Hive、图灵平台
22
22
  - 🔧 **统一接口设计** - 所有引擎提供一致的SQL生成、执行和下载接口
@@ -335,7 +335,7 @@ tomorrow = date.add_days(1) # 202504 (智能处理)
335
335
 
336
336
  ```
337
337
  staran/
338
- ├── __init__.py # 主包入口,v0.4.0功能导出
338
+ ├── __init__.py # 主包入口,v0.4.1功能导出
339
339
  ├── schemas/ # 🆕 表结构定义与文档生成模块
340
340
  │ ├── __init__.py # Schema模块入口
341
341
  │ ├── document_generator.py # 文档生成器 (MD/PDF/HTML)
@@ -359,7 +359,7 @@ staran/
359
359
  │ ├── __init__.py # 工具模块
360
360
  │ └── date.py # Date类实现
361
361
  ├── setup.py # 安装配置
362
- ├── README.md # 本文档 v0.4.0
362
+ ├── README.md # 本文档 v0.4.1
363
363
  └── quick-upload.sh # 快速部署脚本
364
364
  ```
365
365
 
@@ -535,4 +535,4 @@ MIT License
535
535
 
536
536
  ---
537
537
 
538
- **Staran v0.4.0** - 模块化引擎架构,让机器学习特征工程变得前所未有的简单 🌟
538
+ **Staran v0.4.1** - 模块化引擎架构,让机器学习特征工程变得前所未有的简单 🌟
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="staran",
5
- version="0.4.0",
5
+ version="0.4.1",
6
6
  description="staran - 高性能Python工具库",
7
7
  long_description=open("README.md", encoding="utf-8").read(),
8
8
  long_description_content_type="text/markdown",
@@ -101,8 +101,10 @@ class SchemaDocumentGenerator:
101
101
  content = []
102
102
 
103
103
  # 文档头部
104
- content.append(f"# {business_domain} - {table_type.upper()}表结构文档\\n")
105
- content.append(f"## 基本信息\\n")
104
+ content.append(f"# {business_domain} - {table_type.upper()}表结构文档")
105
+ content.append("")
106
+ content.append(f"## 基本信息")
107
+ content.append("")
106
108
  content.append(f"- **表名**: `{schema.table_name}`")
107
109
  content.append(f"- **业务域**: {business_domain}")
108
110
  content.append(f"- **表类型**: {table_type}")
@@ -111,30 +113,37 @@ class SchemaDocumentGenerator:
111
113
  content.append("")
112
114
 
113
115
  # 表结构说明
114
- content.append("## 表结构说明\\n")
116
+ content.append("## 表结构说明")
117
+ content.append("")
115
118
  if hasattr(schema, 'description'):
116
- content.append(f"{schema.description}\\n")
119
+ content.append(f"{schema.description}")
120
+ content.append("")
117
121
 
118
122
  # 主键信息
119
123
  if hasattr(schema, 'primary_key') and schema.primary_key:
120
- content.append("### 主键字段\\n")
124
+ content.append("### 主键字段")
125
+ content.append("")
121
126
  content.append(f"- `{schema.primary_key}` (主键)")
122
127
  content.append("")
123
128
 
124
129
  # 日期字段
125
130
  if hasattr(schema, 'date_field') and schema.date_field:
126
- content.append("### 日期字段\\n")
131
+ content.append("### 日期字段")
132
+ content.append("")
127
133
  content.append(f"- `{schema.date_field}` (日期字段)")
128
134
  content.append("")
129
135
 
130
136
  # 字段详情表格
131
- content.append("## 字段详情\\n")
137
+ content.append("## 字段详情")
138
+ content.append("")
132
139
  content.append("| 字段名 | 数据类型 | 业务含义 | 可聚合 | 备注 |")
133
140
  content.append("|--------|----------|----------|--------|------|")
134
141
 
135
142
  if hasattr(schema, 'fields'):
136
143
  for field_name, field in schema.fields.items():
137
- field_type = str(field.field_type) if hasattr(field, 'field_type') else 'string'
144
+ # 简化数据类型显示
145
+ field_type_str = str(field.field_type) if hasattr(field, 'field_type') else 'string'
146
+ field_type = field_type_str.replace('FieldType.', '').lower()
138
147
  comment = field.comment if hasattr(field, 'comment') else ''
139
148
  aggregatable = '是' if getattr(field, 'aggregatable', False) else '否'
140
149
  remarks = '' # 可以从其他地方获取备注
@@ -144,9 +153,10 @@ class SchemaDocumentGenerator:
144
153
  content.append("")
145
154
 
146
155
  # 业务规则说明
147
- content.append("## 业务规则\\n")
156
+ content.append("## 业务规则")
157
+ content.append("")
148
158
  content.append("### 数据更新规则")
149
- if getattr(schema, 'monthly_unique', False):
159
+ if getattr(schema, 'is_monthly_unique', False):
150
160
  content.append("- 每人每月一条记录")
151
161
  content.append("- 月末批量更新")
152
162
  else:
@@ -162,7 +172,8 @@ class SchemaDocumentGenerator:
162
172
  content.append("")
163
173
 
164
174
  # 使用说明
165
- content.append("## 使用说明\\n")
175
+ content.append("## 使用说明")
176
+ content.append("")
166
177
  content.append("### 特征工程配置")
167
178
  if table_type == 'behavior':
168
179
  content.append("- 生成原始拷贝特征")
@@ -187,7 +198,7 @@ class SchemaDocumentGenerator:
187
198
  content.append("---")
188
199
  content.append("*本文档由Staran Schema自动生成*")
189
200
 
190
- return "\\n".join(content)
201
+ return "\n".join(content)
191
202
 
192
203
  def _generate_html_content(self, schema, business_domain: str, table_type: str) -> str:
193
204
  """生成HTML格式内容"""
@@ -238,7 +249,9 @@ class SchemaDocumentGenerator:
238
249
  # 添加字段行
239
250
  if hasattr(schema, 'fields'):
240
251
  for field_name, field in schema.fields.items():
241
- field_type = str(field.field_type) if hasattr(field, 'field_type') else 'string'
252
+ # 简化数据类型显示
253
+ field_type_str = str(field.field_type) if hasattr(field, 'field_type') else 'string'
254
+ field_type = field_type_str.replace('FieldType.', '').lower()
242
255
  comment = field.comment if hasattr(field, 'comment') else ''
243
256
  aggregatable = '是' if getattr(field, 'aggregatable', False) else '否'
244
257
  remarks = '' # 可以从其他地方获取备注
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: staran
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: staran - 高性能Python工具库
5
5
  Home-page: https://github.com/starlxa/staran
6
6
  Author: StarAn
@@ -24,7 +24,7 @@ Dynamic: requires-dist
24
24
  Dynamic: requires-python
25
25
  Dynamic: summary
26
26
 
27
- # Star## ✨ v0.4.0 新特性
27
+ # Star## ✨ v0.4.1 新特性
28
28
 
29
29
  - 📋 **独立Schema模块** - 专门的表结构定义和管理模块
30
30
  - 📄 **文档自动生成** - 支持Markdown/PDF/HTML格式的技术文档生成
@@ -42,7 +42,7 @@ Dynamic: summary
42
42
 
43
43
  Staran是一个强大的特征工程和数据处理工具包,提供从数据到模型的完整解决方案。特别针对工银图灵平台优化,让特征工程和模型训练变得前所未有的简单。
44
44
 
45
- ## ✨ v0.4.0 新特性
45
+ ## ✨ v0.4.1 新特性
46
46
 
47
47
  - �️ **模块化引擎架构** - 独立的引擎模块,支持Spark、Hive、图灵平台
48
48
  - 🔧 **统一接口设计** - 所有引擎提供一致的SQL生成、执行和下载接口
@@ -361,7 +361,7 @@ tomorrow = date.add_days(1) # 202504 (智能处理)
361
361
 
362
362
  ```
363
363
  staran/
364
- ├── __init__.py # 主包入口,v0.4.0功能导出
364
+ ├── __init__.py # 主包入口,v0.4.1功能导出
365
365
  ├── schemas/ # 🆕 表结构定义与文档生成模块
366
366
  │ ├── __init__.py # Schema模块入口
367
367
  │ ├── document_generator.py # 文档生成器 (MD/PDF/HTML)
@@ -385,7 +385,7 @@ staran/
385
385
  │ ├── __init__.py # 工具模块
386
386
  │ └── date.py # Date类实现
387
387
  ├── setup.py # 安装配置
388
- ├── README.md # 本文档 v0.4.0
388
+ ├── README.md # 本文档 v0.4.1
389
389
  └── quick-upload.sh # 快速部署脚本
390
390
  ```
391
391
 
@@ -561,4 +561,4 @@ MIT License
561
561
 
562
562
  ---
563
563
 
564
- **Staran v0.4.0** - 模块化引擎架构,让机器学习特征工程变得前所未有的简单 🌟
564
+ **Staran v0.4.1** - 模块化引擎架构,让机器学习特征工程变得前所未有的简单 🌟
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