Commit d85b2abf authored by 张鹏程's avatar 张鹏程

提交V5特征迁移文件

parent 739fe153
No preview for this file type
This diff is collapsed.
......@@ -10,4 +10,14 @@ pip install -r requirements
# 运行
python startup.py
\ No newline at end of file
python startup.py
# 文件说明
1. features
特征计算文件
2. handler
接口文件
3. report
测试文件输出
4.service
共用方法
\ No newline at end of file
......@@ -12,6 +12,6 @@ url_new_audit = '/features/new_audit'
url_calc_features = '/calc/features' # 基础特征
url_complex_order = '/features/complex_order' # 多订单
# url_collection = '/calc/loanPostFeatures' # 催收模型
url_collection = '/calc/loanPostFeatures' # 催收模型
url_loanPostFeatures = '/calc/loanPostFeatures' # 催收模型
......@@ -24,8 +24,8 @@ class LogFormatter(tornado.log.LogFormatter):
def __init__(self):
print('%(color)s[%(asctime)s %(filename)s:%(funcName)s:%(lineno)d %(levelname)s]%(end_color)s %(message)s')
super(LogFormatter, self).__init__(
fmt='%(color)s[%(asctime)s %(filename)s:%(funcName)s:%(lineno)d %(levelname)s]%(end_color)s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S'
fmt='%(color)s[%(asctime)s %(filename)s:%(funcName)s:%(lineno)d %(levelname)s]%(end_color)s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S'
)
def apps():
......@@ -34,7 +34,7 @@ def apps():
(URL.url_new_audit,NewAudit_Handler.New_Audit),
(URL.url_calc_features, Calc_Features_Handler.CalcFeatures),
(URL.url_complex_order,ComplexOrder_Handler.ComplexOrder),
(URL.url_collection, LoanPostFeatures_Handler.loanPostFeatures),
(URL.url_loanPostFeatures, LoanPostFeatures_Handler.loanPostFeatures),
])
if __name__ == "__main__":
......@@ -45,5 +45,4 @@ if __name__ == "__main__":
# #== 本地调试
app.listen(23010)
IOLoop.instance().start()
IOLoop.instance().start()
\ No newline at end of file
......@@ -754,23 +754,40 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
"abc = [{'config': {'name': 'test',\n",
" 'request': {'base_url': 'http://172.20.1.131:23010/',\n",
" 'headers': {'rc_auth_key': 'rc_developer',\n",
" 'rc_auth_secret': 'rc_secret'}}}},\n",
" {'test': {'extract': [{'uuid': 'content.data.subInfo.userUuid'}],\n",
" 'name': 'test',\n",
" 'request': {'data': {'uuid': '00031d84-4aa2-4e20-babf-ed437e65318c'},\n",
" 'method': 'POST',\n",
" 'url': '/calc/features'},\n",
" 'validate': [{'check': 'uuid',\n",
" 'comparator': 'equals',\n",
" 'expected': '${uuid}'}]}}]"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"ename": "KeyError",
"evalue": "0",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-5-f10e8fb487cc>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0maa\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mKeyError\u001b[0m: 0"
"name": "stdout",
"output_type": "stream",
"text": [
"b'- config:\\n name: test\\n request:\\n base_url: http://172.20.1.131:23010/\\n headers:\\n rc_auth_key: rc_developer\\n rc_auth_secret: rc_secret\\n- test:\\n extract:\\n - uuid: content.data.subInfo.userUuid\\n name: test\\n request:\\n data:\\n uuid: 00031d84-4aa2-4e20-babf-ed437e65318c\\n method: POST\\n url: /calc/features\\n validate:\\n - check: uuid\\n comparator: equals\\n expected: ${uuid}\\n'\n"
]
}
],
"source": [
"aa[0]"
"import yaml\n",
"print(yaml.dump(abc,indent=2, default_flow_style=False, encoding='utf-8'))"
]
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment