Skip to content

Beta 1.2.7 #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Sep 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,5 @@ setup/Output/setup.exe
Temp

*.app
*.spec


19 changes: 8 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ addons:
- wx2.8-i18n


# mariadb: '10.1'
before_script:
- ./ci-helpers/travis/mysql_setup.sh
- ./ci-helpers/travis/postgres_setup.sh
- ./ci-helpers/travis/freetds.sh



before_install:
Expand All @@ -65,12 +61,13 @@ install: # now just our code

# mariadb: '10.1'
before_script:
- chmod +x ./tests/scripts/mysql_setup.sh
# - chmod +x ./tests/scripts/postgres_setup.sh
- chmod +x ./tests/scripts/freetds.sh
- ./tests/scripts/mysql_setup.sh
# - ./tests/scripts/postgres_setup.sh
- ./tests/scripts/freetds.sh
- chmod +x ./ci-helpers/travis/mysql_setup.sh
# - chmod +x ./ci-helpers/travis/postgres_setup.sh
- chmod +x ./ci-helpers/travis/freetds.sh

- ./ci-helpers/travis/mysql_setup.sh
# - ./ci-helpers/travis/postgres_setup.sh
- ./ci-helpers/travis/freetds.sh

# command to run tests
script:
Expand Down
14 changes: 7 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ install:
# the parent CMD process).
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# add databases
- "SET PATH=%POSTGRES_PATH%\bin;%MYSQL_PATH%\bin;%PATH%"
- "SET PATH=%POSTGRES_PATH%\\bin;%MYSQL_PATH%\\bin;%PATH%"
- "activate test"

# Check that we have the expected version and architecture for Python
Expand All @@ -110,12 +110,12 @@ build_script:
- sqlcmd -S localhost,1433 -U sa -P Password12! -Q "CREATE DATABASE odm" -d "master"
- sqlcmd -S localhost,1433 -U sa -P Password12! -i tests\data\sampledb\odm_mssql.sql -d "odm"
- sqlcmd -S localhost,1433 -U sa -P Password12! -Q "select table_name from information_schema.tables" -d "odm"
# # postgres
# - psql createdb odm
# - psql -d odm -a -f tests\data\sampledb\odm_postgres.sql
# # mysql
# - mysql -e "drop database test; create database odm;" --user=root
# - mysql odm < tests\data\sampledb\odm_mysql.sql --user=root
# postgres
- psql createdb odm
- psql -d odm -a -f tests\data\sampledb\odm_postgres.sql
# mysql
- mysql -e "drop database test; create database odm;" --user=root
- mysql odm < tests\data\sampledb\odm_mysql.sql --user=root

test_script:
# Run the project tests
Expand Down
4 changes: 2 additions & 2 deletions ci-helpers/travis/mysql_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ mysql -e "create database IF NOT EXISTS odm2test;" --user=root
#####
# install
#####
ls -al ./tests/scripts/sampledb/odm_mysql.sql ./tests/scripts/sampledb/odm_postgres.sql
mysql --user=ODM --password=odm odm < ./tests/scripts/sampledb/odm_mysql.sql
ls -al ./tests/data/sampledb/odm_mysql.sql ./tests/data/sampledb/odm_postgres.sql
mysql --user=ODM --password=odm odm < ./tests/data/sampledb/odm_mysql.sql
mysql --user=root -e "show databases;"
mysql --user=root -e "GRANT ALL PRIVILEGES ON odm.* TO 'ODM'@'localhost';FLUSH PRIVILEGES;"
# these should produce results, if they don't the lower_case_table_names failed
Expand Down
4 changes: 2 additions & 2 deletions ci-helpers/travis/postgres_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
psql -U postgres -c "create extension postgis"
psql -c 'DROP DATABASE IF EXISTS odmtest;' -U postgres;
psql -c 'create database odmtest;' -U postgres;
#psql -U postgres -d odmtest -a -f ./tests/scripts/sampledb/odm_postgres.sql
#psql -U postgres -d odmtest -a -f ./tests/data/sampledb/odm_postgres.sql
psql -c 'DROP DATABASE IF EXISTS odm;' -U postgres;
psql -c 'create database odm;' -U postgres;
## install
# add -a to psql to see full log, -q is quiet
psql -U postgres -q -f ./tests/scripts/sampledb/odm_postgres.sql
psql -U postgres -q -f ./tests/data/sampledb/odm_postgres.sql
92 changes: 90 additions & 2 deletions doc/wxFormBuilder/Data Filter Form.fbp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<property name="internationalize">0</property>
<property name="name">frmDataFilter</property>
<property name="namespace"></property>
<property name="path">/home/denver/Desktop</property>
<property name="path">C:\Users\Stephanie\Desktop</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
Expand All @@ -44,7 +44,7 @@
<property name="minimum_size">358,452</property>
<property name="name">clsDataFilters</property>
<property name="pos">599,384</property>
<property name="size">382,499</property>
<property name="size">382,547</property>
<property name="style">wxDEFAULT_DIALOG_STYLE</property>
<property name="subclass"></property>
<property name="title">Data Filter</property>
Expand Down Expand Up @@ -2342,6 +2342,94 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label"> Duplicate Values</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">rbDuplicate</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos">10,8</property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioButton"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
Expand Down
10 changes: 7 additions & 3 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,13 @@ def run_pyinstaller(console=False):
'--distpath=%s ' % WIN_DIR +
'--workpath=%s ' % WORK_DIR +
'--specpath=%s ' % WIN_DIR +
'--upx-dir=%s ' % BASE_DIR +
#'--upx-dir=%s ' % BASE_DIR +
'--noupx '
'--icon=%s ' % WIN_ICON_FILE +
'--version-file=%s ' % VERSION_FILE +
'--onedir '
# '--onefile ' +
'--exclude=
'--noconfirm ' + APP_FILE)
else:
## Non Console Version
Expand All @@ -166,8 +169,10 @@ def run_pyinstaller(console=False):
'--distpath=%s ' % WIN_DIR +
'--workpath=%s ' % WORK_DIR +
'--specpath=%s ' % WIN_DIR +
'--upx-dir=%s ' % BASE_DIR +
#'--upx-dir=%s ' % BASE_DIR +
'--noupx '
'--icon=%s ' % WIN_ICON_FILE +
'--onedir '
# '--onefile ' +
'--version-file=%s ' % VERSION_FILE +
'--noconsole '
Expand Down Expand Up @@ -248,7 +253,6 @@ def main():
run_inno(scriptpath)

print "Create No Installer "

## Create Shortcut
## Create File
## Zip Executable
Expand Down
5 changes: 4 additions & 1 deletion odmtools/controller/frmDataFilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self, parent, series):
self.Center()

# self.chkToggleFilterSelection.SetValue(self.recordService.get_toggle())
# self.setDates()
self.setDates()


def onCheckBox(self, event):
Expand Down Expand Up @@ -115,6 +115,9 @@ def onBtnApplyButton(self, event):
elif self.txtVChangeLT.GetValue():
self.recordService.value_change_threshold(float(self.txtVChangeLT.GetValue()), '<')

elif self.rbDuplicate.GetValue():
self.recordService.duplicate_value_filter()

event.Skip()


Expand Down
7 changes: 7 additions & 0 deletions odmtools/controller/logicEditTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ def value_change_threshold(self, value, operator):
self._script("edit_service.change_value_threshold(%s,'%s')\n" % (value, operator), 'black')
Publisher.sendMessage("scroll")

def duplicate_value_filter(self):
self._edit_service.duplicate_value_filter()
self.refresh_selection()
if self._record:
self._script("edit_service.duplicate_value_filter()\n" , 'black')
Publisher.sendMessage("scroll")

def filter_from_previous(self, value):
'''

Expand Down
13 changes: 12 additions & 1 deletion odmtools/gui/frmODMTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from odmtools.controller.frmDataTable import FrmDataTable
import mnuRibbon
import pnlPlot
import pnlPlot
import pnlDataTable
import wx.lib.agw.aui as aui
import wx.py.crust
Expand Down Expand Up @@ -55,6 +56,7 @@ def __init__(self, **kwargs):

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

series_service = self._init_database()
if series_service:
Expand Down Expand Up @@ -384,7 +386,7 @@ def onSetScriptTitle(self, title):
def addEdit(self, event):

with wx.BusyInfo("Please wait for a moment while ODMTools fetches the data and stores it in our database", parent=self):

self.scriptcreate = True
isSelected, seriesID = self.pnlSelector.onReadyToEdit()
logger.info("Beginning editing seriesID: %s"%str(seriesID))

Expand Down Expand Up @@ -496,6 +498,15 @@ def onClose(self, event):
Closes ODMTools Python
Closes AUI Manager then closes MainWindow
"""

#check to see if a script has been created
if self.scriptcreate:
msg = wx.MessageDialog(None, 'Would you like to save your editing script?',
'Save Script', wx.YES_NO | wx.ICON_QUESTION)
value = msg.ShowModal()
if value == wx.ID_YES:
self.txtPythonScript.OnSaveAs(event)

# deinitialize the frame manager
self.pnlPlot.Close()
try:
Expand Down
Loading