siat 3.0.20__py3-none-any.whl → 3.0.25__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.
siat/common.py
CHANGED
@@ -3755,35 +3755,60 @@ def df_display_CSS(df,titletxt='',footnote='',facecolor='papayawhip',decimals=2,
|
|
3755
3755
|
return
|
3756
3756
|
|
3757
3757
|
#==============================================================================
|
3758
|
-
|
3758
|
+
if __name__=='__main__':
|
3759
|
+
upgrade_siat()
|
3760
|
+
|
3761
|
+
def upgrade_siat(module_list=['siat','akshare','pandas','pandas_datareader', \
|
3762
|
+
'yfinance','yahooquery','urllib3','twine'], \
|
3763
|
+
pipcmd="pip install --upgrade"):
|
3759
3764
|
"""
|
3760
3765
|
功能:一次性升级siat及其相关插件
|
3761
3766
|
|
3762
|
-
|
3767
|
+
注意:pip的路径问题!
|
3763
3768
|
"""
|
3764
|
-
|
3769
|
+
print(" Try upgrading siat and related modules, please wait ... ...")
|
3770
|
+
#获取系统目录
|
3765
3771
|
import sys
|
3766
|
-
|
3772
|
+
syspath=sys.path
|
3773
|
+
|
3774
|
+
#判断目录分隔符号
|
3775
|
+
win_sep='\\'; win_flag=False
|
3776
|
+
mac_sep='//'; mac_flag=False
|
3777
|
+
|
3778
|
+
sp_list=syspath[0].split(win_sep)
|
3779
|
+
if len(sp_list) > 1:
|
3780
|
+
win_flag=True
|
3781
|
+
|
3782
|
+
sp_list=syspath[0].split(mac_sep)
|
3783
|
+
if len(sp_list) > 1:
|
3784
|
+
win_flag=True
|
3767
3785
|
|
3768
|
-
|
3769
|
-
|
3770
|
-
|
3786
|
+
if win_flag:
|
3787
|
+
sep_flag=win_sep
|
3788
|
+
else:
|
3789
|
+
sep_flag=mac_sep
|
3790
|
+
|
3791
|
+
#寻找anaconda3的安装目录
|
3792
|
+
for sp in syspath:
|
3793
|
+
sp_list=sp.split(sep_flag)
|
3794
|
+
if sp_list[-1] == 'anaconda3': break
|
3795
|
+
|
3796
|
+
#生成pip命令字符串前半段,仅缺插件名
|
3797
|
+
cmdstr=sp+sep_flag+'Scripts'+sep_flag+pipcmd+' '
|
3771
3798
|
|
3799
|
+
#逐个升级插件
|
3772
3800
|
import subprocess
|
3773
|
-
for
|
3774
|
-
|
3775
|
-
|
3776
|
-
#
|
3777
|
-
|
3778
|
-
|
3779
|
-
if
|
3780
|
-
|
3781
|
-
|
3782
|
-
print(' Upgrade failed:', result.returncode)
|
3783
|
-
print(' Error message:', result.stderr)
|
3801
|
+
for m in module_list:
|
3802
|
+
cmdstr1=cmdstr+m
|
3803
|
+
#print(cmdstr1)
|
3804
|
+
#proc=subprocess.run(cmdstr1.split(' '),stdout=subprocess.PIPE)
|
3805
|
+
proc=subprocess.run(cmdstr1.split(' '))
|
3806
|
+
rcode=proc.returncode
|
3807
|
+
if rcode==0: result='successfully upgraded:-)'
|
3808
|
+
else: result='failed to upgrade, try alternative method:-('
|
3809
|
+
print(" Module:",m,'\b,',result)
|
3784
3810
|
|
3785
3811
|
return
|
3786
|
-
|
3787
3812
|
#==============================================================================
|
3788
3813
|
#==============================================================================
|
3789
3814
|
#==============================================================================
|
@@ -17,7 +17,7 @@ siat/capm_beta.py,sha256=cxXdRVBQBllhbfz1LeTJAIWvyRYhW54nhtNUXv4HwS0,29063
|
|
17
17
|
siat/capm_beta2.py,sha256=hta-X1iWPjNbG1YYIVlQF-YvKA8An3KuEyLmUEZ3hH8,25562
|
18
18
|
siat/capm_beta_test.py,sha256=ImR0c5mc4hIl714XmHztdl7qg8v1E2lycKyiqnFj6qs,1745
|
19
19
|
siat/cmat_commons.py,sha256=Nj9Kf0alywaztVoMVeVVL_EZk5jRERJy8R8kBw88_Tg,38116
|
20
|
-
siat/common.py,sha256=
|
20
|
+
siat/common.py,sha256=s9itecI3JgX5dfrodiFHKcjs5HsOihAMVW8yaETlHMQ,140584
|
21
21
|
siat/compare_cross.py,sha256=3iP9TH2h3w27F2ARZc7FjKcErYCzWRc-TPiymOyoVtw,24171
|
22
22
|
siat/compare_cross_test.py,sha256=xra5XYmQGEtfIZL2h-GssdH2hLdFIhG3eoCrkDrL3gY,3473
|
23
23
|
siat/concepts_iwencai.py,sha256=m1YEDtECRT6FqtzlKm91pt2I9d3Z_XoP59BtWdRdu8I,3061
|
@@ -132,7 +132,7 @@ siat/valuation.py,sha256=NKfeZMdDJOW42oLVHob6eSVBXUqlN1OCnnzwyGAst8c,48855
|
|
132
132
|
siat/valuation_china.py,sha256=Tde2LzPDQy3Z7xOQQDw4ckQMPdROp_z0-GjFE6Z5_lI,67639
|
133
133
|
siat/valuation_market_china_test.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
|
134
134
|
siat/var_model_validation.py,sha256=f-oDewg7bPzyNanz_Y_jLH68NowAA3gXFehW_weKGG0,14898
|
135
|
-
siat-3.0.
|
136
|
-
siat-3.0.
|
137
|
-
siat-3.0.
|
138
|
-
siat-3.0.
|
135
|
+
siat-3.0.25.dist-info/METADATA,sha256=AiUF8-PiZRMcVtJ3k7R-oCgYu9C5Hg1wE5WTNxOZ1qk,1448
|
136
|
+
siat-3.0.25.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
137
|
+
siat-3.0.25.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
|
138
|
+
siat-3.0.25.dist-info/RECORD,,
|
File without changes
|
File without changes
|