import unittest
import glob
import weio
import os
import numpy as np
# MyDir=os.path.dirname(__file__)
#fileformat,F = weio.detectFormat('_tests/FASTIn_ED_bld.dat')
#F = weio.CSVFile('_tests/CSVComma_Fail.csv')
#F = weio.read('_tests/FASTIn_ED.dat')
# F = weio.read('FASTIn_SbD.dat')
# F = weio.FASTInFile(filename='FASTIn_SbD_out.dat')
# F = weio.read('_tests/FASTIn_SbD.dat')
# F = weio.FASTInFile('FASTIn_HD.dat')
# print(F.toString())
# F.write(F.filename.replace('.dat','_out.dat'))

# testfile='InputDecks/Main_BAR_Test_8ms.fst'
# testfile='InputDecks/SNLV27_F7.fst'
# testfile='InputDecks/RotorSE_FAST_BAR_005a_AeroDyn14_25stations_New.dat'
# testfile='InputDecks/SNLV27_AeroDyn14.dat'
# F = weio.FASTInputDeck(testfile)
# F = weio.FASTInFile(testfile)
# print(F)
# import pydatview.fastlib as fastlib
# fastlib.spanwisePostPro(testfile,avgMethod='constantwindow',avgParam=5,out_ext='.outb',postprofile=None,df=None)
# fastlib.spanwisePostPro(testfile,avgMethod='constantwindow',avgParam=5,out_ext='.elm',postprofile=None,df=None)

#F.toDataFrame()
#print(F)
#print(fileformat)
#print(F.toDataFrame())
