File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,17 +82,24 @@ def compile_sbd(
8282 if var_type == 'pandas' :
8383 df = pandas .DataFrame (data )
8484 errors = pandas .DataFrame (errors )
85+
8586 if not df .empty :
8687 to_pandas_datetime_index (df )
8788 else :
8889 warnings .warn ("Empty DataFrame; if you expected data, make sure "
8990 "the `buoy_id` is a valid microSWIFT ID and that "
9091 "`start_date` and `end_date` are correct." )
92+
93+ if not errors .empty :
94+ errors = errors .sort_values (by = 'file_name' )
95+ errors .reset_index (drop = True , inplace = True )
96+
97+ #TODO: concatenate dfs?
9198 return df , errors
9299
93100 if var_type == 'xarray' : # TODO: support for xarray
94101 raise NotImplementedError ('xarray is not supported yet' )
95-
102+ #TODO: should this be 'dataframe' and 'dataset'?
96103 raise ValueError ("var_type can only be 'dict', 'pandas', or 'xarray'" )
97104
98105
@@ -116,7 +123,6 @@ def to_pandas_datetime_index(
116123 df [datetime_column ] = to_datetime (df ['datetime' ], utc = True )
117124 df .set_index ('datetime' , inplace = True )
118125 df .sort_index (inplace = True )
119- # df.drop(['datetime'], axis=1, inplace=True)
120126
121127
122128def _combine_dict_list (dict_list ):
Original file line number Diff line number Diff line change 44# Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z"
55_version_major = 0
66_version_minor = 3
7- _version_micro = 2 # use '' for first of series, number for 1 and above
7+ _version_micro = 3 # use '' for first of series, number for 1 and above
88# _version_extra = 'dev'
99_version_extra = '' # TODO: Uncomment this for full releases
1010
Original file line number Diff line number Diff line change 33from setuptools import setup , find_packages
44PACKAGES = find_packages ()
55
6- # Get version and release info, which is all stored in littlebuoybigwaves/ version.py
6+ # Get version and release info from version.py
77ver_file = os .path .join ('microSWIFTtelemetry' , 'version.py' )
88with open (ver_file ) as f :
99 exec (f .read ())
You can’t perform that action at this time.
0 commit comments