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

12 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2025-12-31 11:58 +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 meta.set_imported_timezone(0) 

21 

22 return meta 

23 

24 

25def load_custom_from_file(path): 

26 """ 

27 Import data from file and convert them into df 

28 

29 Args: 

30 path: absolute path to file 

31 

32 Returns: 

33 pd.Dataframe: as raw as possible 

34 """ 

35 

36 ### load file to Dataframe 

37 

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

39 

40 ### return data frame 

41 return "DataFrame"