Skip to content

Commit 573daa0

Browse files
author
Stephanie Reeder
committed
update version number and make sure ODM Connection saves
1 parent 958d33c commit 573daa0

File tree

7 files changed

+43
-41
lines changed

7 files changed

+43
-41
lines changed

odmtools/gui/frmODMTools.py

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def __init__(self, **kwargs):
5050

5151
wx.Frame.__init__(self, **kwargs)
5252

53+
self.service_manager = ServiceManager()
54+
self.record_service = None
5355

5456
series_service = self._init_database()
5557
if series_service:
@@ -116,9 +118,7 @@ def _init_s_Items(self, parent):
116118
def _init_database(self, quit_if_cancel=True):
117119
logger.debug("Loading Database...")
118120

119-
self.service_manager = ServiceManager()
120-
self.record_service = None
121-
series_service = None
121+
122122

123123
while True:
124124
## Database connection is valid, therefore proceed through the rest of the program
@@ -152,6 +152,29 @@ def _init_database(self, quit_if_cancel=True):
152152

153153
return series_service
154154

155+
def onChangeDBConn(self, event):
156+
db_config = frmDBConfig.frmDBConfig(None, self.service_manager, False)
157+
value = db_config.ShowModal()
158+
if value == wx.ID_CANCEL:
159+
return
160+
161+
newConnection = db_config.panel.getFieldValues()
162+
self.service_manager.set_current_conn_dict(newConnection)
163+
db_config.Destroy()
164+
165+
if self._init_database(quit_if_cancel=False):
166+
# if editing, stop editing...
167+
if self._ribbon.getEditStatus():
168+
self.stopEdit(event=None)
169+
170+
if value == wx.ID_OK:
171+
172+
series_service = self.createService(newConnection)
173+
self.pnlSelector.resetDB(series_service)
174+
self.refreshConnectionInfo()
175+
self.pnlPlot.clear()
176+
self.dataTable.clear()
177+
155178

156179
def servicesValid(self, service, displayMsg=True):
157180
"""
@@ -426,28 +449,7 @@ def stopEdit(self, event):
426449
def getRecordService(self):
427450
return self.record_service
428451

429-
def onChangeDBConn(self, event):
430-
db_config = frmDBConfig.frmDBConfig(None, self.service_manager, False)
431-
value = db_config.ShowModal()
432-
if value == wx.ID_CANCEL:
433-
return
434-
435-
newConnection = db_config.panel.getFieldValues()
436-
db_config.Destroy()
437-
438-
if self._init_database(quit_if_cancel=False):
439-
# if editing, stop editing...
440-
if self._ribbon.getEditStatus():
441-
self.stopEdit(event=None)
442-
443-
444-
if value == wx.ID_OK:
445452

446-
series_service = self.createService(newConnection)
447-
self.pnlSelector.resetDB(series_service)
448-
self.refreshConnectionInfo()
449-
self.pnlPlot.clear()
450-
self.dataTable.clear()
451453

452454
def createService(self, conn_dict=""):
453455
"""

odmtools/meta/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
app_name = "ODMTools"
2-
version = "1.2.1_Beta"
2+
version = "1.2.2_Beta"
33
copyright = "Copyright (c) 2013 - 2015, Utah State University. All rights reserved."
44
description = "ODMTools is a python application for managing observational data using the Observations Data Model. " \
55
"ODMTools allows you to query, visualize, and edit data stored in an Observations Data Model (ODM) database." \

setup/Mac/ODMTools.packproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,9 @@
566566
<key>IFPkgDescriptionDescription</key>
567567
<string></string>
568568
<key>IFPkgDescriptionTitle</key>
569-
<string>ODMTools_v1.2.1</string>
569+
<string>ODMTools_v1.2.2</string>
570570
<key>IFPkgDescriptionVersion</key>
571-
<string>1.2.1 Beta</string>
571+
<string>1.2.2 Beta</string>
572572
</dict>
573573
</dict>
574574
<key>Display Information</key>
@@ -584,7 +584,7 @@
584584
<key>CFBundleName</key>
585585
<string>ODMTools</string>
586586
<key>CFBundleShortVersionString</key>
587-
<string>1.2.1</string>
587+
<string>1.2.2</string>
588588
</dict>
589589
<key>Options</key>
590590
<dict>
@@ -619,7 +619,7 @@
619619
<key>IFPkgFlagPackageSelection</key>
620620
<integer>0</integer>
621621
<key>Name</key>
622-
<string>ODMTools_v1.2.1-beta_Mac_installer</string>
622+
<string>ODMTools_v1.2.2-beta_Mac_installer</string>
623623
<key>Status</key>
624624
<integer>1</integer>
625625
<key>Type</key>

setup/Windows/odmtools_console.iss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "ODMTools"
5-
#define MyAppVersion "1.2.1_Beta"
5+
#define MyAppVersion "1.2.2_Beta"
66
#define MyAppPublisher "ODM2"
77
#define MyAppURL "https://github.com/ODM2/ODMToolsPython"
8-
#define MyAppExeName "ODMTools_1.2.1_Beta_win32_x86_64_console.exe"
8+
#define MyAppExeName "ODMTools_{#MyAppVersion}_win32_x86_64_console.exe"
99
#define MyAppDir "D:\DEV\ODMToolsPython"
1010

1111
[Setup]
@@ -37,8 +37,8 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
3737
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
3838

3939
[Files]
40-
Source: "{#MyAppDir}\setup\Dist\ODMTools_1.2.1_Beta_win32_x86_64_console\ODMTools_1.2.0_Beta_win32_x86_64_console.exe"; DestDir: "{app}"; Flags: ignoreversion
41-
Source: "{#MyAppDir}\setup\Dist\ODMTools_1.2.1_Beta_win32_x86_64_console\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
40+
Source: "{#MyAppDir}\setup\Dist\{#MyAppName}_{#MyAppVersion}_win32_x86_64_console\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
41+
Source: "{#MyAppDir}\setup\Dist\{#MyAppName}_{#MyAppVersion}_win32_x86_64_console\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
4242
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
4343

4444
[Icons]

setup/Windows/odmtools_no_console.iss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "ODMTools"
5-
#define MyAppVersion "1.2.1_Beta"
5+
#define MyAppVersion "1.2.2_Beta"
66
#define MyAppPublisher "ODM2"
77
#define MyAppURL "https://github.com/ODM2/ODMToolsPython"
8-
#define MyAppExeName "ODMTools_1.2.1_Beta_win32_x86_64.exe"
8+
#define MyAppExeName "{#MyAppName}_{#MyAppVersion}_win32_x86_64.exe"
99
#define MyAppDir "D:\DEV\ODMToolsPython"
1010

1111
[Setup]
@@ -37,8 +37,8 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
3737
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
3838

3939
[Files]
40-
Source: "{#MyAppDir}\setup\Dist\ODMTools_1.2.1_Beta_win32_x86_64\ODMTools_1.2.1_Beta_win32_x86_64.exe"; DestDir: "{app}"; Flags: ignoreversion
41-
Source: "{#MyAppDir}\setup\Dist\ODMTools_1.2.1_Beta_win32_x86_64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
40+
Source: "{#MyAppDir}\setup\Dist\{#MyAppName}_{#MyAppVersion}_win32_x86_64\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
41+
Source: "{#MyAppDir}\setup\Dist\{#MyAppName}_{#MyAppVersion}_win32_x86_64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
4242
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
4343

4444
[Icons]

setup/Windows/odmtools_setup.iss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "ODMTools"
5-
#define MyAppVersion "1.2.1_Beta"
5+
#define MyAppVersion "1.2.2_Beta"
66
#define MyAppPublisher "ODM2"
77
#define MyAppURL "https://github.com/ODM2/ODMToolsPython"
88
#define MyAppExeName "ODMTools.exe"
@@ -37,7 +37,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
3737
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
3838

3939
[Files]
40-
Source: "{#MyAppDir}\setup\Windows\ODMTools\ODMTools.exe"; DestDir: "{app}"; Flags: ignoreversion
40+
Source: "{#MyAppDir}\setup\Windows\ODMTools\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
4141
Source: "{#MyAppDir}\setup\Windows\ODMTools\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
4242
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
4343

setup/version.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ VSVersionInfo(
3131
u'040904b0',
3232
[StringStruct(u'CompanyName', u'Utah Water Research Laboratory'),
3333
StringStruct(u'ProductName', u'ODMTools'),
34-
StringStruct(u'ProductVersion', u'1.2.1 beta'),
34+
StringStruct(u'ProductVersion', u'1.2.2 beta'),
3535
StringStruct(u'InternalName', u'ODMTools'),
3636
StringStruct(u'OriginalFilename', u'ODMTools.exe'),
37-
StringStruct(u'FileVersion', u'1.2.1 beta'),
37+
StringStruct(u'FileVersion', u'1.2.2 beta'),
3838
StringStruct(u'FileDescription', u'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.ODMTools was originally developed as part of the CUAHSI Hydrologic Information System.'),
3939
StringStruct(u'LegalCopyright', u'Copyright (c) 2013, Utah State University. All rights reserved.'),
4040
StringStruct(u'LegalTrademarks', u'N/A'),])

0 commit comments

Comments
 (0)