Skip to content

Commit 85932e7

Browse files
authored
Merge pull request #142 from ODM2/development
Preparing for release 0.7, merging development to master
2 parents 2f82702 + f634574 commit 85932e7

File tree

8 files changed

+734
-444
lines changed

8 files changed

+734
-444
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ script:
7474
fi
7575

7676
- if [[ $TEST_TARGET == 'coding_standards' ]]; then
77-
find . -type f -name "*.py" ! -name 'conf.py' ! -name '_version.py' ! -name 'versioneer.py' | xargs flake8 --max-line-length=110 ;
77+
find . -type f -name "*.py" ! -name 'conf.py' ! -name '_version.py' ! -name 'versioneer.py' ! -name '*DBConfig.py' ! -name 'Sample.py' | xargs flake8 --max-line-length=110 ;
7878
fi
7979

8080
- if [[ $TEST_TARGET == 'docs' ]]; then

Examples/Sample.py

+6-11
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,13 @@
1717
#connect to database
1818
# createconnection (dbtype, servername, dbname, username, password)
1919
# session_factory = dbconnection.createConnection('connection type: sqlite|mysql|mssql|postgresql', '/your/path/to/db/goes/here', 2.0)#sqlite
20-
session_factory = dbconnection.createConnection('postgresql', 'localhost', 'odm2', 'ODM', 'odm')
21-
# session_factory = dbconnection.createConnection('mysql', 'localhost', 'odm2', 'ODM', 'odm')#mysql
2220

23-
# session_factory= dbconnection.createConnection('mssql', "(local)", "ODM2", "ODM", "odm")#win MSSQL
2421

22+
# session_factory = dbconnection.createConnection('postgresql', 'localhost', 'odm2', 'ODM', 'odm')
23+
# session_factory = dbconnection.createConnection('mysql', 'localhost', 'odm2', 'ODM', 'odm')#mysql
24+
session_factory= dbconnection.createConnection('mssql', "(local)", "ODM2", "ODM", "odm")#win MSSQL
2525
# session_factory= dbconnection.createConnection('mssql', "arroyoodm2", "", "ODM", "odm")#mac/linux MSSQL
26-
# session_factory = dbconnection.createConnection('sqlite', '/Users/stephanie/DEV/YODA-Tools/tests/test_files/XL_specimen.sqlite', 2.0)
27-
28-
29-
30-
31-
32-
26+
# session_factory = dbconnection.createConnection('sqlite', 'path/to/ODM2.sqlite', 2.0)
3327

3428

3529

@@ -67,6 +61,7 @@
6761
try:
6862
print ("\n-------- Information about Sites ---------")
6963
siteFeatures = read.getSamplingFeatures(type= 'site')
64+
7065
# siteFeatures = read.getSamplingFeatures(type='Site')
7166
numSites = len(siteFeatures)
7267
print ("Successful query")
@@ -150,7 +145,7 @@
150145
# Get the values for a particular TimeSeriesResult
151146
print("\n-------- Example of Retrieving Time Series Result Values ---------")
152147

153-
tsValues = read.getResultValues(resultid = 1) # Return type is a pandas datafram
148+
tsValues = read.getResultValues(resultids = [1]) # Return type is a pandas datafram
154149

155150
# Print a few Time Series Values to the console
156151
# tsValues.set_index('ValueDateTime', inplace=True)

odm2api/ODM2/models.py

+42-130
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)