Skip to content

Commit

Permalink
Merge pull request #282 from ODM2/Beta_1.2.4
Browse files Browse the repository at this point in the history
 Beta 1.2.4
  • Loading branch information
Stephanie Reeder committed May 26, 2016
2 parents 8d3429b + 7b7ed9d commit 5c53759
Show file tree
Hide file tree
Showing 52 changed files with 272,707 additions and 198 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.so
*.log
__pycache__
.cache
htmlcov

# Packages
Expand Down
67 changes: 67 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
language: python
sudo: required
# if the https://travis-ci.org/ODM2/ODMToolsPython/requests ever says: missing config
# validate at: http://lint.travis-ci.org/
python:
# - "2.6"
- "2.7"
# - "3.2"
# - "3.3"
# - "3.4"
# - "3.5"
# - "3.5-dev" # 3.5 development branch
# - "nightly" # currently points to 3.6-dev
# command to install dependencies
cache:
directories:
- $HOME/.cache/pip/wheels
- $HOME/virtualenv/python2.7.9
services:
- mysql
- postgresql
addons:
apt:
packages:
- cmake
- unixodbc
- unixodbc-dev
- odbcinst1debian2
- odbcinst
- freetds-dev
- freetds-bin
- tdsodbc
- libc6
- e2fsprogs
- mysql-client
- libproj-dev
- python-wxgtk2.8
- python-wxtools
- wx2.8-doc
- wx2.8-examples
- wx2.8-headers
- wx2.8-i18n

# mariadb: '10.1'
before_script:
- ./scripts/tests/mysql_setup.sh
- ./scripts/tests/postgres_setup.sh
- ./scripts/tests/freetds.sh

before_install:
# python -m pip makes the install go into the virtualenv
- python -m pip install pandas
- export PYMSSQL_BUILD_WITH_BUNDLED_FREETDS=1;python -m pip install pymssql
# - python -m pip install mysql-python
install: # now just our code
- pip install geoalchemy2
- pip install -r requirements_tests.txt --allow-external pyodbc --allow-unverified pyodbc
- pip list

# don't forget to open up the azure mssql server to these addreses
# https://docs.travis-ci.com/user/ip-addresses/

# command to run tests
script:

- py.test

52 changes: 2 additions & 50 deletions odmtools/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,56 +1,8 @@
__author__ = 'Jacob'
from icons.icons import *
from icons.icons4addpoint import *

from logger import LoggerTool

__all__=["add",
"binning",
"bitmap_editor",
"blank",
"box_whisker",
"box_whisker_type",
"brush",
"calendar",
"chart_xy",
"color_setting",
"curve_points",
"date_setting",
"delete",
"derive_new_series",
"edit",
"edit_view",
"file_new",
"filter_list",
"flag",
"full_date_range",
"histogram",
"his_type",
"interpolate",
"legend",
"line_chart",
"lin_drift",
"open_file",
"plot_type",
"probability",
"record",
"restore",
"save",
"save_data",
"script",
"stop_edit",
"summary",
"table",
"tsa_icon",
"tsa_type",
"gtk_execute",
"Undo",
"window_command_line",
"window_enter",
"LoggerTool",
__all__=["LoggerTool",
"logger",
"newscript",
"openscript",
"savescript",
"deletered",

]
52 changes: 52 additions & 0 deletions odmtools/common/icons/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,53 @@
__author__ = 'Jacob'
from icons import *
from icons4addpoint import *
__all__=["add",
"binning",
"bitmap_editor",
"blank",
"box_whisker",
"box_whisker_type",
"brush",
"calendar",
"chart_xy",
"color_setting",
"curve_points",
"date_setting",
"delete",
"derive_new_series",
"edit",
"edit_view",
"file_new",
"filter_list",
"flag",
"full_date_range",
"histogram",
"his_type",
"interpolate",
"legend",
"line_chart",
"lin_drift",
"open_file",
"plot_type",
"probability",
"record",
"restore",
"save",
"save_data",
"script",
"stop_edit",
"summary",
"table",
"tsa_icon",
"tsa_type",
"gtk_execute",
"Undo",
"window_command_line",
"window_enter",

"newscript",
"openscript",
"savescript",
"deletered",

]
1 change: 0 additions & 1 deletion odmtools/common/icons/icons4addpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,3 @@
"fyFkZ8W5EwnwX4WlCUrEwmMFZkmMQPAcCJtVkoD4EMZKSAS83/OIZpUkIGkyMR0zSkDa4aQd"
"M1ogpsNJJKIFttbvuQ/ulVA1tikCBXDWEsImM5JQa894HkhCT0SFKtQK4I8S8HPlTrhEwEhE"
"JgM+pRN1vhJAqemmBC4LChiWfQsq9brIX7OZ6v/BfANr87/zITFiXQAAAABJRU5ErkJggg==")

2 changes: 1 addition & 1 deletion odmtools/common/icons/img2py.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from wx.tools import img2py

output = 'icons4addpoint.py'
output = 'test_icons.py'

# get the list of BMP files
#files = [f for f in os.listdir('.') if re.search(r'odm\d*x\d*\.png', f)]
Expand Down
86 changes: 75 additions & 11 deletions odmtools/common/icons/plotToolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"CsZqSyMGTTeLOYWm1zaUxPzXpURydi7x7fvSwtupGScWi13keX6xIsHszPP3bkmgmZX1RPJz"
"KpFaSCefPpvcxjH6D2k3O6c42VTiAAAAAElFTkSuQmCC")


#----------------------------------------------------------------------
zoom_to_rect = PyEmbeddedImage(
"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBj"
Expand Down Expand Up @@ -176,17 +177,80 @@
"t7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxSfNTws+7PbaOWo6fH"
"XMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+tfa5zvMf"
"fnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/"
"6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEgAACxIB0t1+/AAAABp0RVh0U29m"
"dHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAB3ElEQVQ4T5WTbU/aUBTH+VjEfQPdZxDZ"
"+/p68GZB4hIVNAV1T7plU5z4EETdEqYmGoeOvRgzQZ2FTJfJ1irIQ4XWIvx3z00g1qqZJ/kn"
"t/9z7u+etvfYcCUMw8Dq+gZejr3mWmNr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etvfYcCUMw8Dq+gZejr3mWmNr8u4KWzP5eWsbnn4fPiW+InWc5Yptf+HeJsvdFhyw"
# "Gd/C2PswJFnBr3wefwpFpJUT/kx6FZrmNTeFTdM09PoGcXiaQ8/TfkyEwiaRRznvgB9Uez1s"
# "sZVVxJPf8bdYgl98jtSPnyaRd3xWQPxbErGVNSsgEByBzDYXKhUEn43j6LdsEnlKqcwOKCIw"
# "PGoFiIFh5NRzlFh7L8bfIndWMom8/HkFp2UVIjvM8gpLHz5iZ28fZU3Hm3dT0C8Mk8ijXDK1"
# "i2VWawHIsgzfkAjNqN36ESnX5xsC1VoAtVoNkYUoItFFXNbrN2o+EoXD+QhiIIhGo2Fi8Hug"
# "qipm5+bhZ51IUhp1VlRnsIMDCf5BET3eXrS1PYDL5WJymyCtm1itVtlmCZOhKTzxeLloTZ6i"
# "KHB0OWG32+F2u/H4CqQFoE6oPV3XQTASrckjZbNZdDq6LBAT4K6huQ4RBAHT4Rn8N6DZIXUi"
# "CN1o73iIBBu8ewGaEPqdmUyGz8Y/d/qJcLWhfigAAAAASUVORK5CYII=")

#----------------------------------------------------------------------
scroll_left = PyEmbeddedImage(
Expand Down
1 change: 1 addition & 0 deletions odmtools/controller/frmBulkInsert.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def readDataFromCSV(self, filepath):
8: str.strip,
9: str.strip})
except CParserError as e:

msg = wx.MessageDialog(None, "There was an issue trying to parse your file. "
"Please compare your csv with the template version as the file"
" you provided "
Expand Down
23 changes: 1 addition & 22 deletions odmtools/controller/frmSeriesSelector.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ def refreshTableSeries(self, db):
:return:
"""

chcklist= self.tblSeries.GetCheckedObjects()


self.memDB.set_series_service(db)
object = self.series_service.get_all_series()
#checkedObjs = self.tblSeries.GetCheckedObjects()
Expand All @@ -97,10 +93,6 @@ def refreshTableSeries(self, db):
if x.id not in idList:
self.tblSeries.AddObject(x)


for c in chcklist:
self.tblSeries.SetCheckState(c, True)

#for x in checkedObjs:
# super(FastObjectListView, self.tblSeries).SetCheckState(x, True)

Expand All @@ -109,18 +101,10 @@ def refreshSeries(self):
:return:
"""
chcklist= self.tblSeries.GetCheckedObjects()
self.series_service = None

self.series_service = self.parent.Parent.createService()
#self.refreshTableSeries(self.dbservice)
self.resetDB(self.series_service)
for c in chcklist:
for val in self.tblSeries.GetObjects():
if c == val:
self.tblSeries.SetCheckState(val, True)
break

logger.debug("Repopulate Series Selector")

def initSVBoxes(self):
Expand Down Expand Up @@ -574,14 +558,9 @@ def stopEdit(self):
:return:
"""

self.isEditing = False
chcklist= self.tblSeries.GetCheckedObjects()

self.tblSeries.RefreshObject(self.tblSeries.editingObject)
for c in chcklist:
self.tblSeries.SetCheckState(c, True)

self.tblSeries.editingObject = None
self.memDB.stopEdit()

def isEditing(self):
Expand Down
Loading

0 comments on commit 5c53759

Please sign in to comment.