expr-codegen 0.16.4__tar.gz → 0.16.5__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 (33) hide show
  1. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/PKG-INFO +9 -10
  2. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/README.md +8 -9
  3. expr_codegen-0.16.5/expr_codegen/_version.py +1 -0
  4. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/codes.py +0 -6
  5. expr_codegen-0.16.4/expr_codegen/_version.py +0 -1
  6. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/.gitignore +0 -0
  7. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/LICENSE +0 -0
  8. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/__init__.py +0 -0
  9. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/dag.py +0 -0
  10. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/expr.py +0 -0
  11. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/latex/__init__.py +0 -0
  12. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/latex/printer.py +0 -0
  13. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/model.py +0 -0
  14. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/pandas/__init__.py +0 -0
  15. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/pandas/code.py +0 -0
  16. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/pandas/helper.py +0 -0
  17. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/pandas/printer.py +0 -0
  18. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/pandas/ta.py +0 -0
  19. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/pandas/template.py.j2 +0 -0
  20. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/polars/__init__.py +0 -0
  21. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/polars/code.py +0 -0
  22. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/polars/printer.py +0 -0
  23. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/polars/template.py.j2 +0 -0
  24. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/rust/__init__.py +0 -0
  25. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/rust/code.py +0 -0
  26. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/rust/printer.py +0 -0
  27. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/rust/template.rs.j2 +0 -0
  28. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/sql/__init__.py +0 -0
  29. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/sql/code.py +0 -0
  30. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/sql/printer.py +0 -0
  31. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/sql/template.sql.j2 +0 -0
  32. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/expr_codegen/tool.py +0 -0
  33. {expr_codegen-0.16.4 → expr_codegen-0.16.5}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: expr_codegen
3
- Version: 0.16.4
3
+ Version: 0.16.5
4
4
  Summary: symbol expression to polars expression tool
5
5
  Author-email: wukan <wu-kan@163.com>
6
6
  License: BSD 3-Clause License
@@ -262,21 +262,20 @@ X3 = (ts_returns(CLOSE, 3)).over(_ASSET_, order_by=_DATE_),
262
262
  2. `(A<B)*-1`,底层将转换成`int_(A<B)*-1`
263
263
  3. 为防止`A==B`被`sympy`替换成`False`,底层会换成`Eq(A,B)`
264
264
  4. `A^B`的含义与`convert_xor`参数有关,`convert_xor=True`底层会转换成`Pow(A,B)`,反之为`Xor(A,B)`。默认为`False`,用`**`表示乘方
265
- 5. 支持`A&B&C`,但不支持`A==B==C`。如果C是布尔,AB是数值,可手工替换成`(A==B)==C`。如果ABC是数值需手工替换成`(A==B)&(B==C)`
266
- 6. 不支持`A<=B<=C`,需手工替换成`(A<=B)&(B<=C)`
267
- 7. 支持`A[0]+B[1]+C[2]`,底层会转成`A+ts_delay(B,1)+ts_delay(C,2)`
268
- 8. 支持`~A`,底层会转换成`Not(A)`
269
- 9. `gp_`开头的函数都会返回对应的`cs_`函数。如`gp_func(A,B,C)`会替换成`cs_func(B,C)`,其中`A`用在了`groupby([date, A])`
270
- 10. 支持`A,B,C=MACD()`元组解包,在底层会替换成
265
+ 5. 支持`A&B&C`,支持`A==B==C`。支持`A<B<C`
266
+ 6. 支持`A[0]+B[1]+C[2]`,底层会转成`A+ts_delay(B,1)+ts_delay(C,2)`
267
+ 7. 支持`~A`,底层会转换成`Not(A)`
268
+ 8. `gp_`开头的函数都会返回对应的`cs_`函数。如`gp_func(A,B,C)`会替换成`cs_func(B,C)`,其中`A`用在了`groupby([date, A])`
269
+ 9. 支持`A,B,C=MACD()`元组解包,在底层会替换成
271
270
  ```python
272
271
  _x_0 = MACD()
273
272
  A = unpack(_x_0, 0)
274
273
  B = unpack(_x_0, 1)
275
274
  C = unpack(_x_0, 2)
276
275
  ```
277
- 11. 单行注释支持参数输入,如:`# --over_null`、`# --over_null=order_by`、`# --over_null=partition_by`
278
- 12. 代码块中,对`import`、`def`、`class`三种语法,自动原样插入到生成的代码中
279
- 13. 虽然`sympy`的限制不支持关键字参数,但`codegen_exec`底层会试着将关键字参数转成位置参数使用
276
+ 10. 单行注释支持参数输入,如:`# --over_null`、`# --over_null=order_by`、`# --over_null=partition_by`
277
+ 11. 代码块中,对`import`、`def`、`class`三种语法,自动原样插入到生成的代码中
278
+ 12. 虽然`sympy`的限制不支持关键字参数,但`codegen_exec`底层会试着将关键字参数转成位置参数使用
280
279
 
281
280
  ## 下划线开头的变量
282
281
 
@@ -212,21 +212,20 @@ X3 = (ts_returns(CLOSE, 3)).over(_ASSET_, order_by=_DATE_),
212
212
  2. `(A<B)*-1`,底层将转换成`int_(A<B)*-1`
213
213
  3. 为防止`A==B`被`sympy`替换成`False`,底层会换成`Eq(A,B)`
214
214
  4. `A^B`的含义与`convert_xor`参数有关,`convert_xor=True`底层会转换成`Pow(A,B)`,反之为`Xor(A,B)`。默认为`False`,用`**`表示乘方
215
- 5. 支持`A&B&C`,但不支持`A==B==C`。如果C是布尔,AB是数值,可手工替换成`(A==B)==C`。如果ABC是数值需手工替换成`(A==B)&(B==C)`
216
- 6. 不支持`A<=B<=C`,需手工替换成`(A<=B)&(B<=C)`
217
- 7. 支持`A[0]+B[1]+C[2]`,底层会转成`A+ts_delay(B,1)+ts_delay(C,2)`
218
- 8. 支持`~A`,底层会转换成`Not(A)`
219
- 9. `gp_`开头的函数都会返回对应的`cs_`函数。如`gp_func(A,B,C)`会替换成`cs_func(B,C)`,其中`A`用在了`groupby([date, A])`
220
- 10. 支持`A,B,C=MACD()`元组解包,在底层会替换成
215
+ 5. 支持`A&B&C`,支持`A==B==C`。支持`A<B<C`
216
+ 6. 支持`A[0]+B[1]+C[2]`,底层会转成`A+ts_delay(B,1)+ts_delay(C,2)`
217
+ 7. 支持`~A`,底层会转换成`Not(A)`
218
+ 8. `gp_`开头的函数都会返回对应的`cs_`函数。如`gp_func(A,B,C)`会替换成`cs_func(B,C)`,其中`A`用在了`groupby([date, A])`
219
+ 9. 支持`A,B,C=MACD()`元组解包,在底层会替换成
221
220
  ```python
222
221
  _x_0 = MACD()
223
222
  A = unpack(_x_0, 0)
224
223
  B = unpack(_x_0, 1)
225
224
  C = unpack(_x_0, 2)
226
225
  ```
227
- 11. 单行注释支持参数输入,如:`# --over_null`、`# --over_null=order_by`、`# --over_null=partition_by`
228
- 12. 代码块中,对`import`、`def`、`class`三种语法,自动原样插入到生成的代码中
229
- 13. 虽然`sympy`的限制不支持关键字参数,但`codegen_exec`底层会试着将关键字参数转成位置参数使用
226
+ 10. 单行注释支持参数输入,如:`# --over_null`、`# --over_null=order_by`、`# --over_null=partition_by`
227
+ 11. 代码块中,对`import`、`def`、`class`三种语法,自动原样插入到生成的代码中
228
+ 12. 虽然`sympy`的限制不支持关键字参数,但`codegen_exec`底层会试着将关键字参数转成位置参数使用
230
229
 
231
230
  ## 下划线开头的变量
232
231
 
@@ -0,0 +1 @@
1
+ __version__ = "0.16.5"
@@ -34,12 +34,6 @@ class SyntaxTransformer(ast.NodeTransformer):
34
34
  self.generic_visit(node)
35
35
  return node
36
36
 
37
- def visit_Compare(self, node):
38
- assert len(node.comparators) == 1, f"不支持连续等号,请手工添加括号, {ast.unparse(node)}"
39
-
40
- self.generic_visit(node)
41
- return node
42
-
43
37
  def visit_IfExp(self, node):
44
38
  # 三元表达式。需要在外部提前替换成or True if else
45
39
  # 只要body区域,出现了or True,就认为是特殊处理过的
@@ -1 +0,0 @@
1
- __version__ = "0.16.4"
File without changes
File without changes