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
18 changes: 7 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,12 @@ 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ To make running ODMTools easier we have included installers. Please select the o

####Windows
Recommended Release:
+ [Window v1.2.5-beta](https://github.com/ODM2/ODMToolsPython/releases/download/v1.2.5-beta/ODMTools_1.2.5_Beta_Win_Installer.exe)
+ [Window v1.2.5-beta](https://github.com/ODM2/ODMToolsPython/releases/download/v1.2.5_beta/ODMTools_1.2.5_Beta_Win_Installer.exe)

####Mac
+ [Mac v1.2.5-beta](https://github.com/ODM2/ODMToolsPython/releases/download/v1.2.5-beta/ODMTools_v1.2.5-beta_Mac_installer.pkg.zip)
+ [Mac v1.2.5-beta](https://github.com/ODM2/ODMToolsPython/releases/download/v1.2.5_beta/ODMTools_v1.2.5-beta_Mac_installer.pkg.zip)

####Linux
+ *Please run from source*
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
11 changes: 5 additions & 6 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def run_pyinstaller(console=False):
'--upx-dir=%s ' % BASE_DIR +
'--icon=%s ' % WIN_ICON_FILE +
'--version-file=%s ' % VERSION_FILE +
# '--onefile ' +
'--noconfirm ' + APP_FILE)
else:
## Non Console Version
Expand All @@ -167,6 +168,7 @@ def run_pyinstaller(console=False):
'--specpath=%s ' % WIN_DIR +
'--upx-dir=%s ' % BASE_DIR +
'--icon=%s ' % WIN_ICON_FILE +
# '--onefile ' +
'--version-file=%s ' % VERSION_FILE +
'--noconsole '
'--noconfirm ' + APP_FILE)
Expand All @@ -186,15 +188,12 @@ def mac_pyinstaller():
'--upx-dir=%s ' % BASE_DIR +
'--icon=%s ' % MAC_ICON_FILE +
'--version-file=%s ' % VERSION_FILE +
'--windowed '
#'--onefile '
#'--hidden-import="libwx_osx_cocoau-3.0.0.0.0.dylib" '
'--windowed '#'--onefile '
'--noconfirm ' + APP_FILE)


os.system("cp /anaconda/envs/odmtools/lib/libwx_osx_cocoau-3.0.0.0.0.dylib %s" % os.path.join(APP_DIR, "Contents/MacOS/"))
# os.system("cp /anaconda/envs/odmtools/lib/libwx_osx_cocoau-3.0.0.0.0.dylib %s" % os.path.join(APP_DIR, "Contents/MacOS/"))
#copy "libwx_osx_cocoau-3.0.0.0.0.dylib"
os.system("cp /anaconda/envs/odmtools/lib/libwx_osx_cocoau-3.0.0.0.0.dylib %s" % os.path.join(APP_DIR, "Contents/MacOS/"))

return True
except Exception as e:
print (e)
Expand Down
2 changes: 1 addition & 1 deletion odmtools/gui/plotHistogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _createPlot(self, oneSeries, rows, cols, index):
ax = self.figure.add_subplot(repr(rows) + repr(cols) + repr(index))

logger.debug("HISTOGRAM: %s"% ax)
logger.debut("rows: %s cols: %s, index: %s"%(rows, cols, index))
#logger.debut("rows: %s cols: %s, index: %s"%(rows, cols, index))

# oneSeries.filteredData.hist(ax= ax, color='k', alpha=0.5, bins=50)

Expand Down
16 changes: 10 additions & 6 deletions odmtools/odmdata/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class Series(Base):
variable_id = Column('VariableID', Integer, ForeignKey('Variables.VariableID'), nullable=False)
variable_code = Column('VariableCode', String)
variable_name = Column('VariableName', String)

speciation = Column('Speciation', String)
variable_units_id = Column('VariableUnitsID', Integer)
variable_units_name = Column('VariableUnitsName', String)
Expand Down Expand Up @@ -118,26 +119,29 @@ def get_table_columns(self):
return self.__table__.columns.keys()

def list_repr(self):
return [self.id, self.site_id, self.site_code, self.site_name, self.variable_id, self.variable_code,
return [self.id, self.site_code, self.variable_code, self.quality_control_level_code,
self.site_id, self.site_name, self.variable_id,
self.variable_name, self.speciation, self.variable_units_id, self.variable_units_name,
self.sample_medium, self.value_type, self.time_support, self.time_units_id, self.time_units_name,
self.data_type, self.general_category, self.method_id, self.method_description,
self.source_id, self.source_description, self.organization, self.citation,
self.quality_control_level_id, self.quality_control_level_code, self.begin_date_time,
self.quality_control_level_id, self.begin_date_time,
self.end_date_time, self.begin_date_time_utc, self.end_date_time_utc, self.value_count]

def returnDict():
keys = ['SeriesID', 'SiteID', 'SiteCode', 'SiteName', 'VariableID', 'VariableCode', 'VariableName', 'Speciation',
keys = ['SeriesID', 'SiteCode','VariableCode','QualityControlLevelCode',
'SiteID', 'SiteName', 'VariableID', 'VariableName', 'Speciation',
'VariableUnitsID', 'VariableUnitsName', 'SampleMedium', 'ValueType', 'TimeSupport', 'TimeUnitsID',
'TimeUnitsName', 'DataType', 'GeneralCategory', 'MethodID', 'MethodDescription', 'SourceID',
'SourceDescription', 'Organization', 'Citation', 'QualityControlLevelID', 'QualityControlLevelCode',
'SourceDescription', 'Organization', 'Citation', 'QualityControlLevelID',
'BeginDateTime', 'EndDateTime', 'BeginDateTimeUTC', 'EndDateTimeUTC', 'ValueCount'
]
values = ['id', 'site_id', 'site_code', 'site_name', 'variable_id', 'variable_code', 'variable_name', 'speciation',
values = ['id', 'site_code','variable_code','quality_control_level_code',
'site_id', 'site_name', 'variable_id', 'variable_name', 'speciation',
'variable_units_id', 'variable_units_name', 'sample_medium', 'value_type', 'time_support',
'time_units_id', 'time_units_name', 'data_type', 'general_category', 'method_id', 'method_description',
'source_id', 'source_description', 'organization', 'citation', 'quality_control_level_id',
'quality_control_level_code', 'begin_date_time', 'end_date_time', 'begin_date_time_utc',
'begin_date_time', 'end_date_time', 'begin_date_time_utc',
'end_date_time_utc', 'value_count'
]
return OrderedDict(zip(keys, values))
Expand Down
8 changes: 0 additions & 8 deletions psycopg2/bld.bat

This file was deleted.

9 changes: 0 additions & 9 deletions psycopg2/build.sh

This file was deleted.

60 changes: 0 additions & 60 deletions psycopg2/meta.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pyodbc
pymysql
numpy
#scipy
sqlalchemy
#matplotlib
#scipy
#psycopg2
#pandas
#geoalchemy2
Expand Down
4 changes: 2 additions & 2 deletions setup/Windows/odmtools_console.iss
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ 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\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#MyAppDir}\setup\Windows\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppDir}\setup\Windows\*"; 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_no_console.iss
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

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

[Icons]
Expand Down