Coverage for aixweather/imports/custom_file.py: 27%

11 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2025-01-06 16:01 +0000

1""" 

2change this file to your custom requirements (only import and perform as 

3little preprocessing as possible) 

4""" 

5 

6from aixweather.imports.utils_import import MetaData 

7 

8 

9def load_custom_meta_data(): 

10 """ 

11 define or load your meta data here 

12 """ 

13 

14 meta = MetaData() 

15 meta.station_name = "" 

16 meta.input_source = f"Custom data" 

17 meta.altitude = "" 

18 meta.longitude = "" 

19 meta.latitude = "" 

20 

21 return meta 

22 

23 

24def load_custom_from_file(path): 

25 """ 

26 Import data from file and convert them into df 

27 

28 Args: 

29 path: absolute path to file 

30 

31 Returns: 

32 pd.Dataframe: as raw as possible 

33 """ 

34 

35 ### load file to Dataframe 

36 

37 ### convert timestamp to datetime and set as index 

38 

39 ### return data frame 

40 return "DataFrame"