Skip to content
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: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ before_script:
- 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
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
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
1 change: 0 additions & 1 deletion toolsenvironment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ dependencies:
- pyodbc==3.0.7
- python-dateutil==2.4.1
- wxpython-common==3.0.0.0