Skip to content

Commit d4397a8

Browse files
committed
Merge branch 'master' of https://github.com/biocore/qiita into version_0.2.0
2 parents 13a0927 + fb1737d commit d4397a8

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

qiita_core/configuration_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ def __init__(self):
144144
def _get_main(self, config):
145145
"""Get the configuration of the main section"""
146146
self.test_environment = config.getboolean('main', 'TEST_ENVIRONMENT')
147-
default_base_data_dir = join(dirname(abspath(__file__)),
148-
'..', 'qiita_db', 'support_files',
147+
install_dir = dirname(dirname(abspath(__file__)))
148+
default_base_data_dir = join(install_dir, 'qiita_db', 'support_files',
149149
'test_data')
150150
self.base_data_dir = config.get('main', 'BASE_DATA_DIR') or \
151151
default_base_data_dir

qiita_db/support_files/patches/31.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- August 24, 2015
2+
-- Delete all occurrences of '..' in the base_data_dir entry
3+
SELECT 42;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from os.path import realpath
2+
from qiita_db.sql_connection import TRN
3+
4+
with TRN:
5+
TRN.add('SELECT base_data_dir FROM settings')
6+
path = TRN.execute_fetchlast()
7+
8+
# if the path is non-canonical (it contains .. or other redundant symbols)
9+
# this will update it, else it will leave as is
10+
TRN.add("UPDATE settings SET base_data_dir = %s", (realpath(path),))
11+
TRN.execute()

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@
9090
'support_files/doc/source/_static/*.png'
9191
]},
9292
scripts=glob('scripts/*'),
93-
extras_require={'test': ["nose >= 0.10.1", "pep8", 'mock'],
94-
'doc': ["Sphinx >= 1.2.2", "sphinx-bootstrap-theme"]},
93+
extras_require={'test': ["nose >= 0.10.1", "pep8", 'mock']},
9594
install_requires=['psycopg2', 'click >= 3.3', 'future==0.13.0',
9695
'bcrypt', 'pandas >= 0.15', 'numpy >= 1.7',
9796
'tornado==3.1.1', 'toredis', 'redis',
9897
'ipython[all] >= 2.4.1, < 2.5', 'pyparsing',
9998
'h5py >= 2.3.1', 'biom-format', 'natsort', 'networkx',
10099
'scikit-bio >= 0.2.3, < 0.3.0', 'wtforms == 2.0.1',
101-
'qiime >= 1.9.0, < 1.10.0', 'moi >= 0.2.0, < 0.3.0'],
100+
'qiime >= 1.9.0, < 1.10.0', 'moi >= 0.2.0, < 0.3.0',
101+
'sphinx-bootstrap-theme', 'Sphinx >= 1.2.2'],
102102
classifiers=classifiers
103103
)

0 commit comments

Comments
 (0)