def it(name="demo"): # 创建It目录 root_path = mkdir(os.getcwd() + '/IT') path = mkdir(root_path + '/' + name) path_model = path + '/model' mkdir(path_model) tpl('/it/model_init.py', path_model + '/__init__.py') path_model_tpl = path + '/model/tpl' mkdir(path_model_tpl) path_apis = path + '/apis' mkdir(path_apis) path_config = path + '/config' mkdir(path_config) path_apis_user = path_apis + '/user' mkdir(path_apis_user) init_file(path_apis_user) # 创建空__init__.py mkdir(path + '/temp') # 创建yaml文件 _fun_config_yaml(path_config) # 创建入口文件 tpl('/it/run.py', path + '/run.py') # 创建testrunner.py tpl('/it/model_testrunner.py', path_model + '/testrunner.py') # 创建report.py tpl('/it/model_report.py', path_model + '/report.py') # 创建test.py tpl('/it/model_test.py', path_model + '/test.py') # 创建html模板 _fun_write_model_tpl_chart(path_model_tpl) _fun_write_model_tpl_content(path_model_tpl) _fun_write_model_tpl_nav(path_model_tpl) _fun_write_model_tpl_template(path_model_tpl) _fun_write_model_tpl_mail_html(path_model_tpl) # 创建login_st.py # tpl('/it/apis_login_st.py', path_apis_user + '/login_st.py') Make(path).start()
def _fun_write_run(path): tpl('/sm/run.py', path + '/run.py')
def _fun_write_main(path): tpl('/st/main.py', path + '/main.py')
def _fun_write_task(path): tpl('/st/task.py', path + '/task.py')
def _fun_write_auth(path): tpl('/st/auth.py', path + '/auth.py')