app.py 968 B

1234567891011121314151617181920212223242526272829303132
  1. # -*- coding: utf-8 -*-
  2. # @Time : 2024/5/17
  3. # @Author : 魏志亮
  4. import datetime
  5. from base.TranseParam import TranseParam
  6. from base.WindFarms import WindFarms
  7. from utils.conf.read_conf import read_yaml_file
  8. if __name__ == '__main__':
  9. batch_no = datetime.datetime.now().strftime("%Y%m%d%H%M")
  10. name = '招远'
  11. type = 'sec'
  12. yaml_datas = read_yaml_file(name, type)
  13. time_col = yaml_datas['time_col']
  14. wind_col = yaml_datas['turbine_col']
  15. print(wind_col)
  16. cols_trans_all = yaml_datas['trans_col']
  17. read_cols = [v for k, v in cols_trans_all.items() if v]
  18. zhaoyuan = WindFarms(name, batch_no=batch_no, save_path=r"/home/wzl/trans_data")
  19. params = TranseParam(read_type="sec", read_path=r"/home/wzl/test_data/zhaoyuan/sec",
  20. read_cols=read_cols,
  21. cols_tran=cols_trans_all, time_col=time_col, wind_col=wind_col)
  22. zhaoyuan.set_trans_param(params)
  23. files = zhaoyuan.run()