smartpush 1.0.8__py3-none-any.whl → 1.1.0__py3-none-any.whl
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.
- smartpush/export/basic/ExcelExportChecker.py +56 -24
- smartpush/export/basic/GetOssUrl.py +37 -0
- smartpush/test.py +19 -0
- smartpush/utils/StringUtils.py +126 -0
- smartpush/utils/__init__.py +0 -0
- {smartpush-1.0.8.dist-info → smartpush-1.1.0.dist-info}/METADATA +1 -1
- smartpush-1.1.0.dist-info/RECORD +13 -0
- {smartpush-1.0.8.dist-info → smartpush-1.1.0.dist-info}/WHEEL +1 -1
- smartpush/felix_test.py +0 -20
- smartpush-1.0.8.dist-info/RECORD +0 -10
- {smartpush-1.0.8.dist-info → smartpush-1.1.0.dist-info}/top_level.txt +0 -0
@@ -1,11 +1,9 @@
|
|
1
|
-
import contextlib
|
2
1
|
import os
|
3
2
|
import re
|
3
|
+
import warnings
|
4
4
|
from io import BytesIO
|
5
5
|
from urllib.parse import unquote
|
6
6
|
import pandas as pd
|
7
|
-
import numpy as np
|
8
|
-
import warnings
|
9
7
|
from requests import request
|
10
8
|
|
11
9
|
"""
|
@@ -25,6 +23,13 @@ def read_excel_from_oss(url="", method="get"):
|
|
25
23
|
print(f"读取oss报错 {url} 时出错:{e}")
|
26
24
|
|
27
25
|
|
26
|
+
def read_excel_data(excel_data, **kwargs):
|
27
|
+
with warnings.catch_warnings():
|
28
|
+
warnings.filterwarnings("ignore", category=UserWarning, module=re.escape('openpyxl.styles.stylesheet'))
|
29
|
+
dfs = pd.read_excel(excel_data, sheet_name=None, engine="openpyxl", na_filter=False, **kwargs)
|
30
|
+
return dfs
|
31
|
+
|
32
|
+
|
28
33
|
def read_excel_and_write_to_dict(excel_data=None, file_name=None, **kwargs):
|
29
34
|
"""excel内容并写入到内存dict中
|
30
35
|
:param excel_data:excel的io对象, 参数和file_name互斥
|
@@ -35,19 +40,17 @@ def read_excel_and_write_to_dict(excel_data=None, file_name=None, **kwargs):
|
|
35
40
|
pass
|
36
41
|
elif file_name is not None:
|
37
42
|
excel_data = os.path.join(os.path.dirname(os.getcwd()) + "/check_file/" + file_name)
|
38
|
-
|
39
|
-
warnings.filterwarnings("ignore", category=UserWarning, module=re.escape('openpyxl.styles.stylesheet'))
|
40
|
-
df = pd.read_excel(excel_data, engine="openpyxl", **kwargs)
|
43
|
+
dfs = read_excel_data(excel_data)
|
41
44
|
# 将DataFrame转换为字典,以行为单位存储数据
|
42
45
|
row_dict = {} # 创建一个空字典来存储按行转换的数据
|
43
|
-
for index, row in
|
46
|
+
for index, row in dfs.iterrows(): # 遍历DataFrame中的每一行
|
44
47
|
row_dict[index] = row.to_dict() # 将每一行转换为字典并存储在row_dict中
|
45
48
|
return row_dict
|
46
49
|
except Exception as e:
|
47
50
|
print(f"excel写入dict时出错:{e}")
|
48
51
|
|
49
52
|
|
50
|
-
def read_excel_and_write_to_list(excel_data=None, file_name=None, **kwargs):
|
53
|
+
def read_excel_and_write_to_list(excel_data=None, sheet_name=None, file_name=None, **kwargs):
|
51
54
|
"""excel内容并写入到内存list中
|
52
55
|
:param excel_data:excel的io对象, 参数和file_name互斥
|
53
56
|
:file_name: excel文件名称,目前读取check_file目录下文件,参数和excel_data互斥
|
@@ -78,6 +81,7 @@ def read_excel_and_write_to_list(excel_data=None, file_name=None, **kwargs):
|
|
78
81
|
storage_options:存储选项。
|
79
82
|
dtype_backend:数据类型后端。
|
80
83
|
engine_kwargs:传递给引擎的额外参数。
|
84
|
+
@param sheet_name:
|
81
85
|
|
82
86
|
|
83
87
|
"""
|
@@ -87,11 +91,13 @@ def read_excel_and_write_to_list(excel_data=None, file_name=None, **kwargs):
|
|
87
91
|
elif file_name is not None:
|
88
92
|
excel_data = os.path.join(os.path.dirname(os.getcwd()) + "/check_file/" + file_name)
|
89
93
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
94
|
+
dfs = read_excel_data(excel_data)
|
95
|
+
rows_list = []
|
96
|
+
# 多sheet处理
|
97
|
+
for name, df in dfs.items():
|
98
|
+
rows_list.append(df.values.tolist())
|
99
|
+
if len(dfs) <= 1:
|
100
|
+
rows_list = rows_list[0]
|
95
101
|
return rows_list
|
96
102
|
except Exception as e:
|
97
103
|
print(f"excel写入list时出错:{e}")
|
@@ -108,23 +114,35 @@ def read_excel_and_write_to_csv(excel_data, file_name, **kwargs):
|
|
108
114
|
print(f"excel写入csv时出错:{e}")
|
109
115
|
|
110
116
|
|
111
|
-
def
|
117
|
+
def read_excel_data_for_oss_write_to_dict(oss, **kwargs) -> dict:
|
112
118
|
"""
|
113
119
|
1、根据oss link 直接读出 dict-list
|
114
|
-
2、支持多sheet,默认
|
120
|
+
2、支持多sheet,默认sheet_name =None查全部
|
115
121
|
3、返回dict结构 {'sheet_name':[rows_list]}
|
116
122
|
"""
|
117
123
|
try:
|
118
|
-
|
119
|
-
warnings.filterwarnings("ignore", category=UserWarning, module=re.escape('openpyxl.styles.stylesheet'))
|
120
|
-
dfs = pd.read_excel(read_excel_from_oss(oss), sheet_name, engine="openpyxl", **kwargs)
|
124
|
+
dfs = read_excel_data(read_excel_from_oss(oss))
|
121
125
|
result = {}
|
122
126
|
for sheet_name, df in dfs.items():
|
123
127
|
rows_list = df.values.tolist()
|
124
128
|
result[sheet_name] = rows_list
|
125
129
|
return result
|
126
130
|
except Exception as e:
|
127
|
-
print(f"excel
|
131
|
+
print(f"excel生成dict出错:{e}")
|
132
|
+
|
133
|
+
|
134
|
+
def read_excel_header_for_oss_write_to_list(oss) -> list:
|
135
|
+
"""
|
136
|
+
1、根据oss link 直接读出excel的头列 list
|
137
|
+
"""
|
138
|
+
try:
|
139
|
+
dfs = read_excel_data(read_excel_from_oss(oss))
|
140
|
+
result = []
|
141
|
+
for sheet_name, df in dfs.items():
|
142
|
+
result.append(df.keys().values.tolist())
|
143
|
+
return result
|
144
|
+
except Exception as e:
|
145
|
+
print(f"excel生成header-dict出错:{e}")
|
128
146
|
|
129
147
|
|
130
148
|
def check_excel(check_type="content", **kwargs):
|
@@ -169,6 +187,7 @@ comparison_functions = {
|
|
169
187
|
else check_excel_content(kwargs["actual_oss"], kwargs["expected_oss"]),
|
170
188
|
# excelName
|
171
189
|
"excelName": lambda kwargs: check_excel_name(kwargs["actual_oss"], kwargs["expected_oss"]),
|
190
|
+
'header': lambda kwargs: check_excel_header(kwargs["actual_oss"], kwargs["expected_oss"]),
|
172
191
|
# 全部
|
173
192
|
"all": lambda kwargs: check_excel_all(kwargs["actual_oss"], kwargs["expected_oss"])
|
174
193
|
}
|
@@ -192,7 +211,7 @@ def check_excel_for_lu(check_type="content", **kwargs):
|
|
192
211
|
else:
|
193
212
|
return False, f"不支持此类型: {check_type}"
|
194
213
|
except KeyError as ke:
|
195
|
-
raise ke
|
214
|
+
# raise ke
|
196
215
|
print(f"类型对应参数缺失异常:{ke}")
|
197
216
|
return False, [str(ke)]
|
198
217
|
except Exception as e:
|
@@ -213,7 +232,8 @@ def check_excel_all(actual_oss, expected_oss):
|
|
213
232
|
"""
|
214
233
|
flag1, content_result = check_excel_content_form_oss(actual_oss, expected_oss)
|
215
234
|
flag2, name_result = check_excel_name(actual_oss, expected_oss)
|
216
|
-
|
235
|
+
flag3 = check_sheet_header(actual_oss, expected_oss)
|
236
|
+
return all([flag1, flag2, flag3]), {"文件名称": name_result, "导出内容": content_result, "校验结果": [flag1, flag2, flag3]}
|
217
237
|
|
218
238
|
|
219
239
|
def check_excel_name(actual_oss, expected_oss):
|
@@ -251,7 +271,8 @@ def check_excel_content(actual, expected):
|
|
251
271
|
errors.append("excel内容-预期和实际行数相等,为" + str(actual_num) + "行")
|
252
272
|
else:
|
253
273
|
errors.append(
|
254
|
-
"excel内容-行数和预期对比差" + check_row.__str__() + "行" + ", 实际:" + str(actual_num) + "预期: " + str(
|
274
|
+
"excel内容-行数和预期对比差" + check_row.__str__() + "行" + ", 实际:" + str(actual_num) + "预期: " + str(
|
275
|
+
expected_num))
|
255
276
|
# 断言不匹配行
|
256
277
|
if check_row >= 0:
|
257
278
|
num = len(expected)
|
@@ -269,6 +290,18 @@ def check_excel_content(actual, expected):
|
|
269
290
|
return False, [e]
|
270
291
|
|
271
292
|
|
293
|
+
def check_excel_header(actual_oss, expected_oss):
|
294
|
+
"""
|
295
|
+
比较两个文档第一列的header是否一致
|
296
|
+
@param actual_oss:
|
297
|
+
@param expected_oss:
|
298
|
+
@return:
|
299
|
+
"""
|
300
|
+
actual, expected = read_excel_data_for_oss_write_to_dict(actual_oss), read_excel_data_for_oss_write_to_dict(
|
301
|
+
expected_oss)
|
302
|
+
return actual == expected
|
303
|
+
|
304
|
+
|
272
305
|
def del_temp_file(file_name=""):
|
273
306
|
"""删除temp下临时文件"""
|
274
307
|
file_path = os.path.join(os.path.dirname(os.getcwd()) + "/temp_file/" + file_name)
|
@@ -278,5 +311,4 @@ def del_temp_file(file_name=""):
|
|
278
311
|
except FileNotFoundError:
|
279
312
|
print(f"文件 {file_path} 不存在。")
|
280
313
|
except Exception as e:
|
281
|
-
print(f"删除文件 {file_path} 时出错:{e}")
|
282
|
-
|
314
|
+
print(f"删除文件 {file_path} 时出错:{e}")
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import requests
|
2
|
+
from retry import retry
|
3
|
+
import json
|
4
|
+
from smartpush.utils.StringUtils import StringUtils
|
5
|
+
|
6
|
+
|
7
|
+
def get_oss_address_with_retry(target_id, url, requestHeader, requestParam, **kwargs) -> str:
|
8
|
+
"""
|
9
|
+
创建带有动态重试配置的获取 OSS 地址
|
10
|
+
**kwargs 可传参:tries=10, delay=2, backoff=1
|
11
|
+
:param requestParam:
|
12
|
+
:param url:
|
13
|
+
:param target_id:
|
14
|
+
:param requestHeader:
|
15
|
+
:return: 带有重试配置的获取 OSS 地址的
|
16
|
+
"""
|
17
|
+
|
18
|
+
@retry(tries=10, delay=2, backoff=1)
|
19
|
+
def get_oss_address():
|
20
|
+
if StringUtils.is_empty(target_id):
|
21
|
+
print(f"缺少参数:target_id")
|
22
|
+
return
|
23
|
+
try:
|
24
|
+
response = requests.request(url=url, headers=requestHeader, data=json.dumps(requestParam), method="post")
|
25
|
+
response.raise_for_status()
|
26
|
+
result = response.json()
|
27
|
+
id_url_dict = {item["id"]: item["url"] for item in result["resultData"]["datas"]}
|
28
|
+
if target_id in id_url_dict:
|
29
|
+
if len(id_url_dict[target_id]) == 1:
|
30
|
+
return id_url_dict[target_id][0]
|
31
|
+
else:
|
32
|
+
raise ValueError(f"存在多条 id 为 {target_id} 的记录,记录为:{id_url_dict[target_id]}")
|
33
|
+
else:
|
34
|
+
raise ValueError(f"未找到 id 为 {target_id} 的记录,未包含有效的 OSS 地址,")
|
35
|
+
except (KeyError, json.JSONDecodeError) as e:
|
36
|
+
raise ValueError(f"响应数据格式错误,响应结果: {result},异常: {e}")
|
37
|
+
return get_oss_address()
|
smartpush/test.py
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
from smartpush.export.basic.ExcelExportChecker import check_excel_for_lu
|
2
|
+
from smartpush.export.basic.GetOssUrl import get_oss_address_with_retry
|
3
|
+
import urllib3
|
4
|
+
|
5
|
+
if __name__ == '__main__':
|
6
|
+
# print(check_excel_for_lu("content",actual_oss="https://sl-smartfile.oss-ap-southeast-1.aliyuncs.com/material_ec2_prod/2025-01-20/fcb98e2965314ef2862db65760dcce1f/ab%E5%BC%B9%E7%AA%97%E6%B4%BB%E5%8A%A8-%E8%BD%AC%E5%8C%96%E7%8E%87%E8%8E%B7%E8%83%9C%E9%94%80%E5%94%AE%E9%A2%9D%E6%98%8E%E7%BB%86%E6%95%B0%E6%8D%AE.xlsx",expected_oss="https://sl-smartfile.oss-ap-southeast-1.aliyuncs.com/material_ec2_prod/2025-01-20/fcb98e2965314ef2862db65760dcce1f/ab%E5%BC%B9%E7%AA%97%E6%B4%BB%E5%8A%A8-%E8%BD%AC%E5%8C%96%E7%8E%87%E8%8E%B7%E8%83%9C%E9%94%80%E5%94%AE%E9%A2%9D%E6%98%8E%E7%BB%86%E6%95%B0%E6%8D%AE.xlsx"))
|
7
|
+
|
8
|
+
|
9
|
+
_id = 10901
|
10
|
+
url = "https://test.smartpushedm.com/api-em-ec2/bulkOps/query"
|
11
|
+
requestHeaders = {
|
12
|
+
'cookie': 'osudb_appid=SMARTPUSH;osudb_oar=#01#SID0000121BJe/0W0PdWQj0Wo/Cr4G9H5S58u/YpvUYbOxsyvHQXmU5iToD8h3GX0+/3Af1efOroDv2jIwJIPVx2F1/XCP08l/NOaWMIZ/xm1/ugKB7eA1k1akIdCSTOHJcJ95Ahp7Yz0cBgOwtr8OgF77WNxX;osudb_subappid=1;osudb_uid=4213785247;ecom_http_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NDIwMTEyNDcsImp0aSI6IjY4M2E1NDg1LTEwYjAtNDRhZS04MGMxLWQ1MmFkN2YxNmViNCIsInVzZXJJbmZvIjp7ImlkIjowLCJ1c2VySWQiOiI0MjEzNzg1MjQ3IiwidXNlcm5hbWUiOiIiLCJlbWFpbCI6ImZlbGl4LnNoYW9Ac2hvcGxpbmVhcHAuY29tIiwidXNlclJvbGUiOiJvd25lciIsInBsYXRmb3JtVHlwZSI6Nywic3ViUGxhdGZvcm0iOjEsInBob25lIjoiIiwibGFuZ3VhZ2UiOiJ6aC1oYW5zLWNuIiwiYXV0aFR5cGUiOiIiLCJhdHRyaWJ1dGVzIjp7ImNvdW50cnlDb2RlIjoiQ04iLCJjdXJyZW5jeSI6IkpQWSIsImN1cnJlbmN5U3ltYm9sIjoiSlDCpSIsImRvbWFpbiI6InNtYXJ0cHVzaDQubXlzaG9wbGluZXN0Zy5jb20iLCJsYW5ndWFnZSI6ImVuIiwibWVyY2hhbnRFbWFpbCI6ImZlbGl4LnNoYW9Ac2hvcGxpbmUuY29tIiwibWVyY2hhbnROYW1lIjoiU21hcnRQdXNoNF9lYzJf6Ieq5Yqo5YyW5bqX6ZO6IiwicGhvbmUiOiIiLCJzY29wZUNoYW5nZWQiOmZhbHNlLCJzdGFmZkxhbmd1YWdlIjoiemgtaGFucy1jbiIsInN0YXR1cyI6MCwidGltZXpvbmUiOiJBc2lhL01hY2FvIn0sInN0b3JlSWQiOiIxNjQ0Mzk1OTIwNDQ0IiwiaGFuZGxlIjoic21hcnRwdXNoNCIsImVudiI6IkNOIiwic3RlIjoiIiwidmVyaWZ5IjoiIn0sImxvZ2luVGltZSI6MTczOTQxOTI0Nzg2OSwic2NvcGUiOlsiZW1haWwtbWFya2V0IiwiY29va2llIiwic2wtZWNvbS1lbWFpbC1tYXJrZXQtbmV3LXRlc3QiLCJlbWFpbC1tYXJrZXQtbmV3LWRldi1mcyIsImFwaS11Yy1lYzIiLCJhcGktc3UtZWMyIiwiYXBpLWVtLWVjMiIsImZsb3ctcGx1Z2luIl0sImNsaWVudF9pZCI6ImVtYWlsLW1hcmtldCJ9.PJGM1sSZyvxTriMK4e1g90krqBUq9OVNc5vEyKxsXyQ;',
|
13
|
+
'Content-Type': 'application/json'}
|
14
|
+
requestParams = {'page': 1, 'pageSize': 10, 'type': 'EXPORT', 'status': None, 'startTime': None, 'endTime': None}
|
15
|
+
oss=get_oss_address_with_retry(_id, url, requestHeaders, requestParams, tries=1, delay=1, backoff=1)
|
16
|
+
eexcelxcel = check_excel_for_lu("all",
|
17
|
+
expected_oss=oss,
|
18
|
+
actual_oss=oss)
|
19
|
+
print(eexcelxcel)
|
@@ -0,0 +1,126 @@
|
|
1
|
+
class StringUtils:
|
2
|
+
@staticmethod
|
3
|
+
def to_upper(s):
|
4
|
+
"""
|
5
|
+
将字符串转换为大写
|
6
|
+
:param s: 输入的字符串
|
7
|
+
:return: 转换为大写后的字符串
|
8
|
+
"""
|
9
|
+
return s.upper() if isinstance(s, str) else s
|
10
|
+
|
11
|
+
@staticmethod
|
12
|
+
def to_lower(s):
|
13
|
+
"""
|
14
|
+
将字符串转换为小写
|
15
|
+
:param s: 输入的字符串
|
16
|
+
:return: 转换为小写后的字符串
|
17
|
+
"""
|
18
|
+
return s.lower() if isinstance(s, str) else s
|
19
|
+
|
20
|
+
@staticmethod
|
21
|
+
def strip(s):
|
22
|
+
"""
|
23
|
+
去除字符串两端的空白字符
|
24
|
+
:param s: 输入的字符串
|
25
|
+
:return: 去除两端空白字符后的字符串
|
26
|
+
"""
|
27
|
+
return s.strip() if isinstance(s, str) else s
|
28
|
+
|
29
|
+
@staticmethod
|
30
|
+
def is_digit(s):
|
31
|
+
"""
|
32
|
+
判断字符串是否只包含数字
|
33
|
+
:param s: 输入的字符串
|
34
|
+
:return: 如果只包含数字返回 True,否则返回 False
|
35
|
+
"""
|
36
|
+
return s.isdigit() if isinstance(s, str) else False
|
37
|
+
|
38
|
+
@staticmethod
|
39
|
+
def substring(s, start, end=None):
|
40
|
+
"""
|
41
|
+
截取字符串的子字符串
|
42
|
+
:param s: 输入的字符串
|
43
|
+
:param start: 起始索引
|
44
|
+
:param end: 结束索引(可选)
|
45
|
+
:return: 截取的子字符串
|
46
|
+
"""
|
47
|
+
return s[start:end] if isinstance(s, str) else s
|
48
|
+
|
49
|
+
@staticmethod
|
50
|
+
def replace(s, old, new):
|
51
|
+
"""
|
52
|
+
替换字符串中的指定子字符串
|
53
|
+
:param s: 输入的字符串
|
54
|
+
:param old: 要替换的旧子字符串
|
55
|
+
:param new: 替换后的新子字符串
|
56
|
+
:return: 替换后的字符串
|
57
|
+
"""
|
58
|
+
return s.replace(old, new) if isinstance(s, str) else s
|
59
|
+
|
60
|
+
@staticmethod
|
61
|
+
def split(s, sep=None):
|
62
|
+
"""
|
63
|
+
根据指定分隔符分割字符串
|
64
|
+
:param s: 输入的字符串
|
65
|
+
:param sep: 分隔符(可选)
|
66
|
+
:return: 分割后的字符串列表
|
67
|
+
"""
|
68
|
+
return s.split(sep) if isinstance(s, str) else s
|
69
|
+
|
70
|
+
@staticmethod
|
71
|
+
def is_empty(s):
|
72
|
+
"""
|
73
|
+
判断字符串是否为空
|
74
|
+
:param s: 输入的字符串
|
75
|
+
:return: 如果字符串为空或仅包含空白字符返回 True,否则返回 False
|
76
|
+
"""
|
77
|
+
return not s or s.isspace() if isinstance(s, str) or s is None else False
|
78
|
+
|
79
|
+
@staticmethod
|
80
|
+
def contains(s, sub):
|
81
|
+
"""
|
82
|
+
判断字符串是否包含指定子字符串
|
83
|
+
:param s: 输入的字符串
|
84
|
+
:param sub: 要检查的子字符串
|
85
|
+
:return: 如果包含返回 True,否则返回 False
|
86
|
+
"""
|
87
|
+
return sub in s if isinstance(s, str) and isinstance(sub, str) else False
|
88
|
+
|
89
|
+
@staticmethod
|
90
|
+
def reverse(s):
|
91
|
+
"""
|
92
|
+
反转字符串
|
93
|
+
:param s: 输入的字符串
|
94
|
+
:return: 反转后的字符串
|
95
|
+
"""
|
96
|
+
return s[::-1] if isinstance(s, str) else s
|
97
|
+
|
98
|
+
@staticmethod
|
99
|
+
def count_substring(s, sub):
|
100
|
+
"""
|
101
|
+
统计子字符串在字符串中出现的次数
|
102
|
+
:param s: 输入的字符串
|
103
|
+
:param sub: 要统计的子字符串
|
104
|
+
:return: 子字符串出现的次数
|
105
|
+
"""
|
106
|
+
return s.count(sub) if isinstance(s, str) and isinstance(sub, str) else 0
|
107
|
+
|
108
|
+
@staticmethod
|
109
|
+
def startswith(s, prefix):
|
110
|
+
"""
|
111
|
+
判断字符串是否以指定前缀开头
|
112
|
+
:param s: 输入的字符串
|
113
|
+
:param prefix: 前缀字符串
|
114
|
+
:return: 如果以指定前缀开头返回 True,否则返回 False
|
115
|
+
"""
|
116
|
+
return s.startswith(prefix) if isinstance(s, str) and isinstance(prefix, str) else False
|
117
|
+
|
118
|
+
@staticmethod
|
119
|
+
def endswith(s, suffix):
|
120
|
+
"""
|
121
|
+
判断字符串是否以指定后缀结尾
|
122
|
+
:param s: 输入的字符串
|
123
|
+
:param suffix: 后缀字符串
|
124
|
+
:return: 如果以指定后缀结尾返回 True,否则返回 False
|
125
|
+
"""
|
126
|
+
return s.endswith(suffix) if isinstance(s, str) and isinstance(suffix, str) else False
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
smartpush/__init__.py,sha256=XJrl1vhGATHSeSVqKmPXxYqxyseriUpvY5tLIXir3EE,24
|
2
|
+
smartpush/get_jira_info.py,sha256=dmCwkKa94xwyE2hegE1KBI3cV_LbrJ67P9osORUGPt4,2633
|
3
|
+
smartpush/test.py,sha256=Krng-vkKECW7UPYKwlgh-w0o0xDYrVkXW7W4-L61ueA,2837
|
4
|
+
smartpush/export/__init__.py,sha256=D9GbWcmwnetEndFDty5XbVienFK1WjqV2yYcQp3CM84,99
|
5
|
+
smartpush/export/basic/ExcelExportChecker.py,sha256=bEfadFHZ0tsPcFXbCLTZguD199PIoYdxhJ9Mce72N7M,12987
|
6
|
+
smartpush/export/basic/GetOssUrl.py,sha256=O2-HtcYzbabck9dKgLu8ga21_AiyDIzgdfoDgvqBY3c,1541
|
7
|
+
smartpush/export/basic/__init__.py,sha256=6tcrS-2NSlsJo-UwEsnGUmwCf7jgOsh_UEbM0FD-gYE,70
|
8
|
+
smartpush/utils/StringUtils.py,sha256=NXomJ4qmyBRAFnGj5hrFRWwQnRQMTcPzy20fk1dunSw,3980
|
9
|
+
smartpush/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
+
smartpush-1.1.0.dist-info/METADATA,sha256=LQEsjc2Kv6vo7urDwIaOi-Idf7_a0jBSmAqaS6kSPhk,145
|
11
|
+
smartpush-1.1.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
12
|
+
smartpush-1.1.0.dist-info/top_level.txt,sha256=5_CXqu08EfbPaKLjuSAOAqCmGU6shiatwDU_ViBGCmg,10
|
13
|
+
smartpush-1.1.0.dist-info/RECORD,,
|
smartpush/felix_test.py
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
import requests
|
2
|
-
|
3
|
-
from smartpush.export.basic import ExcelExportChecker
|
4
|
-
|
5
|
-
if __name__ == '__main__':
|
6
|
-
|
7
|
-
ossurl1 = "https://cdn.smartpushedm.com/material_ec2/2025-02-10/4f3c7f2ad92946a894e3df9176341e1c/%E7%94%A8%E6%88%B7%E7%95%99%E5%AD%98.xlsx"
|
8
|
-
ossurl2 = "https://cdn.smartpushedm.com/material_ec2/2025-02-10/238f1f143d34441e9cfd61ba68ce8dd1/%E7%94%A8%E6%88%B7%E7%95%99%E5%AD%98.xlsx"
|
9
|
-
#
|
10
|
-
# # a = ExcelExportChecker.read_excel_and_write_to_list(excel_data=ExcelExportChecker.read_excel_from_oss(url=ossurl1))
|
11
|
-
# # b = ExcelExportChecker.read_excel_and_write_to_list(excel_data=ExcelExportChecker.read_excel_from_oss(url=ossurl2))
|
12
|
-
# # print(ExcelExportChecker.check_excel(actual=a, expected=b))
|
13
|
-
print(ExcelExportChecker.check_excel(check_type="content", actual_oss=ossurl1, expected_oss=ossurl2))
|
14
|
-
|
15
|
-
# a = ['2025-01-02', 1, '100%', 0.0, '0%', 0.0, '0%', nan, nan]
|
16
|
-
# b = ['2025-01-02', 1, '100%', 0.0, '0%', 0.0, '0%', nan, nan]
|
17
|
-
# if a == b:
|
18
|
-
# print(1)
|
19
|
-
# else:
|
20
|
-
# print(2)
|
smartpush-1.0.8.dist-info/RECORD
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
smartpush/__init__.py,sha256=XJrl1vhGATHSeSVqKmPXxYqxyseriUpvY5tLIXir3EE,24
|
2
|
-
smartpush/felix_test.py,sha256=CpB1NMDZ4RAtE028XVYfhxTU7RQPSqlWN6ejGO7ww7I,1020
|
3
|
-
smartpush/get_jira_info.py,sha256=dmCwkKa94xwyE2hegE1KBI3cV_LbrJ67P9osORUGPt4,2633
|
4
|
-
smartpush/export/__init__.py,sha256=D9GbWcmwnetEndFDty5XbVienFK1WjqV2yYcQp3CM84,99
|
5
|
-
smartpush/export/basic/ExcelExportChecker.py,sha256=T9eDPgNh5zekCAdKFu67aHjQPhKQKzK1BUGtn7UQuh0,12187
|
6
|
-
smartpush/export/basic/__init__.py,sha256=6tcrS-2NSlsJo-UwEsnGUmwCf7jgOsh_UEbM0FD-gYE,70
|
7
|
-
smartpush-1.0.8.dist-info/METADATA,sha256=Shg6Xm-PRgQW1n2UFjy9suT2lNAAFMZfjOlYSHJ9VKI,145
|
8
|
-
smartpush-1.0.8.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
9
|
-
smartpush-1.0.8.dist-info/top_level.txt,sha256=5_CXqu08EfbPaKLjuSAOAqCmGU6shiatwDU_ViBGCmg,10
|
10
|
-
smartpush-1.0.8.dist-info/RECORD,,
|
File without changes
|