RNAcentral is an open public resource that offers integrated access to a comprehensive and up-to-date set of ncRNA sequences. For more information, please visit http://rnacentral.org/about-us.
The development of RNAcentral is coordinated by the European Bioinformatics Institute and is funded by the BBSRC.
- Clone Git repository:
git clone --recursive https://github.com/RNAcentral/rnacentral-webcode.git
-
Edit database connection parameters in
rnacentral/local_settings.py
-
Run the app using Docker:
export RNACENTRAL_HOME=/path/to/rnacentral/code
cd $RNACENTRAL_HOME
docker-compose up --build
Docker Cheat Sheet
# connect to a running container
docker ps
docker exec -it <container_id> bash
- Install
selenium
andrequests
using virtualenv:
virtualenv /path/to/testing/virtualenv
source /path/to/testing/virtualenv/bin/activate
pip install requests selenium
- Install Gecko Driver and add it to the
PATH
:
export PATH=$PATH:/path/to/geckodriver
-
Start the website locally using Docker (see above).
-
Launch tests against the local RNAcentral website:
cd $RNACENTRAL_HOME
python rnacentral/portal/tests/selenium_tests.py
These tests run automatically using Travis.
-
Login to the running Docker container (see above).
-
Launch tests:
cd $RNACENTRAL_HOME
python rnacentral/apiv1/tests.py
Using Django test runner:
cd $RNACENTRAL_HOME
python manage.py test portal.tests.description_tests
Using py.test requires creating a file rnacentral/conftest.py
:
import django
import pytest
django.setup()
@pytest.fixture(scope='session')
def django_db_setup():
"""Avoid creating/setting up the test database"""
pass
@pytest.fixture
def db_access_without_rollback_and_truncate(request, django_db_setup,
django_db_blocker):
django_db_blocker.unblock()
request.addfinalizer(django_db_blocker.restore)
The following file is also required:
$ cat pytest.ini
[pytest]
DJANGO_SETTINGS_MODULE = rnacentral.settings
Tests can then be run with:
cd $RNACENTRAL_HOME
py.test portal/tests/description_tests.py
Feel free to give feedback using GitHub issues or get in touch using the Contact form on our website.
- Django
- Django REST Framework
- Fabric
- Python RQ
- see requirements.txt for the full list
- Twitter Bootstrap
- Font Awesome
- Animate.css
- see LICENSE for more details