deepfos 1.1.67__tar.gz → 1.1.69__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.
- {deepfos-1.1.67 → deepfos-1.1.69}/CHANGELOG.md +16 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/PKG-INFO +1 -1
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/_version.py +3 -3
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/deepmodel.py +66 -64
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/finmodel.py +2 -2
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/exceptions/__init__.py +1 -1
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/msg.py +21 -7
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/options.py +20 -3
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos.egg-info/PKG-INFO +1 -1
- {deepfos-1.1.67 → deepfos-1.1.69}/.gitattributes +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/.gitee/ISSUE_GUIDELINES.md +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/.gitee/ISSUE_TEMPLATE.md +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/.gitignore +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/MANIFEST.in +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/README.md +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/algo/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/algo/graph.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/V1_1/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/V1_1/business_model.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/V1_1/dimension.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/V1_1/models/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/V1_1/models/business_model.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/V1_1/models/dimension.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/V1_2/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/V1_2/dimension.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/V1_2/models/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/V1_2/models/dimension.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/account.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/accounting_engines.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/app.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/approval_process.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/base.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/business_model.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/consolidation.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/consolidation_process.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/datatable.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/deep_pipeline.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/deepconnector.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/deepfos_task.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/deepmodel.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/dimension.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/financial_model.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/journal_model.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/journal_template.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/memory_financial_model.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/account.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/accounting_engines.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/app.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/approval_process.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/base.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/business_model.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/consolidation.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/consolidation_process.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/datatable_mysql.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/deep_pipeline.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/deepconnector.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/deepfos_task.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/deepmodel.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/dimension.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/financial_model.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/journal_model.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/journal_template.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/memory_financial_model.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/platform.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/python.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/reconciliation_engine.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/reconciliation_report.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/role_strategy.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/smartlist.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/space.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/system.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/variable.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/models/workflow.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/platform.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/python.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/reconciliation_engine.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/reconciliation_report.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/role_strategy.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/smartlist.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/space.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/system.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/variable.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/api/workflow.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/boost/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/boost/jstream.c +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/boost/jstream.pyx +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/boost/pandas.c +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/boost/pandas.pyx +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/boost/py_jstream.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/boost/py_pandas.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/cache.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/config.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/cube/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/cube/_base.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/cube/constants.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/cube/cube.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/cube/formula.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/cube/syscube.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/cube/typing.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/cube/utils.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/dimension/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/dimension/_base.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/dimension/dimcreator.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/dimension/dimension.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/dimension/dimexpr.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/dimension/dimmember.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/dimension/eledimension.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/dimension/filters.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/dimension/sysdimension.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/logictable/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/logictable/_cache.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/logictable/_operator.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/logictable/nodemixin.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/logictable/sqlcondition.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/core/logictable/tablemodel.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/cipher.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/clickhouse.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/connector.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/daclickhouse.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/dameng.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/damysql.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/dbkits.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/deepengine.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/deepmodel.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/deepmodel_kingbase.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/edb.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/gauss.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/kingbase.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/mysql.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/oracle.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/postgresql.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/sqlserver.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/db/utils.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/accounting.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/apvlprocess.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/base.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/bizmodel.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/datatable.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/deep_pipeline.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/deepconnector.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/dimension.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/fact_table.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/journal.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/journal_template.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/pyscript.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/reconciliation.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/rolestrategy.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/smartlist.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/variable.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/element/workflow.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/exceptions/hook.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lazy.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/__init__.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/_javaobj.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/asynchronous.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/concurrency.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/constant.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/decorator.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/deepchart.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/deepux.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/discovery.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/edb_lexer.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/eureka.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/filterparser.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/httpcli.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/jsonstreamer.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/nacos.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/patch.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/redis.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/serutils.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/stopwatch.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/subtask.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/sysutils.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/lib/utils.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/local.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos/translation.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos.egg-info/SOURCES.txt +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos.egg-info/dependency_links.txt +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos.egg-info/not-zip-safe +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos.egg-info/requires.txt +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/deepfos.egg-info/top_level.txt +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/requirements.txt +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/setup.cfg +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/setup.py +0 -0
- {deepfos-1.1.67 → deepfos-1.1.69}/versioneer.py +0 -0
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [1.1.69] - 2025-08-12
|
|
2
|
+
|
|
3
|
+
### 新增
|
|
4
|
+
|
|
5
|
+
* 消息中心推送接受发送成功规则参数
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## [1.1.68] - 2025-07-29
|
|
9
|
+
|
|
10
|
+
### 更新
|
|
11
|
+
|
|
12
|
+
* DeepModel元素insert_df和update_df接受chunksize=None
|
|
13
|
+
* DeepModel元素insert_df和update_df组织的bulk语句优化
|
|
14
|
+
* 修复DataFrame.replace会引发类型推断导致的bug
|
|
15
|
+
|
|
16
|
+
|
|
1
17
|
## [1.1.67] - 2025-07-22
|
|
2
18
|
|
|
3
19
|
### 新增
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-
|
|
11
|
+
"date": "2025-08-13T05:47:18+0000",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.1.
|
|
14
|
+
"full-revisionid": "8ee03bc48deaa7e1f492dac1690e50b4097da6ea",
|
|
15
|
+
"version": "1.1.69"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import re
|
|
2
|
+
import textwrap
|
|
2
3
|
import threading
|
|
3
4
|
|
|
4
5
|
import numpy as np
|
|
@@ -121,6 +122,7 @@ dm_type_to_edb_scalar = {
|
|
|
121
122
|
'uuid': 'std::str',
|
|
122
123
|
'json': 'std::json',
|
|
123
124
|
}
|
|
125
|
+
TAB = ' ' * 4
|
|
124
126
|
|
|
125
127
|
|
|
126
128
|
class ObjectElement(ObjectParam):
|
|
@@ -485,19 +487,30 @@ def _iter_single_assign(
|
|
|
485
487
|
field: PtrInfo,
|
|
486
488
|
cast_type: str,
|
|
487
489
|
target_main_field: Dict[str, MainField]
|
|
488
|
-
):
|
|
489
|
-
|
|
490
|
+
) -> str:
|
|
491
|
+
"""
|
|
492
|
+
生成单字段赋值语句
|
|
493
|
+
|
|
494
|
+
Args:
|
|
495
|
+
field: 字段信息
|
|
496
|
+
cast_type: 字段类型
|
|
497
|
+
target_main_field: 目标字段信息
|
|
498
|
+
|
|
499
|
+
Returns:
|
|
500
|
+
赋值语句
|
|
501
|
+
"""
|
|
502
|
+
assign = f"\n{field.name} := "
|
|
490
503
|
# 设置标量值
|
|
491
504
|
if field.name not in target_main_field:
|
|
492
505
|
if field.is_multi:
|
|
493
|
-
return
|
|
506
|
+
return assign + f"json_array_unpack(item['{field.name}'])"
|
|
494
507
|
|
|
495
|
-
|
|
508
|
+
assign += f"<{cast_type}>"
|
|
496
509
|
|
|
497
510
|
if cast_type in NEED_CAST_STR:
|
|
498
|
-
|
|
511
|
+
assign += '<std::str>'
|
|
499
512
|
|
|
500
|
-
return
|
|
513
|
+
return assign + f"item['{field.name}']"
|
|
501
514
|
|
|
502
515
|
# 设置link target值
|
|
503
516
|
link = field.name
|
|
@@ -516,20 +529,20 @@ def _iter_single_assign(
|
|
|
516
529
|
target = cast_type
|
|
517
530
|
|
|
518
531
|
if main_field.is_multi:
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
)"""
|
|
532
|
+
assign += 'distinct (\n' + textwrap.indent(textwrap.dedent(f"""\
|
|
533
|
+
for each_{link} in json_array_unpack(json_get(item, '{link}', 'target'))
|
|
534
|
+
union (
|
|
535
|
+
select detached {target}
|
|
536
|
+
filter .{main_field.business_key} = <{main_field.type}>each_{link}
|
|
537
|
+
)"""), TAB) + '\n)'
|
|
526
538
|
else:
|
|
527
|
-
|
|
539
|
+
assign += textwrap.dedent(f"""\
|
|
540
|
+
assert_single((
|
|
528
541
|
select detached {target}
|
|
529
542
|
filter .{main_field.business_key} = <{main_field.type}>(json_get(item, '{link}'))
|
|
530
|
-
))"""
|
|
543
|
+
))""")
|
|
531
544
|
|
|
532
|
-
return
|
|
545
|
+
return assign
|
|
533
546
|
|
|
534
547
|
|
|
535
548
|
def bulk_insert_by_fields(
|
|
@@ -537,21 +550,16 @@ def bulk_insert_by_fields(
|
|
|
537
550
|
field_type: List[PtrInfo],
|
|
538
551
|
target_main_field: Dict[str, MainField],
|
|
539
552
|
):
|
|
540
|
-
insert_assign_body = ','.join(
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
insert {object_name} {{
|
|
551
|
-
{insert_assign_body}
|
|
552
|
-
}}
|
|
553
|
-
)
|
|
554
|
-
"""
|
|
553
|
+
insert_assign_body = ','.join([
|
|
554
|
+
_iter_single_assign(field, field.type, target_main_field)
|
|
555
|
+
for field in field_type
|
|
556
|
+
])
|
|
557
|
+
return textwrap.dedent(f"""
|
|
558
|
+
with raw_data := <json>to_json(<std::str>${BATCH_INSERT_KW}),
|
|
559
|
+
for item in json_array_unpack(raw_data) union (
|
|
560
|
+
insert {object_name} {{{textwrap.indent(insert_assign_body, TAB * 4)}
|
|
561
|
+
}}
|
|
562
|
+
)""")
|
|
555
563
|
|
|
556
564
|
|
|
557
565
|
def bulk_upsert_by_fields(
|
|
@@ -562,34 +570,27 @@ def bulk_upsert_by_fields(
|
|
|
562
570
|
update_fields: Iterable[str]
|
|
563
571
|
):
|
|
564
572
|
conflict_on_fields = map(lambda n: f'.{n}', exclusive_fields)
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
for field in field_type
|
|
570
|
-
]
|
|
571
|
-
)
|
|
573
|
+
insert_assign_body = ','.join([
|
|
574
|
+
_iter_single_assign(field, field.type, target_main_field)
|
|
575
|
+
for field in field_type
|
|
576
|
+
])
|
|
572
577
|
update_assign_body = ','.join(
|
|
573
578
|
[
|
|
574
579
|
_iter_single_assign(field, field.type, target_main_field)
|
|
575
580
|
for field in field_type if field.name in update_fields
|
|
576
581
|
]
|
|
577
582
|
)
|
|
578
|
-
|
|
579
|
-
return f"""
|
|
583
|
+
return textwrap.dedent(f"""
|
|
580
584
|
with raw_data := <json>to_json(<std::str>${BATCH_INSERT_KW}),
|
|
581
585
|
for item in json_array_unpack(raw_data) union (
|
|
582
|
-
insert {object_name} {{
|
|
583
|
-
{insert_assign_body}
|
|
586
|
+
insert {object_name} {{{textwrap.indent(insert_assign_body, TAB * 4)}
|
|
584
587
|
}}
|
|
585
588
|
unless conflict on ({','.join(conflict_on_fields)})
|
|
586
589
|
else (
|
|
587
|
-
update {object_name} set {{
|
|
588
|
-
{update_assign_body}
|
|
590
|
+
update {object_name} set {{{textwrap.indent(update_assign_body, TAB * 5)}
|
|
589
591
|
}}
|
|
590
592
|
)
|
|
591
|
-
)
|
|
592
|
-
"""
|
|
593
|
+
)""")
|
|
593
594
|
|
|
594
595
|
|
|
595
596
|
def bulk_update_by_fields(
|
|
@@ -599,32 +600,27 @@ def bulk_update_by_fields(
|
|
|
599
600
|
match_fields: Iterable[str],
|
|
600
601
|
update_fields: Iterable[str],
|
|
601
602
|
):
|
|
602
|
-
update_assign_body = ','.join(
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
]
|
|
607
|
-
)
|
|
603
|
+
update_assign_body = ','.join([
|
|
604
|
+
_iter_single_assign(field, field.type, target_main_field)
|
|
605
|
+
for field in field_type if field.name in update_fields
|
|
606
|
+
])
|
|
608
607
|
|
|
609
608
|
field_type_map = {field.name: field.type for field in field_type}
|
|
610
|
-
|
|
611
609
|
match_str = " and ".join(
|
|
612
610
|
[
|
|
613
611
|
f".{name} = <{field_type_map.get(name, 'std::str')}>item['{name}']"
|
|
614
612
|
for name in match_fields
|
|
615
613
|
]
|
|
616
614
|
)
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
)
|
|
627
|
-
"""
|
|
615
|
+
return textwrap.dedent(f"""
|
|
616
|
+
with raw_data := <json>to_json(<std::str>${BATCH_INSERT_KW}),
|
|
617
|
+
for item in json_array_unpack(raw_data) union (
|
|
618
|
+
update {object_name}
|
|
619
|
+
filter {match_str}
|
|
620
|
+
set {{{textwrap.indent(update_assign_body, TAB * 3)}
|
|
621
|
+
}}
|
|
622
|
+
)
|
|
623
|
+
""")
|
|
628
624
|
|
|
629
625
|
|
|
630
626
|
def format_obj(obj: edgedb.Object) -> ObjectTypeFrame:
|
|
@@ -1302,6 +1298,10 @@ class AsyncDeepModel(ElementBase[DeepModelAPI]):
|
|
|
1302
1298
|
name = field.name
|
|
1303
1299
|
# 链接至其他对象,记录目标对象信息
|
|
1304
1300
|
if is_multi:
|
|
1301
|
+
if name not in relation:
|
|
1302
|
+
raise ValueError(
|
|
1303
|
+
f'对象[{object_name}]的多选链接:[{name}]未定义在relation中'
|
|
1304
|
+
)
|
|
1305
1305
|
link_props = set(relation[name].columns).intersection(field.props)
|
|
1306
1306
|
else:
|
|
1307
1307
|
link_props = set(
|
|
@@ -1442,6 +1442,8 @@ class AsyncDeepModel(ElementBase[DeepModelAPI]):
|
|
|
1442
1442
|
bulk_ql = None
|
|
1443
1443
|
qls = []
|
|
1444
1444
|
self._ensure_client()
|
|
1445
|
+
if chunk_size is None:
|
|
1446
|
+
chunk_size = len(data)
|
|
1445
1447
|
for i in range(0, len(data), chunk_size):
|
|
1446
1448
|
part = structure.fit(data.iloc[i: i + chunk_size])
|
|
1447
1449
|
ql_chunk = []
|
|
@@ -824,8 +824,8 @@ class AsyncFinancialCube(ElementBase[FinancialModelAPI]):
|
|
|
824
824
|
):
|
|
825
825
|
# replace NaN to standard None
|
|
826
826
|
# NB: replace twice in case of infer None to nan happened in 2.x pandas
|
|
827
|
-
data = data.replace({None: np.nan})
|
|
828
|
-
data = data.replace({np.nan: None})
|
|
827
|
+
data[DFLT_DATA_COLUMN] = data[DFLT_DATA_COLUMN].replace({None: np.nan})
|
|
828
|
+
data[DFLT_DATA_COLUMN] = data[DFLT_DATA_COLUMN].replace({np.nan: None})
|
|
829
829
|
# ensure view is capitalized
|
|
830
830
|
if self._meta.autoCalculation:
|
|
831
831
|
data = data.rename(columns=VIEW_DICT)
|
|
@@ -200,7 +200,7 @@ class MsgCenterError(DeepfosBaseException):
|
|
|
200
200
|
self.reasons = reasons
|
|
201
201
|
|
|
202
202
|
def __str__(self):
|
|
203
|
-
return '
|
|
203
|
+
return '推送失败,响应错误详情:\n' + '\n'.join([str(r.dict()) for r in self.reasons])
|
|
204
204
|
|
|
205
205
|
|
|
206
206
|
# -----------------------------------------------------------------------------
|
|
@@ -111,7 +111,8 @@ class AsyncMsgCenter:
|
|
|
111
111
|
content_param: Dict[str, str] = None,
|
|
112
112
|
attachments: Dict[str, Union[str, bytes]] = None,
|
|
113
113
|
cc_email: List[str] = None,
|
|
114
|
-
api_idx: Literal[0, 1] = 0
|
|
114
|
+
api_idx: Literal[0, 1] = 0,
|
|
115
|
+
success_rule: Literal['partial', 'all'] = 'all'
|
|
115
116
|
) -> List:
|
|
116
117
|
payload = {
|
|
117
118
|
'receiver': receivers,
|
|
@@ -139,7 +140,11 @@ class AsyncMsgCenter:
|
|
|
139
140
|
|
|
140
141
|
api = self.type_api_map[tpl_type][api_idx]
|
|
141
142
|
resp = await api(payload)
|
|
142
|
-
if resp.failure
|
|
143
|
+
if resp.failure and (
|
|
144
|
+
success_rule == 'all' or (
|
|
145
|
+
success_rule == 'partial' and not resp.success
|
|
146
|
+
)
|
|
147
|
+
):
|
|
143
148
|
raise MsgCenterError(*resp.failure)
|
|
144
149
|
|
|
145
150
|
return resp.success
|
|
@@ -153,6 +158,7 @@ class AsyncMsgCenter:
|
|
|
153
158
|
title_param: Dict[str, str] = None,
|
|
154
159
|
content_param: Dict[str, str] = None,
|
|
155
160
|
attachments: Dict[str, Union[str, bytes]] = None,
|
|
161
|
+
success_rule: Literal['partial', 'all'] = 'all'
|
|
156
162
|
) -> List:
|
|
157
163
|
"""推送指定消息模版的消息
|
|
158
164
|
|
|
@@ -164,6 +170,7 @@ class AsyncMsgCenter:
|
|
|
164
170
|
title_param: 可选,标题变量
|
|
165
171
|
content_param: 可选,内容变量
|
|
166
172
|
attachments: 可选,站内消息或邮箱的消息附件,以 文件名: 文件(字符串/bytes) 的字典形式提供
|
|
173
|
+
success_rule: 可选,发送成功规则,'partial' 表示部分成功即可,'all' 表示所有收件人都必须成功
|
|
167
174
|
|
|
168
175
|
.. admonition:: 示例
|
|
169
176
|
|
|
@@ -217,7 +224,7 @@ class AsyncMsgCenter:
|
|
|
217
224
|
return await self._publish(
|
|
218
225
|
template, sender=sender, receivers=receivers,
|
|
219
226
|
title_param=title_param, content_param=content_param,
|
|
220
|
-
attachments=attachments,
|
|
227
|
+
attachments=attachments, success_rule=success_rule,
|
|
221
228
|
)
|
|
222
229
|
|
|
223
230
|
async def send_mail(
|
|
@@ -229,6 +236,7 @@ class AsyncMsgCenter:
|
|
|
229
236
|
content_param: Dict[str, str] = None,
|
|
230
237
|
attachments: Dict[str, Union[str, bytes]] = None,
|
|
231
238
|
cc_email: List[str] = None,
|
|
239
|
+
success_rule: Literal['partial', 'all'] = 'all'
|
|
232
240
|
) -> List:
|
|
233
241
|
"""发送指定消息模版的邮件
|
|
234
242
|
|
|
@@ -240,6 +248,7 @@ class AsyncMsgCenter:
|
|
|
240
248
|
content_param: 可选,内容变量
|
|
241
249
|
attachments: 可选,附件,以 文件名: 文件(字符串/bytes) 的字典形式提供
|
|
242
250
|
cc_email: 可选,抄送人列表
|
|
251
|
+
success_rule: 可选,发送成功规则,'partial' 表示部分成功即可,'all' 表示所有收件人都必须成功
|
|
243
252
|
|
|
244
253
|
|
|
245
254
|
.. admonition:: 示例
|
|
@@ -289,7 +298,7 @@ class AsyncMsgCenter:
|
|
|
289
298
|
template, sender=sender, receivers=receivers,
|
|
290
299
|
title_param=title_param, content_param=content_param,
|
|
291
300
|
attachments=attachments, cc_email=cc_email,
|
|
292
|
-
api_idx=1
|
|
301
|
+
api_idx=1, success_rule=success_rule,
|
|
293
302
|
)
|
|
294
303
|
|
|
295
304
|
async def send_sms(
|
|
@@ -298,7 +307,8 @@ class AsyncMsgCenter:
|
|
|
298
307
|
receivers: List[str],
|
|
299
308
|
sender: str = None,
|
|
300
309
|
title_param: Dict[str, str] = None,
|
|
301
|
-
content_param: Dict[str, str] = None
|
|
310
|
+
content_param: Dict[str, str] = None,
|
|
311
|
+
success_rule: Literal['partial', 'all'] = 'all'
|
|
302
312
|
) -> List:
|
|
303
313
|
"""发送指定消息模版的短信
|
|
304
314
|
|
|
@@ -308,6 +318,7 @@ class AsyncMsgCenter:
|
|
|
308
318
|
sender: 可选,发送人userid,默认为当前用户id
|
|
309
319
|
title_param: 可选,标题变量
|
|
310
320
|
content_param: 可选,内容变量
|
|
321
|
+
success_rule: 可选,发送成功规则,'partial' 表示部分成功即可,'all' 表示所有收件人都必须成功
|
|
311
322
|
|
|
312
323
|
|
|
313
324
|
.. admonition:: 示例
|
|
@@ -351,7 +362,7 @@ class AsyncMsgCenter:
|
|
|
351
362
|
return await self._publish(
|
|
352
363
|
template, sender=sender, receivers=receivers,
|
|
353
364
|
title_param=title_param, content_param=content_param,
|
|
354
|
-
api_idx=1
|
|
365
|
+
api_idx=1, success_rule=success_rule,
|
|
355
366
|
)
|
|
356
367
|
|
|
357
368
|
|
|
@@ -368,6 +379,7 @@ class MsgCenter(AsyncMsgCenter, metaclass=SyncMeta):
|
|
|
368
379
|
title_param: Dict[str, str] = None,
|
|
369
380
|
content_param: Dict[str, str] = None,
|
|
370
381
|
attachments: Dict[str, Union[str, bytes]] = None,
|
|
382
|
+
success_rule: Literal['partial', 'all'] = 'all'
|
|
371
383
|
) -> List:
|
|
372
384
|
...
|
|
373
385
|
|
|
@@ -380,6 +392,7 @@ class MsgCenter(AsyncMsgCenter, metaclass=SyncMeta):
|
|
|
380
392
|
content_param: Dict[str, str] = None,
|
|
381
393
|
attachments: Dict[str, Union[str, bytes]] = None,
|
|
382
394
|
cc_email: List[str] = None,
|
|
395
|
+
success_rule: Literal['partial', 'all'] = 'all'
|
|
383
396
|
) -> List:
|
|
384
397
|
...
|
|
385
398
|
|
|
@@ -389,6 +402,7 @@ class MsgCenter(AsyncMsgCenter, metaclass=SyncMeta):
|
|
|
389
402
|
receivers: List[str],
|
|
390
403
|
sender: str = None,
|
|
391
404
|
title_param: Dict[str, str] = None,
|
|
392
|
-
content_param: Dict[str, str] = None
|
|
405
|
+
content_param: Dict[str, str] = None,
|
|
406
|
+
success_rule: Literal['partial', 'all'] = 'all'
|
|
393
407
|
) -> List:
|
|
394
408
|
...
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import configparser
|
|
2
2
|
import sys
|
|
3
|
+
import threading
|
|
3
4
|
import warnings
|
|
4
5
|
from enum import Enum
|
|
5
6
|
from functools import partial
|
|
@@ -276,6 +277,10 @@ class _Option(Generic[T_Opt]):
|
|
|
276
277
|
self.unset_action = _Action.PASS
|
|
277
278
|
self.unset = False
|
|
278
279
|
|
|
280
|
+
def _quick_set(self, instance, value):
|
|
281
|
+
setattr(instance, self._var_name, value)
|
|
282
|
+
self.unset = False
|
|
283
|
+
|
|
279
284
|
def __str__(self):
|
|
280
285
|
return self._display_name
|
|
281
286
|
|
|
@@ -366,7 +371,7 @@ class _Category:
|
|
|
366
371
|
setattr(self, '_name', getattr(other, '_name'))
|
|
367
372
|
for attr, option in self._options.items():
|
|
368
373
|
try:
|
|
369
|
-
option.
|
|
374
|
+
option._quick_set(self, getattr(other, attr)) # noqa
|
|
370
375
|
except BaseOptionError:
|
|
371
376
|
continue
|
|
372
377
|
|
|
@@ -643,19 +648,31 @@ class _OptionCTX:
|
|
|
643
648
|
boost: _Boost
|
|
644
649
|
discovery: _ServiceDiscovery
|
|
645
650
|
nacos: _Nacos
|
|
651
|
+
edgedb: _Edgedb
|
|
646
652
|
|
|
647
653
|
def show_options(self, category=None):
|
|
648
654
|
...
|
|
649
655
|
|
|
650
656
|
def __init__(self):
|
|
651
|
-
self.
|
|
657
|
+
self._create_at_main = threading.current_thread() is threading.main_thread()
|
|
658
|
+
self._primary_opt = _GlobalOptions()
|
|
659
|
+
self._token = _option_ctx.set(self._primary_opt)
|
|
652
660
|
|
|
653
661
|
def create_local(self):
|
|
654
662
|
self._token = _option_ctx.set(_GlobalOptions())
|
|
655
663
|
|
|
656
664
|
@property
|
|
657
665
|
def _option(self) -> _GlobalOptions:
|
|
658
|
-
|
|
666
|
+
try:
|
|
667
|
+
return _option_ctx.get()
|
|
668
|
+
except LookupError:
|
|
669
|
+
if (
|
|
670
|
+
not self._create_at_main
|
|
671
|
+
and threading.current_thread() is threading.main_thread()
|
|
672
|
+
):
|
|
673
|
+
_option_ctx.set(self._primary_opt.__copy__())
|
|
674
|
+
return _option_ctx.get()
|
|
675
|
+
raise
|
|
659
676
|
|
|
660
677
|
def __getattr__(self, item):
|
|
661
678
|
return getattr(self._option, item)
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|