diff --git a/odmtools/controller/olvSeriesSelector.py b/odmtools/controller/olvSeriesSelector.py index e408768..a396e98 100644 --- a/odmtools/controller/olvSeriesSelector.py +++ b/odmtools/controller/olvSeriesSelector.py @@ -47,18 +47,19 @@ def onKeyPress(self, evt): pass def _buildColumns(self, columns): - seriesColumns = [ - ColumnDefn(key, align="left", minimumWidth=100, valueGetter=key, - # stringConverter = '%s') - stringConverter='%Y-%m-%d %H:%M:%S' if ("date" in key.lower()) else '%s') - for key in columns] + series_columns = [] + for key in columns: + col = ColumnDefn(title=key, + minimumWidth=100, + valueGetter=key, + stringConverter=date_to_string if ("date" in key.lower()) else '%s') + series_columns.append(col) - self.SetColumns(seriesColumns) + self.SetColumns(series_columns) self.CreateCheckStateColumn() """User can select series_service using the mouse to click on check boxes """ - def _HandleLeftDownOnImage(self, rowIndex, subItemIndex): """ This is the same code, just added the original _HandleLeftDownOnImage in ObjectListView but @@ -109,6 +110,11 @@ def GetModelObjects(self): return self._modelObjects if self._modelObjects else [] +def date_to_string(value): + try: + return value.strftime("%Y-%m-%d %H:%M:%S") + except AttributeError: + return "" diff --git a/odmtools/meta/data.py b/odmtools/meta/data.py index 45c8988..997f9fc 100644 --- a/odmtools/meta/data.py +++ b/odmtools/meta/data.py @@ -1,5 +1,5 @@ app_name = "ODM2Tools" -version = "2.0.0_Beta" +version = "2.0.1_Beta" copyright = "Copyright (c) 2013 - 2015, Utah State University. All rights reserved." description = "ODMTools is a python application for managing observational data using the Observations Data Model. " \ "ODMTools allows you to query, visualize, and edit data stored in an Observations Data Model (ODM) database." \ diff --git a/odmtools/odmdata/memory_database.py b/odmtools/odmdata/memory_database.py index e5d8c14..e300244 100644 --- a/odmtools/odmdata/memory_database.py +++ b/odmtools/odmdata/memory_database.py @@ -81,6 +81,9 @@ def get_annotations(self, query_db_again=False): annotation = self.series_service.get_annotations_by_result(resultid=result_id) self.results_annotations = annotation + return self.results_annotations + + def getDataValues(self): # TODO: fix me! this commit location is only temoporarily. should be flushing so that we can restore self.mem_service._session.commit() diff --git a/odmtools/odmservices/edit_service.py b/odmtools/odmservices/edit_service.py index 439a694..32125e1 100644 --- a/odmtools/odmservices/edit_service.py +++ b/odmtools/odmservices/edit_service.py @@ -705,7 +705,6 @@ def overlapcalc(self, result, values, overwrite): def add_annotations(self, annolist): # match up with existing values and get value id - print("Adding Annotations") engine = self.memDB.series_service._session_factory.engine q =self.memDB.series_service._session.query(TimeSeriesResultValues) \ diff --git a/setup/Windows/odmtools_console.iss b/setup/Windows/odmtools_console.iss index 1190aca..4899e45 100644 --- a/setup/Windows/odmtools_console.iss +++ b/setup/Windows/odmtools_console.iss @@ -3,8 +3,8 @@ #define MyAppName "ODM2Tools" -#define MyAppVersion "2.0.0_Beta" -#define MyAppExeLongName "ODM2Tools_2.0.0_Beta_win32_x86_64_console.exe" +#define MyAppVersion "2.0.1_Beta" +#define MyAppExeLongName "ODM2Tools_2.0.1_Beta_win32_x86_64_console.exe" #define MyAppPublisher "ODM2" #define MyAppURL "https://github.com/ODM2/ODMToolsPython" #define MyAppExeName "ODM2Tools.exe" diff --git a/setup/Windows/odmtools_no_console.iss b/setup/Windows/odmtools_no_console.iss index 5f98bcc..adde9b8 100644 --- a/setup/Windows/odmtools_no_console.iss +++ b/setup/Windows/odmtools_no_console.iss @@ -4,8 +4,8 @@ #define MyAppName "ODMTools" -#define MyAppExeLongName "ODM2Tools_2.0.0_Beta_win32_x86_64.exe" -#define MyAppVersion "2.0.0_Beta" +#define MyAppExeLongName "ODM2Tools_2.0.1_Beta_win32_x86_64.exe" +#define MyAppVersion "2.0.1_Beta" #define MyAppPublisher "ODM2" #define MyAppURL "https://github.com/ODM2/ODMToolsPython" diff --git a/setup/Windows/odmtools_setup.iss b/setup/Windows/odmtools_setup.iss index a62d90f..a035311 100644 --- a/setup/Windows/odmtools_setup.iss +++ b/setup/Windows/odmtools_setup.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "ODM2Tools" -#define MyAppVersion "2.0.0_Beta" +#define MyAppVersion "2.0.1_Beta" #define MyAppPublisher "ODM2" #define MyAppURL "https://github.com/ODM2/ODMToolsPython" #define MyAppExeName "ODM2Tools.exe" diff --git a/setup/Windows/odmtools_setup_build.iss b/setup/Windows/odmtools_setup_build.iss index 45726fc..7c428de 100644 --- a/setup/Windows/odmtools_setup_build.iss +++ b/setup/Windows/odmtools_setup_build.iss @@ -5,7 +5,7 @@ #define MyAppName "ODM2Tools" #define OrgName "UCHIC" -#define MyAppVersion "v2.0.0-beta" +#define MyAppVersion "v2.0.1-beta" #define MyAppURL "https://github.com/ODM2/ODMToolsPython" [Setup] diff --git a/setup/Windows/test.iss b/setup/Windows/test.iss index 12911f6..a420b09 100644 --- a/setup/Windows/test.iss +++ b/setup/Windows/test.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "ODM2Tools" -#define MyAppVersion "2.0.0" +#define MyAppVersion "2.0.1" #define MyAppPublisher "My Company, Inc." #define MyAppURL "http://www.example.com/" #define MyAppExeName "ODM2Tools_console.exe"