Locked History Actions

Galaxy Q&A

Warning: This page is outdated and no longer accurate

Galaxy Q&A

This wiki page has been created to regroup all the informations about the Galaxy Q&A.

What is Galaxy Q&A

Galaxy Q&A is a fork of BioStar. This is a collaboratively edited question and answer site. Our fork is a modification of BioStar to be able to tied Galaxy up with the Q&A.

The Galaxy Q&A and BioStar source code is open-source and accessible on Github:

For Galaxy team: A mail has been sent for the meeting the 08/29/2012 with all the credentials to access to Galaxy Q&A, the object of the mail is "[galaxy-lab] Tasks" from Anton Nekrutenko

Set up Galaxy Q&A

Galaxy is a Django website: "Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design".

Let's see how to set up your Galaxy Q&A.

How to set it up

If you already know how Django works, and how to download it from a Git repository, here are the main steps:

  • Create your local repository: "git clone https://github.com/galaxyQandA/biostar-central.git"

  • Download and install Celery for django

  • Make sure you have a PostGreSQL database (others database work, but you may have to make some changes in the settings of Celery and Galaxy Q&A)

  • Put your own settings in conf/"mySettings.py" and get the conf/default.env pointing on "mySettings.py".

For example:

   1 #
   2 # import from the main settings then override some of the values
   3 #
   4 from main.settings import *
   6 # For Asynchronous framework celery
   7 import os
   8 import sys
   9 sys.path.append(os.getcwd())
  11 import djcelery
  12 djcelery.setup_loader()
  14 BROKER_URL = 'django://'
  15 CELERY_IMPORTS = ("main.server.celery.tasks", )
  16 INSTALLED_APPS += ("djcelery", 'kombu.transport.django', )
  18 # set the domain administrators
  19 ADMINS = (
  20     ('Remi Marenco', 'remi dot marenco at gmail.com'),
  21 )
  23 # set the site url
  24 SITE_DOMAIN = 'localhost:8080'
  26 # set the secret key for the site
  27 SECRET_KEY = '007'
  29 # set your google tracker
  32 # database setup
  33 DATABASES = {
  34     'default': {
  35         'ENGINE': 'django.db.backends.postgresql_psycopg2',
  36         'NAME': '',
  37         'USER': '',
  38         'PASSWORD': '',
  39         'HOST': '',
  40         'PORT': '',
  41     }
  42 }
  44 # this sets wether to allow test logins via selenium
  47 # set up the email provider for your site
  48 SERVER_EMAIL = 'myServer'
  49 EMAIL_USE_TLS = True
  50 EMAIL_HOST = 'smtp.myserver.com'
  51 EMAIL_PORT = 587
  52 EMAIL_HOST_USER = 'mymail@mail.com'
  53 EMAIL_HOST_PASSWORD = 'mypassword'

You could have more info in main/settings.py or in cong/demo.py

  • Then, you can launch Galaxy q&a with the command ./biostar.sh in the root of your galaxy q&a directory

Where are the actual instances of Galaxy Q&A

The actual instances run on the slyfox server of Penn State university under the biostar account. There is two instance: One for the users and an other for all the development.

If you want to modify Galaxy Q&A, We recommend to put your modifications and test them on the development branch of Github (called galaxy_dev). Once everything seems good, you can merge your modifications on the main branch: master.

Be careful if you change the location of the Galaxy Q&A, as main Galaxy has its links hard-coded inside

Differences with BioStar

The fork has been created to tied Galaxy Q&A with Galaxy. Here are the main modifications added to Biostar:

  • The style of Biostar has been changed: To match the Galaxy style, some modifications has been added in Galaxy Q&A. Here is the changeset1changeset2

  • Implementation in Galaxy: Links has been added in Galaxy to point on some Galaxy Q&A urls. These urls have been added to match some Galaxy needs as automatically fill the tags when a user wants to ask a question from the tool links in Galaxy, or wants to access to all the questions related to tool they are actually using

  • Mail notification: As Galaxy works actually with mailing lists, users could be disoriented with the new Galaxy Q&A as there were only a RSS feed for bookmarked posts. We have also the mail notification on bookmarked posts, so users can know when somebody interacts with their bookmarked posts

  • Celery queue tasks: The display of pages can be slowed by some processing. Celery has been added to allow queue tasks to avoid that. For example, the mail notification can slightly slow the display of pages if there is a lot of users with a lot of posts. This no more happens with Celery

Implementation in Galaxy

Here is the changeset of the adds in Galaxy to link with the Galaxy Q&A: 

  • Link to Galaxy Q&A in the Help Menu of Galaxy

  • Link to Galaxy Q&A in the Help Menu of the Tool Shed

  • Links to Galaxy Q&A in the tool form of any tools

    • Icons added
    • Code added

Here is the changeset of the Galaxy tag and here the changeset of the CSS/Names modifications in Galaxy Q&A

Mail notification

The mail notification allows users to receive a mail when they bookmark a post on Galaxy Q&A. Each answer or comment on this post will send a mail to all users who bookmarked any question/answer/comment in the thread. User who will receive the mail will not be able to see the users who also bookmarked this thread.

Here are the changesets on Github: Changeset1, Changeset2, changeset3, changeset4

Important: You need to set up your mail server in your settings.py for this to work.

Important2: This feature has been moved as a task, see below for more informations

Celery: Queue tasks

With the number of users in Galaxy, Mail notification and others tasks could be a problem if they are processed in a view page. To avoid this problem, Celery has been set up for Galaxy Q&A.

Here is the changeset1 and the changeset2 for the mail notification.

Important: You need to verify that you have properly put the settings for Celery in the settings file and launched the Celery server before launching Galaxy Q&A

Left to do

Single Sign-On

The Single Sign-On feature allows Galaxy and Galaxy Q&A to identify a user with his Galaxy credentials. This feature is not finished yet, and need to be finished.

Migrate all the mails from the mailing-list into Galaxy Q&A

Galaxy Q&A could be instantly useful if we could retrieve all the content in the mailing-lists and add them to Galaxy Q&A