Skip to content

Commit

Permalink
update version number and make sure ODM Connection saves
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephanie Reeder committed Oct 15, 2015
1 parent 958d33c commit 573daa0
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 41 deletions.
50 changes: 26 additions & 24 deletions odmtools/gui/frmODMTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def __init__(self, **kwargs):

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

self.service_manager = ServiceManager()
self.record_service = None

series_service = self._init_database()
if series_service:
Expand Down Expand Up @@ -116,9 +118,7 @@ def _init_s_Items(self, parent):
def _init_database(self, quit_if_cancel=True):
logger.debug("Loading Database...")

self.service_manager = ServiceManager()
self.record_service = None
series_service = None


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

return series_service

def onChangeDBConn(self, event):
db_config = frmDBConfig.frmDBConfig(None, self.service_manager, False)
value = db_config.ShowModal()
if value == wx.ID_CANCEL:
return

newConnection = db_config.panel.getFieldValues()
self.service_manager.set_current_conn_dict(newConnection)
db_config.Destroy()

if self._init_database(quit_if_cancel=False):
# if editing, stop editing...
if self._ribbon.getEditStatus():
self.stopEdit(event=None)

if value == wx.ID_OK:

series_service = self.createService(newConnection)
self.pnlSelector.resetDB(series_service)
self.refreshConnectionInfo()
self.pnlPlot.clear()
self.dataTable.clear()


def servicesValid(self, service, displayMsg=True):
"""
Expand Down Expand Up @@ -426,28 +449,7 @@ def stopEdit(self, event):
def getRecordService(self):
return self.record_service

def onChangeDBConn(self, event):
db_config = frmDBConfig.frmDBConfig(None, self.service_manager, False)
value = db_config.ShowModal()
if value == wx.ID_CANCEL:
return

newConnection = db_config.panel.getFieldValues()
db_config.Destroy()

if self._init_database(quit_if_cancel=False):
# if editing, stop editing...
if self._ribbon.getEditStatus():
self.stopEdit(event=None)


if value == wx.ID_OK:

series_service = self.createService(newConnection)
self.pnlSelector.resetDB(series_service)
self.refreshConnectionInfo()
self.pnlPlot.clear()
self.dataTable.clear()

def createService(self, conn_dict=""):
"""
Expand Down
2 changes: 1 addition & 1 deletion odmtools/meta/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app_name = "ODMTools"
version = "1.2.1_Beta"
version = "1.2.2_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." \
Expand Down
8 changes: 4 additions & 4 deletions setup/Mac/ODMTools.packproj
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,9 @@
<key>IFPkgDescriptionDescription</key>
<string></string>
<key>IFPkgDescriptionTitle</key>
<string>ODMTools_v1.2.1</string>
<string>ODMTools_v1.2.2</string>
<key>IFPkgDescriptionVersion</key>
<string>1.2.1 Beta</string>
<string>1.2.2 Beta</string>
</dict>
</dict>
<key>Display Information</key>
Expand All @@ -584,7 +584,7 @@
<key>CFBundleName</key>
<string>ODMTools</string>
<key>CFBundleShortVersionString</key>
<string>1.2.1</string>
<string>1.2.2</string>
</dict>
<key>Options</key>
<dict>
Expand Down Expand Up @@ -619,7 +619,7 @@
<key>IFPkgFlagPackageSelection</key>
<integer>0</integer>
<key>Name</key>
<string>ODMTools_v1.2.1-beta_Mac_installer</string>
<string>ODMTools_v1.2.2-beta_Mac_installer</string>
<key>Status</key>
<integer>1</integer>
<key>Type</key>
Expand Down
8 changes: 4 additions & 4 deletions setup/Windows/odmtools_console.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "ODMTools"
#define MyAppVersion "1.2.1_Beta"
#define MyAppVersion "1.2.2_Beta"
#define MyAppPublisher "ODM2"
#define MyAppURL "https://github.com/ODM2/ODMToolsPython"
#define MyAppExeName "ODMTools_1.2.1_Beta_win32_x86_64_console.exe"
#define MyAppExeName "ODMTools_{#MyAppVersion}_win32_x86_64_console.exe"
#define MyAppDir "D:\DEV\ODMToolsPython"

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

[Files]
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
Source: "{#MyAppDir}\setup\Dist\ODMTools_1.2.1_Beta_win32_x86_64_console\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MyAppDir}\setup\Dist\{#MyAppName}_{#MyAppVersion}_win32_x86_64_console\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppDir}\setup\Dist\{#MyAppName}_{#MyAppVersion}_win32_x86_64_console\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Expand Down
8 changes: 4 additions & 4 deletions setup/Windows/odmtools_no_console.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "ODMTools"
#define MyAppVersion "1.2.1_Beta"
#define MyAppVersion "1.2.2_Beta"
#define MyAppPublisher "ODM2"
#define MyAppURL "https://github.com/ODM2/ODMToolsPython"
#define MyAppExeName "ODMTools_1.2.1_Beta_win32_x86_64.exe"
#define MyAppExeName "{#MyAppName}_{#MyAppVersion}_win32_x86_64.exe"
#define MyAppDir "D:\DEV\ODMToolsPython"

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

[Files]
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
Source: "{#MyAppDir}\setup\Dist\ODMTools_1.2.1_Beta_win32_x86_64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MyAppDir}\setup\Dist\{#MyAppName}_{#MyAppVersion}_win32_x86_64\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppDir}\setup\Dist\{#MyAppName}_{#MyAppVersion}_win32_x86_64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Expand Down
4 changes: 2 additions & 2 deletions setup/Windows/odmtools_setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

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

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

Expand Down
4 changes: 2 additions & 2 deletions setup/version.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ VSVersionInfo(
u'040904b0',
[StringStruct(u'CompanyName', u'Utah Water Research Laboratory'),
StringStruct(u'ProductName', u'ODMTools'),
StringStruct(u'ProductVersion', u'1.2.1 beta'),
StringStruct(u'ProductVersion', u'1.2.2 beta'),
StringStruct(u'InternalName', u'ODMTools'),
StringStruct(u'OriginalFilename', u'ODMTools.exe'),
StringStruct(u'FileVersion', u'1.2.1 beta'),
StringStruct(u'FileVersion', u'1.2.2 beta'),
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.'),
StringStruct(u'LegalCopyright', u'Copyright (c) 2013, Utah State University. All rights reserved.'),
StringStruct(u'LegalTrademarks', u'N/A'),])
Expand Down

0 comments on commit 573daa0

Please sign in to comment.