diff --git a/.gitignore b/.gitignore index 367b4086b41407632965200667743ee0e593f056..9dd278fe011a92fecfe5f9e73906f30b6492d1f4 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,8 @@ sphinx/ .DS_Store beat/web/settings/settings.py src/ -web_dynamic_data* +prefix/ +test_prefix/ .nfs* beat/web/static/ doc/api/api/ diff --git a/README.rst b/README.rst index 404019df02fbdb94791db0f03f748ef6c4ba71b6..f629255bae4e9761703dd1733773ffe6ced1f2e8 100644 --- a/README.rst +++ b/README.rst @@ -185,13 +185,13 @@ populate a development webserver:: every combination of database and version you wish to support, run the following command:: - $ ./bin/beat -p web_dynamic_data db index <name>/<version> + $ ./bin/beat -p prefix db index <name>/<version> Replacing the strings ``<name>`` by the name of the database you wish to dump the indices for, together with the version in ``<version>``. For example, to dump the indices for the AT&T database, version 1, do the following:: - $ ./bin/beat -p web_dynamic_data db index atnt/1 + $ ./bin/beat -p prefix db index atnt/1 Once the contributions and users are in place, you're ready to start the test server:: @@ -287,7 +287,8 @@ You may pass filtering criteria to just launch tests for a particular set of To measure coverage, you must set an environment variable for nose:: - $ NOSE_WITH_COVERAGE=1 NOSE_COVER_PACKAGE=beat.web ./bin/django test --settings=beat.web.settings.test -v 2 + $ ./bin/coverage run --source='./beat/web' ./bin/django test --settings=beat.web.settings.test + $ ./bin/coverage report .. _snapshot: @@ -331,7 +332,7 @@ current state of a production system. 4. Remove the current local development database so that the restore operation can start from scratch:: - [development]$ rm -rf django.sql3 web_dynamic_data + [development]$ rm -rf django.sql3 prefix 5. Copy the backup tarball from the production server and restore it locally:: @@ -388,10 +389,10 @@ migration test loop. This backup will allow you to quickly test the migrations w/o having to checkout the production version anymore. - Also, create a temporary git repository of ``web_dynamic_data``, so you can + Also, create a temporary git repository of ``prefix``, so you can cross-check changes and reset it in case of problems:: - $ cd web_dynamic_data + $ cd prefix $ git init . $ git add . $ git commit -m "Initial commit" @@ -415,7 +416,7 @@ migration test loop. c. If a problem is detected, fix it and revert the state:: $ cp -af django.sql3.backup django.sql3 - $ cd web_dynamic_data && git reset --hard HEAD && git clean -fdx . & cd .. + $ cd prefix && git reset --hard HEAD && git clean -fdx . & cd .. .. note:: diff --git a/beat/web/settings/settings.py b/beat/web/settings/settings.py index c8a9abea240b262cd970ac9ea071ecbd3e460151..5ebdcde7ca9df25633a389c5273522175951f1f4 100644 --- a/beat/web/settings/settings.py +++ b/beat/web/settings/settings.py @@ -133,7 +133,7 @@ STATIC_ROOT = 'static' # ############################################################################## -PREFIX = os.path.join(os.getcwd(), 'web_dynamic_data') +PREFIX = os.path.join(os.getcwd(), 'prefix') ALGORITHMS_ROOT = os.path.join(PREFIX, 'algorithms') PLOTTERS_ROOT = os.path.join(PREFIX, 'plotters') LIBRARIES_ROOT = os.path.join(PREFIX, 'libraries') @@ -299,9 +299,6 @@ RESTRUCTUREDTEXT_FILTER_SETTINGS = { 'raw_enabled': 0, } -# Use nose to run tests -TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' - # Where CodeMirror is installed and some other settings CODEMIRROR_PATH = 'codemirror' #w.r.t to STATIC_URL CODEMIRROR_THEME = 'default' diff --git a/beat/web/settings/test.py b/beat/web/settings/test.py index e7137a2fed710ea53efa5fdb3bb883c1146d588a..213c5ceaedf3ea2262d5d6b8507dd503c08a79e9 100644 --- a/beat/web/settings/test.py +++ b/beat/web/settings/test.py @@ -37,15 +37,9 @@ ALLOWED_HOSTS = [ ] # To always use a (in-memory) sqlite3 database for the tests -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': ':memory:', - }, -} +DATABASES['default'] = { 'ENGINE': 'django.db.backends.sqlite3' } - -PREFIX = os.path.join(os.getcwd(), 'web_dynamic_data_tests') +PREFIX = os.path.join(os.getcwd(), 'test_prefix') ALGORITHMS_ROOT = os.path.join(PREFIX, 'algorithms') LIBRARIES_ROOT = os.path.join(PREFIX, 'libraries') DATABASES_ROOT = os.path.join(PREFIX, 'databases') @@ -54,13 +48,7 @@ TOOLCHAINS_ROOT = os.path.join(PREFIX, 'toolchains') EXPERIMENTS_ROOT = os.path.join(PREFIX, 'experiments') CACHE_ROOT = os.path.join(PREFIX, 'cache') - # To speed-up tests, don't put this in production -PASSWORD_HASHERS = ( - 'django.contrib.auth.hashers.SHA1PasswordHasher', - 'django.contrib.auth.hashers.PBKDF2PasswordHasher', - 'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher', - 'django.contrib.auth.hashers.BCryptPasswordHasher', +PASSWORD_HASHERS = [ 'django.contrib.auth.hashers.MD5PasswordHasher', - 'django.contrib.auth.hashers.CryptPasswordHasher', -) +] diff --git a/buildout.cfg b/buildout.cfg index baf669f3713516896e5cf48d3f96634322e1973d..1f80c7e58d7f86d32d6cd51517153ed6a024f97a 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -19,7 +19,6 @@ versions = versions django = >=1.8,<1.9 django-rest-swagger = >=0.3.2 django-guardian = >=1.3 -django-nose = >=1.4.1 djangorestframework = >=3.2 [sysegg] @@ -38,7 +37,6 @@ eggs = alabaster django-activity-stream django_guardian django-jsonfield - django_nose djangorestframework django-rest-swagger docopt diff --git a/setup.py b/setup.py index 205096e3a57961e4cec48d704aa49f0bdeae4f2b..3ddc1677aafc29fae349db3afd8c3c3aa5d55ad1 100644 --- a/setup.py +++ b/setup.py @@ -55,7 +55,6 @@ setup( "django-activity-stream", "django-jsonfield", "django-guardian", - "django_nose", "djangorestframework", "django-rest-swagger", "docopt",