Skip to content

Commit 4d2fa75

Browse files
authored
Merge pull request #91 from ODM2/development
Development
2 parents 019e331 + 87cbf59 commit 4d2fa75

File tree

11 files changed

+45
-27
lines changed

11 files changed

+45
-27
lines changed

Developer_setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
1919
2020
### Feedback
21-
Comments and concenrns can be posted on our GitHib page: https://github.com/ODM2/ODM2StreamingDataLoader/issues.
21+
Comments and concerns can be posted on our GitHib page: https://github.com/ODM2/ODM2StreamingDataLoader/issues.

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,13 @@ def mac_pyinstaller(Name = None, File = None):
212212
'--noconfirm ' + File)
213213

214214
APP_DIR = os.path.join(MAC_DIR, 'Dist', Name+".app")
215-
os.system("cp /Users/denversmith/miniconda/envs/SDL-env/lib/libwx_osx_cocoau-3.0.0.0.0.dylib %s" % os.path.join(APP_DIR, "Contents", "MacOS"))
215+
216+
217+
#/Users/denversmith/miniconda/envs/SDL-env/lib/libwx_osx_cocoau-3.0.0.0.0.dylib
218+
path = os.path.dirname(os.path.dirname(sys.executable))
219+
220+
python = os.path.join(path, 'lib', 'libwx_osx_cocoau-3.0.0.0.0.dylib')
221+
os.system("cp %s %s" %(python, os.path.join(APP_DIR, "Contents", "MacOS")))
216222

217223
return True
218224
except Exception as e:

setup/Windows/sdl_setup.iss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
#define MyAppName "StreamingDataLoader"
55
#define MyAppInstaller "SDL"
66
#define MyWizExeName "SDLLoader"
7-
#define MyAppVersion "v0.6.0-beta"
7+
#define MyAppVersion "v0.7.0-beta"
88
#define MyAppPublisher "ODM2"
99
#define MyAppURL "https://github.com/ODM2/ODM2StreamingDataLoader"
1010

11-
#define MyAppDir "D:\DEV\SDL"
11+
#define MyAppDir "D:\DEV\SDL\dist"
1212

1313

1414
[Setup]
@@ -28,7 +28,7 @@ DefaultGroupName={#MyAppName}
2828
LicenseFile={#MyAppDir}\LICENSE.txt
2929
OutputBaseFilename={#MyAppInstaller}_{#MyAppVersion}_Installer
3030
;SetupIconFile={#MyAppDir}\src\common\icons\SDL.ico
31-
SetupIconFile=D:\DEV\Releases\SDL\sdl_beta_source_code\src\common\icons\SDL.ico
31+
SetupIconFile=D:\DEV\SDL\src\common\icons\SDL.ico
3232
Compression=lzma
3333
SolidCompression=yes
3434
OutputDir={#MyAppDir}\setup\Dist

setup/hooks/hook-sqlalchemy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
# Contributed by Greg Copeland
2020

21-
from PyInstaller.hooks.hookutils import exec_statement
21+
from PyInstaller.utils.hooks import exec_statement
2222

2323
# include most common database bindings
2424
# some database bindings are detected and include some

src/StreamingDataLoader.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414

1515
import os
1616
import sys
17-
sys.path.insert(0,os.path.dirname(os.path.dirname(__file__)))
17+
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
1818

1919
from argparse import ArgumentParser
2020
import logging
2121

22-
from models.YamlConfiguration import YamlConfiguration
23-
from controllers.Mapper import Mapper
24-
from lib.Appdirs.appdirs import user_config_dir
22+
from src.models.YamlConfiguration import YamlConfiguration
23+
from src.controllers.Mapper import Mapper
24+
from src.lib.Appdirs.appdirs import user_config_dir
2525

2626
import numpy as np
2727

src/asdf

Whitespace-only changes.

src/controllers/Mapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import logging
66
import datetime
77
from dateutil.parser import parse
8-
from handlers.csvHandler import CSVReader
9-
from controllers.Database import Database
8+
from src.handlers.csvHandler import CSVReader
9+
from src.controllers.Database import Database
1010

1111
logger = logging.getLogger('SDL_logger')
1212

src/meta/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
app_name = "Streaming Data Loader"
2-
version = "0.6.0_Beta"
2+
version = "0.7.0_Beta"
33
copyright = "Copyright (c) 2013 - 2015, Utah State University. All rights reserved."
44
description = "Streaming Data Loader a program for streaming continuous sensor data into an instance of the Observations Data Model (ODM)"
55

src/wizard/controller/frmDatabaseConfigPanel.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
from src.wizard.controller.frmChainedDialogPage import ChainedDialogPage
1010
from src.controllers.Database import Database
1111

12+
from urllib import quote_plus as urlquote
13+
1214
class DatabaseConfigPanel(ChainedDialogPage,
1315
clsDBConfiguration):
1416

@@ -39,23 +41,26 @@ def setInput(self, data):
3941

4042
def onTestConnection(self, event):
4143
conn_dict = self.getFieldValues()
42-
if self.validateInput(conn_dict['Database']):
44+
try:
45+
self.validateInput(conn_dict['Database'])
4346
self.conn_dict = conn_dict
4447
self.parent.nextButton.Enable(True)
45-
else:
48+
except:
4649
self.parent.nextButton.Enable(False)
47-
48-
def sanitizeFieldValues(self, value):
49-
value = value.replace(';','')
50-
return value
50+
message = "Invalid connection!"
51+
title = "Connection Error"
52+
ico = wx.ICON_EXCLAMATION
53+
wx.MessageBox(message=message,
54+
caption=title,
55+
style=wx.OK | ico)
5156

5257
def getFieldValues(self):
5358
conn_dict = {}
5459
conn_dict['Engine'] = self.choices[self.cbDatabaseType.GetValue()] if self.cbDatabaseType.GetValue() != '' else ''
55-
conn_dict['UserName'] = self.sanitizeFieldValues(str(self.txtUser.GetValue()))
56-
conn_dict['Password'] = self.sanitizeFieldValues(str(self.txtPass.GetValue()))
57-
conn_dict['Address'] = self.sanitizeFieldValues(str(self.txtServer.GetValue()))
58-
conn_dict['DatabaseName'] = self.sanitizeFieldValues(str(self.txtDBName.GetValue()))
60+
conn_dict['UserName'] = (str(self.txtUser.GetValue()))
61+
conn_dict['Password'] = (str(self.txtPass.GetValue()))
62+
conn_dict['Address'] = (str(self.txtServer.GetValue()))
63+
conn_dict['DatabaseName'] = (str(self.txtDBName.GetValue()))
5964
return {'Database': conn_dict}
6065

6166
def validateInput(self, conn_dict):

src/wizard/controller/frmResultSummaryPanel.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ def __populate_date_fields(self):
5353
if self.existing_result is None:
5454
return
5555

56+
if self.existing_result.SampledMediumCV is not None:
57+
self.comboSamp.SetValue(self.existing_result.SampledMediumCV)
58+
59+
if self.existing_result.AggregationStatisticCV is not None:
60+
self.comboAgg.SetValue(self.existing_result.AggregationStatisticCV)
61+
62+
5663
# Set Result Date Time
5764
if self.existing_result.ResultDateTime is not None:
5865
year = self.existing_result.ResultDateTime.year

0 commit comments

Comments
 (0)