Skip to content

Commit dfaf354

Browse files
committed
Update some test code
fix global import in odm_1_1_1
1 parent 610be14 commit dfaf354

File tree

5 files changed

+32
-6
lines changed

5 files changed

+32
-6
lines changed

odm2api/ODM1_1_1/services/series_service.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ class SeriesService(serviceBase):
2323
def refreshDB(self, ver):
2424
self._version= ver
2525
if ver == 1.1:
26-
global ODM
26+
#global ODM
2727
ODM = ODM1
2828
elif ver == 2.0:
29-
global ODM
29+
#global ODM
3030
ODM = ODM2
31+
else:
32+
#global ODM
33+
ODM = ODM1
3134

3235
def reset_session(self):
3336
self._session = self._session_factory.getSession() # Reset the session in order to prevent memory leaks

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ sqlalchemy
99

1010
shapely
1111

12-
matplotlib
12+
#matplotlib
1313
dateutils
14+
pandas
1415

15-
sqlalchemy-migrate
16+
#sqlalchemy-migrate

requirements_tests.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
six
2+
sqlalchemy
3+
-e git+https://github.com/ODM2/geoalchemy.git@odm2
4+
#Change line #242 in geoalchemy/base.py
5+
#from:
6+
#class SpatialComparator(ColumnProperty.ColumnComparator):
7+
#to :
8+
#class SpatialComparator(ColumnProperty.Comparator):
9+
10+
shapely
11+
12+
#matplotlib
13+
dateutils
14+
pandas
15+
16+
#db support
17+
pymysql
18+
pysqlite
19+
pyspatialite
20+
21+
#sqlalchemy-migrate

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878

7979
install_requires=['pandas', 'sqlalchemy', 'geoalchemy>=0.7.3.dev',
8080
'pyodbc', 'pymysql', 'psycopg2', 'shapely'],
81+
# dependency_links- geoalchemy from the ODM repository
8182
dependency_links=[
8283
"git+https://github.com/ODM2/geoalchemy.git@odm2#egg=geoalchemy-0.7.3.dev"
8384
],

tests/test_util1_1_1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import datetime
22

3-
from odm2api.ODM1_1_1 import *
4-
3+
from odm2api.ODM1_1_1.models import *
4+
from odm2api import base as Base
55

66
def build_db(engine):
77
Base.metadata.create_all(engine)

0 commit comments

Comments
 (0)