Skip to content

Commit 7f85570

Browse files
authored
Merge pull request #202 from ODM2/olvcols
Make QCLevel more obvious in Series Selector
2 parents 1976afc + 4ac92d1 commit 7f85570

File tree

13 files changed

+34
-112
lines changed

13 files changed

+34
-112
lines changed

.travis.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ addons:
4242
- wx2.8-i18n
4343

4444

45-
# mariadb: '10.1'
46-
before_script:
47-
- ./ci-helpers/travis/mysql_setup.sh
48-
- ./ci-helpers/travis/postgres_setup.sh
49-
- ./ci-helpers/travis/freetds.sh
45+
5046

5147

5248
before_install:
@@ -65,12 +61,12 @@ install: # now just our code
6561

6662
# mariadb: '10.1'
6763
before_script:
68-
- chmod +x ./tests/scripts/mysql_setup.sh
69-
# - chmod +x ./tests/scripts/postgres_setup.sh
70-
- chmod +x ./tests/scripts/freetds.sh
71-
- ./tests/scripts/mysql_setup.sh
72-
# - ./tests/scripts/postgres_setup.sh
73-
- ./tests/scripts/freetds.sh
64+
- chmod +x ./ci-helpers/travis/mysql_setup.sh
65+
# - chmod +x ./ci-helpers/travis/postgres_setup.sh
66+
- chmod +x ./ci-helpers/travis/freetds.sh
67+
- ./ci-helpers/travis/mysql_setup.sh
68+
# - ./ci-helpers/travis/postgres_setup.sh
69+
- ./ci-helpers/travis/freetds.sh
7470

7571
# command to run tests
7672
script:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ To make running ODMTools easier we have included installers. Please select the o
1919

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

2424
####Mac
25-
+ [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)
25+
+ [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)
2626

2727
####Linux
2828
+ *Please run from source*

ci-helpers/travis/mysql_setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ mysql -e "create database IF NOT EXISTS odm2test;" --user=root
2121
#####
2222
# install
2323
#####
24-
ls -al ./tests/scripts/sampledb/odm_mysql.sql ./tests/scripts/sampledb/odm_postgres.sql
25-
mysql --user=ODM --password=odm odm < ./tests/scripts/sampledb/odm_mysql.sql
24+
ls -al ./tests/data/sampledb/odm_mysql.sql ./tests/data/sampledb/odm_postgres.sql
25+
mysql --user=ODM --password=odm odm < ./tests/data/sampledb/odm_mysql.sql
2626
mysql --user=root -e "show databases;"
2727
mysql --user=root -e "GRANT ALL PRIVILEGES ON odm.* TO 'ODM'@'localhost';FLUSH PRIVILEGES;"
2828
# these should produce results, if they don't the lower_case_table_names failed

ci-helpers/travis/postgres_setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
psql -U postgres -c "create extension postgis"
33
psql -c 'DROP DATABASE IF EXISTS odmtest;' -U postgres;
44
psql -c 'create database odmtest;' -U postgres;
5-
#psql -U postgres -d odmtest -a -f ./tests/scripts/sampledb/odm_postgres.sql
5+
#psql -U postgres -d odmtest -a -f ./tests/data/sampledb/odm_postgres.sql
66
psql -c 'DROP DATABASE IF EXISTS odm;' -U postgres;
77
psql -c 'create database odm;' -U postgres;
88
## install
99
# add -a to psql to see full log, -q is quiet
10-
psql -U postgres -q -f ./tests/scripts/sampledb/odm_postgres.sql
10+
psql -U postgres -q -f ./tests/data/sampledb/odm_postgres.sql

make.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def run_pyinstaller(console=False):
157157
'--upx-dir=%s ' % BASE_DIR +
158158
'--icon=%s ' % WIN_ICON_FILE +
159159
'--version-file=%s ' % VERSION_FILE +
160+
# '--onefile ' +
160161
'--noconfirm ' + APP_FILE)
161162
else:
162163
## Non Console Version
@@ -167,6 +168,7 @@ def run_pyinstaller(console=False):
167168
'--specpath=%s ' % WIN_DIR +
168169
'--upx-dir=%s ' % BASE_DIR +
169170
'--icon=%s ' % WIN_ICON_FILE +
171+
# '--onefile ' +
170172
'--version-file=%s ' % VERSION_FILE +
171173
'--noconsole '
172174
'--noconfirm ' + APP_FILE)
@@ -186,15 +188,12 @@ def mac_pyinstaller():
186188
'--upx-dir=%s ' % BASE_DIR +
187189
'--icon=%s ' % MAC_ICON_FILE +
188190
'--version-file=%s ' % VERSION_FILE +
189-
'--windowed '
190-
#'--onefile '
191-
#'--hidden-import="libwx_osx_cocoau-3.0.0.0.0.dylib" '
191+
'--windowed '#'--onefile '
192192
'--noconfirm ' + APP_FILE)
193193

194-
195-
os.system("cp /anaconda/envs/odmtools/lib/libwx_osx_cocoau-3.0.0.0.0.dylib %s" % os.path.join(APP_DIR, "Contents/MacOS/"))
196-
# os.system("cp /anaconda/envs/odmtools/lib/libwx_osx_cocoau-3.0.0.0.0.dylib %s" % os.path.join(APP_DIR, "Contents/MacOS/"))
197194
#copy "libwx_osx_cocoau-3.0.0.0.0.dylib"
195+
os.system("cp /anaconda/envs/odmtools/lib/libwx_osx_cocoau-3.0.0.0.0.dylib %s" % os.path.join(APP_DIR, "Contents/MacOS/"))
196+
198197
return True
199198
except Exception as e:
200199
print (e)

odmtools/gui/plotHistogram.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def _createPlot(self, oneSeries, rows, cols, index):
101101
ax = self.figure.add_subplot(repr(rows) + repr(cols) + repr(index))
102102

103103
logger.debug("HISTOGRAM: %s"% ax)
104-
logger.debut("rows: %s cols: %s, index: %s"%(rows, cols, index))
104+
#logger.debut("rows: %s cols: %s, index: %s"%(rows, cols, index))
105105

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

odmtools/odmdata/series.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class Series(Base):
5151
variable_id = Column('VariableID', Integer, ForeignKey('Variables.VariableID'), nullable=False)
5252
variable_code = Column('VariableCode', String)
5353
variable_name = Column('VariableName', String)
54+
5455
speciation = Column('Speciation', String)
5556
variable_units_id = Column('VariableUnitsID', Integer)
5657
variable_units_name = Column('VariableUnitsName', String)
@@ -118,26 +119,29 @@ def get_table_columns(self):
118119
return self.__table__.columns.keys()
119120

120121
def list_repr(self):
121-
return [self.id, self.site_id, self.site_code, self.site_name, self.variable_id, self.variable_code,
122+
return [self.id, self.site_code, self.variable_code, self.quality_control_level_code,
123+
self.site_id, self.site_name, self.variable_id,
122124
self.variable_name, self.speciation, self.variable_units_id, self.variable_units_name,
123125
self.sample_medium, self.value_type, self.time_support, self.time_units_id, self.time_units_name,
124126
self.data_type, self.general_category, self.method_id, self.method_description,
125127
self.source_id, self.source_description, self.organization, self.citation,
126-
self.quality_control_level_id, self.quality_control_level_code, self.begin_date_time,
128+
self.quality_control_level_id, self.begin_date_time,
127129
self.end_date_time, self.begin_date_time_utc, self.end_date_time_utc, self.value_count]
128130

129131
def returnDict():
130-
keys = ['SeriesID', 'SiteID', 'SiteCode', 'SiteName', 'VariableID', 'VariableCode', 'VariableName', 'Speciation',
132+
keys = ['SeriesID', 'SiteCode','VariableCode','QualityControlLevelCode',
133+
'SiteID', 'SiteName', 'VariableID', 'VariableName', 'Speciation',
131134
'VariableUnitsID', 'VariableUnitsName', 'SampleMedium', 'ValueType', 'TimeSupport', 'TimeUnitsID',
132135
'TimeUnitsName', 'DataType', 'GeneralCategory', 'MethodID', 'MethodDescription', 'SourceID',
133-
'SourceDescription', 'Organization', 'Citation', 'QualityControlLevelID', 'QualityControlLevelCode',
136+
'SourceDescription', 'Organization', 'Citation', 'QualityControlLevelID',
134137
'BeginDateTime', 'EndDateTime', 'BeginDateTimeUTC', 'EndDateTimeUTC', 'ValueCount'
135138
]
136-
values = ['id', 'site_id', 'site_code', 'site_name', 'variable_id', 'variable_code', 'variable_name', 'speciation',
139+
values = ['id', 'site_code','variable_code','quality_control_level_code',
140+
'site_id', 'site_name', 'variable_id', 'variable_name', 'speciation',
137141
'variable_units_id', 'variable_units_name', 'sample_medium', 'value_type', 'time_support',
138142
'time_units_id', 'time_units_name', 'data_type', 'general_category', 'method_id', 'method_description',
139143
'source_id', 'source_description', 'organization', 'citation', 'quality_control_level_id',
140-
'quality_control_level_code', 'begin_date_time', 'end_date_time', 'begin_date_time_utc',
144+
'begin_date_time', 'end_date_time', 'begin_date_time_utc',
141145
'end_date_time_utc', 'value_count'
142146
]
143147
return OrderedDict(zip(keys, values))

psycopg2/bld.bat

Lines changed: 0 additions & 8 deletions
This file was deleted.

psycopg2/build.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

psycopg2/meta.yaml

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)