about summary refs log tree commit diff
diff options
context:
space:
mode:
authorzsloan2018-04-02 10:55:03 -0500
committerGitHub2018-04-02 10:55:03 -0500
commit92e89794fa57ef1570631403a8ceebf52a2cbc08 (patch)
tree6a67253cbcda1e258f6cd18cd5d80001e01d01a1
parent5424741a4a126bfd5f04df7cbcdc30b4e1376b86 (diff)
parent9544ca2e6461b267c28d9a4c7fe976bc34f10be3 (diff)
downloadgenenetwork2-92e89794fa57ef1570631403a8ceebf52a2cbc08.tar.gz
Merge pull request #300 from pjotrp/testing
Testing
-rwxr-xr-xbin/mechnical-rob111
-rw-r--r--etc/VERSION2
-rw-r--r--etc/nginx-genenetwork.conf54
-rw-r--r--test/lib/gntest.rb6
-rw-r--r--test/lib/link_checker.rb50
-rw-r--r--test/lib/main_web_functionality.rb62
-rw-r--r--test/lib/mapping.rb58
-rw-r--r--test/lib/navigation.rb43
-rw-r--r--wqflask/other_config/dot.pylintrc249
-rw-r--r--wqflask/other_config/nginx-old.conf108
-rw-r--r--wqflask/other_config/nginx_conf/gn2-lei.conf41
-rw-r--r--wqflask/other_config/nginx_conf/gn2-zach.conf52
-rw-r--r--wqflask/other_config/nginx_conf/gn2.conf41
-rw-r--r--wqflask/other_config/nginx_conf/gn2_sam.conf42
-rw-r--r--wqflask/other_config/nginx_conf/penguin.conf44
-rw-r--r--wqflask/other_config/pylintrc264
-rw-r--r--wqflask/wqflask/collect.py1
-rw-r--r--wqflask/wqflask/static/dbdoc/TODO.md1
-rw-r--r--wqflask/wqflask/user_manager.py18
19 files changed, 3 insertions, 1244 deletions
diff --git a/bin/mechnical-rob b/bin/mechnical-rob
deleted file mode 100755
index be223d94..00000000
--- a/bin/mechnical-rob
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/env ruby
-
-
-USAGE = <<EOT
-This is Mechanical-Rob - an automated web server tester for
-                         Genenetwork.org that uses the brilliant
-                         mechanize gem with minitest.
-
-To use this software you need to install mechanize. Run it from
-the root of the genenetwork2 source tree as, for example,
-
-  ./bin/test-website http://localhost:5003/ (default)
-
-If you are using the small deployment database you can use
-
-  ./bin/test-website --skip -n
-
-To run all tests
-
-  ./bin/test-website --all
-
-To run individual tests on localhost you can do
-
-  ruby -Itest -Itest/lib test/lib/mapping.rb --name="/Mapping/"
-
-For more information see http://genenetwork.org/
-
-EOT
-$stderr.print USAGE
-
-require 'optparse'
-
-options = { database: :small, link_checker: false}
-opts = OptionParser.new do |o|
-  o.banner = "Usage: #{File.basename($0)} [options] URL"
-
-  o.on('-d','--database', String, 'Use database (default db_webqtl_s)') do |s|
-    options[:database] =
-      case s
-      when 'xx'
-        :unknown
-      else
-        :small
-      end
-  end
-
-  o.on('--all', 'Run all tests') do
-    options[:all] = true
-  end
-
-  o.on('-l','--link-checker', 'Check for dead links') do
-    options[:link_checker] = true
-  end
-
-  o.on('--navigation', 'Check for navigation') do
-    options[:navigation] = true
-  end
-
-  o.on('--mapping', 'Check for mapping') do
-    options[:mapping] = true
-  end
-
-  o.on('--skip-broken', 'Skip tests that are known to be broken') do
-    options[:skip_broken] = true
-  end
-
-  o.separator ""
-  o.on_tail('-h', '--help', 'display this help and exit') do
-    options[:show_help] = true
-  end
-end
-
-opts.parse!(ARGV)
-
-if options[:show_help]
-  print opts
-  exit 1
-end
-
-$options = options  # we are using a global here
-$host =
-  if ARGV.size>0
-    ARGV.shift
-  else
-    "http://localhost:5003"
-  end
-
-$stderr.print "Testing <",$host,">\n"
-
-require 'mechanize'
-require 'minitest/spec'
-require 'minitest/autorun'
-
-# These are the actual testing modules
-
-libpath = File.dirname(File.dirname(__FILE__))
-$: << File.join(libpath,'test/lib')
-
-require 'main_web_functionality'
-
-if options[:all] or options[:mapping]
-  require 'mapping'
-end
-
-if options[:all] or options[:link_checker]
-  require 'link_checker'
-end
-
-if options[:all] or options[:navigation]
-  require 'navigation'
-end
diff --git a/etc/VERSION b/etc/VERSION
index ca9e199c..a4320e6f 100644
--- a/etc/VERSION
+++ b/etc/VERSION
@@ -1 +1 @@
-2.11-rc1
+2.11-rc2
diff --git a/etc/nginx-genenetwork.conf b/etc/nginx-genenetwork.conf
deleted file mode 100644
index 06fd3c57..00000000
--- a/etc/nginx-genenetwork.conf
+++ /dev/null
@@ -1,54 +0,0 @@
-user  nobody;
-worker_processes  4;
-pid /var/run/nginx.pid;
-
-error_log  /var/log/nginx/error.log;
-
-events {
-    worker_connections  16;
-}
-
-http {
-    include       mime.types;
-    # default_type  application/octet-stream;
-
-    # sendfile        on;
-    keepalive_timeout  480;
-
-    server {
-        listen       80;
-        server_name  localhost;
-
-        location / {
-            root   html;
-            index  index.html index.htm;
-        }
-
-        error_page   500 502 503 504  /50x.html;
-        location = /50x.html {
-            root   html;
-        }
-    }
-
-    server {
-        listen 80;
-        server_name test-gn2.genenetwork.org;
-        access_log  logs/test-gn2.access.log;
-
-        proxy_connect_timeout       3000;
-        proxy_send_timeout          3000;
-        proxy_read_timeout          3000;
-        send_timeout                3000;
-
-        location / {
-            # proxy_set_header   Host $host;
-            proxy_set_header   Host      $http_host;
-            # proxy_redirect     off;
-            proxy_set_header   Connection keep-alive;
-            proxy_set_header   X-Real-IP $remote_addr;
-            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
-            proxy_set_header   X-Forwarded-Host $server_name;
-            proxy_pass         http://127.0.0.1:5003;
-        }
-    }
-}
diff --git a/test/lib/gntest.rb b/test/lib/gntest.rb
deleted file mode 100644
index 5b21b3d5..00000000
--- a/test/lib/gntest.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-require 'minitest/autorun'
-require 'mechanize'
-require 'json'
-
-# ---- Use some default parameters if not set
-$host = "http://localhost:5003" if !$host
diff --git a/test/lib/link_checker.rb b/test/lib/link_checker.rb
deleted file mode 100644
index 36cb36c8..00000000
--- a/test/lib/link_checker.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-
-SKIP = "mailto:"
-
-class LinkChecker
-end
-
-describe LinkChecker do
-  before do
-    @agent = Mechanize.new
-    @agent.agent.http.ca_file = '/etc/ssl/certs/ca-certificates.crt'
-  end
-
-  it "Get to front page" do
-      page = @agent.get($host)
-      page.links.each do |link|
-        puts link.href
-        if link.href !~ /#{SKIP}/ # /static\/dbdoc\/Hippocampus/ and link.href !~ /mailto:|glossary.html|sample_r|grits.eecs.utk.edu|correlationAnnotation.html/
-           # Fetch link, program will crash with exception if link is broken
-           linkpage = @agent.get(link.href)
-          puts "Link to #{link.href} is valid, response code #{linkpage.code}"
-        end
-      end
-
-    end
-
-  describe LinkChecker do
-    it "Get to trait page" do
-      page = @agent.get($host+'/show_trait?trait_id=1435395_s_at&dataset=HC_M2_0606_P')
-      # p page
-
-      # Get to trait page for 1435395_s_at
-      # form2 = show_trait_page.forms_with("trait_page")[0]
-      # form2.fields[30].name.must_equal  "variance:C57BL/6J"
-      # form2.fields[30].value.must_equal "15.287"
-
-      # Test every link on the page to check if it's broken or not
-      page.links.each do |link|
-        puts link.href
-        if link.href !~ /#{SKIP}/ # /static\/dbdoc\/Hippocampus/ and link.href !~ /mailto:|glossary.html|sample_r|grits.eecs.utk.edu|correlationAnnotation.html/
-           # Fetch link, program will crash with exception if link is broken
-           linkpage = @agent.get(link.href)
-          puts "Link to #{link.href} is valid, response code #{linkpage.code}"
-        end
-      end
-
-    end
-
-  end
-
-end
diff --git a/test/lib/main_web_functionality.rb b/test/lib/main_web_functionality.rb
deleted file mode 100644
index 9ae49995..00000000
--- a/test/lib/main_web_functionality.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-# In these tests we navigate from the main page to search
-
-class MainWebFunctionality
-end
-
-describe MainWebFunctionality do
-  before do
-    @agent = Mechanize.new
-    @agent.agent.http.ca_file = '/etc/ssl/certs/ca-certificates.crt'
-  end
-
-  describe MainWebFunctionality do
-
-    it "Get to trait page" do
-      page = @agent.get($host)
-      p page
-      form = page.forms[1]
-      form.buttons[0].value.must_equal "Search" # main menu is loaded
-
-      # http://localhost:5003/search?species=mouse&group=BXD&type=Hippocampus+mRNA&dataset=HC_M2_0606_P&search_terms_or=&search_terms_and=MEAN%3D%2815+16%29+LRS%3D%2823+46%29&FormID=searchResult
-      form.fields[0].value.must_equal "searchResult"
-      form.fields[2].value = "MEAN=(15 16) LRS=(23 46)"
-      form.fields[3].value = "mouse"
-      form.fields[4].value = "BXD"
-      form.fields[5].value = "Hippocampus mRNA"
-      form.fields[6].value = "HC_M2_0606_P"
-      search_page = @agent.submit(form, form.buttons.first)
-      p "=================="
-      p search_page
-      probe_link = search_page.links.find { |l| l.text =~ /1435395_s_at/ }
-      probe_link.uri.to_s.must_equal "/show_trait?trait_id=1435395_s_at&dataset=HC_M2_0606_P"
-      show_trait_page = probe_link.click
-      # p show_trait_page
-
-      # Get to trait page for 1435395_s_at
-
-      form2 = show_trait_page.forms_with("trait_page")[0]
-      # [name: corr_dataset value: HC_M2_0606_P]
-      form2.fields.select { |fld| fld.name == 'corr_dataset' }.first.value.must_equal 'HC_M2_0606_P'
-      if $options[:database] == :small
-        form2.fields[30].name.must_equal  "value:DBA/2J"
-      else
-        form2.fields[30].name.must_equal  "variance:C57BL/6J"
-      end
-      # form2.fields[30].value.must_equal "15.287"
-
-      # Test every link on the page to check if it's broken or not
-      break if not $options[:link_checker]
-      show_trait_page.links.each do |link|
-        puts link.href
-        if link.href !~ /static\/dbdoc\/Hippocampus/ and link.href !~ /glossary.html|sample_r|grits.eecs.utk.edu|correlationAnnotation.html/
-          # Fetch link, program will crash with exception if link is broken
-          linkpage = @agent.get(link.href)
-          puts "Link to #{link.href} is valid, response code #{linkpage.code}"
-        end
-      end
-
-    end
-
-  end
-
-end
diff --git a/test/lib/mapping.rb b/test/lib/mapping.rb
deleted file mode 100644
index 20e5bd40..00000000
--- a/test/lib/mapping.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-# In these tests we navigate from the main page to a specific trait then hit the different mapping tool buttons (In this case pylMM and r/qtl) followed by computing the results (marker regressions).
-
-require 'gntest'
-
-class MappingTest
-end
-
-describe MappingTest do
-  before do
-    @agent = Mechanize.new
-    @agent.agent.http.ca_file = '/etc/ssl/certs/ca-certificates.crt'
-  end
-
-  describe MappingTest do
-    it "pylmm mapping tool selection" do
-      url = $host+'/marker_regression'
-
-      json = JSON::load(File.read('test/data/input/mapping/1435395_s_at_HC_M2_0606_P.json'))
-      json["method"] = "pylmm"
-      # p json
-      page = @agent.post(URI.encode(url), json)
-      # Unpacking the page is slow - somehow - but the run is enough as a test
-      # form = page.forms_with("marker_regression")[0]
-      # form.fields.select { |fld| fld.name == 'dataset' }.first.value.must_equal 'HC_M2_0606_P'
-      # form.fields.select { |fld| fld.name == 'value:BXD1' }.first.value.must_equal '6.749'
-    end
-  end
-
-  describe MappingTest do
-    it "R/qtl mapping tool selection" do
-      url = $host+'/marker_regression' # ?trait_id=1435395_s_at&dataset=HC_M2_0606_P'
-
-      json = JSON::load(File.read('test/data/input/mapping/1435395_s_at_HC_M2_0606_P.json'))
-      # p json
-      page = @agent.post(URI.encode(url),
-                         json,
-                         ({'Content-Type' => 'application/x-www-form-urlencoded'}))
-      form = page.forms_with("marker_regression")[0]
-      p form
-      form.fields.select { |fld| fld.name == 'dataset' }.first.value.must_equal 'HC_M2_0606_P'
-      form.fields.select { |fld| fld.name == 'value:BXD1' }.first.value.must_equal "15.034"
-    end
-  end
-
-  describe MappingTest do
-    it "CIM mapping tool selection (using reaper)" do
-      url = $host+'/marker_regression'
-
-      json = JSON::load(File.read('test/data/input/mapping/1435395_s_at_HC_M2_0606_P.json'))
-      json["method"] = "reaper"
-      page = @agent.post(URI.encode(url), json)
-      form = page.forms_with("marker_regression")[0]
-      form.fields.select { |fld| fld.name == 'dataset' }.first.value.must_equal 'HC_M2_0606_P'
-      form.fields.select { |fld| fld.name == 'value:BXD1' }.first.value.must_equal "15.034"
-    end
-  end
-
-end
diff --git a/test/lib/navigation.rb b/test/lib/navigation.rb
deleted file mode 100644
index ee9f41d2..00000000
--- a/test/lib/navigation.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# In these tests we navigate from the main page to a specific trait then hit the different mapping tool buttons (In this case pylMM and r/qtl) followed by computing the results (marker regressions).
-
-
-class MappingTest
-end
-
-describe MappingTest do
-  before do
-    @agent = Mechanize.new
-    @agent.agent.http.ca_file = '/etc/ssl/certs/ca-certificates.crt'
-  end
-
-  describe MappingTest do
-    it "pyLMM mapping tool selection" do
-      break if $options[:skip_broken]
-      page = @agent.get($host+'/show_trait?trait_id=1435395_s_at&dataset=HC_M2_0606_P')
-#Navigates to http://localhost:5003/show_trait?trait_id=1435395_s_at&dataset=HC_M2_0606_P and clicks respective buttons.
-      link = page.link_with(text: 'pyLMM')
-      page = link.click
-      puts page.uri
-      link = page.link_with(text: 'Compute')
-      page = link.click
-      puts page.uri
-      probe_link.uri.to_s.must_equal "/marker_regression"
-    end
-  end
-
-end
-
-describe MappingTest do
-    it "R/qtl mapping tool selection" do
-      break if $options[:skip_broken]
-      page = @agent.get($host+'/show_trait?trait_id=1435395_s_at&dataset=HC_M2_0606_P')
-      link = page.link_with(text: 'R/qtl')
-      page = link.click
-      puts page.uri
-      form.field_with(:name => 'Methods').options[2].select
-      link = page.link_with(text: 'Compute')
-      page = link.click
-      puts page.uri
-      probe_link.uri.to_s.must_equal "/marker_regression"
-    end
-end
diff --git a/wqflask/other_config/dot.pylintrc b/wqflask/other_config/dot.pylintrc
deleted file mode 100644
index 2774300a..00000000
--- a/wqflask/other_config/dot.pylintrc
+++ /dev/null
@@ -1,249 +0,0 @@
-[MASTER]
-
-# Specify a configuration file.
-#rcfile=
-
-# Python code to execute, usually for sys.path manipulation such as
-# pygtk.require().
-#init-hook=
-
-# Profiled execution.
-profile=no
-
-# Add files or directories to the blacklist. They should be base names, not
-# paths.
-ignore=CVS
-
-# Pickle collected data for later comparisons.
-persistent=yes
-
-# List of plugins (as comma separated values of python modules names) to load,
-# usually to register additional checkers.
-load-plugins=
-
-
-[MESSAGES CONTROL]
-
-# Enable the message, report, category or checker with the given id(s). You can
-# either give multiple identifier separated by comma (,) or put this option
-# multiple time.
-#enable=
-
-# Disable the message, report, category or checker with the given id(s). You
-# can either give multiple identifier separated by comma (,) or put this option
-# multiple time (only on the command line, not in the configuration file where
-# it should appear only once).
-#disable=
-
-
-[REPORTS]
-
-# Set the output format. Available formats are text, parseable, colorized, msvs
-# (visual studio) and html
-output-format=colorized
-
-# Include message's id in output
-include-ids=no
-
-# Put messages in a separate file for each module / package specified on the
-# command line instead of printing them on stdout. Reports (if any) will be
-# written in a file name "pylint_global.[txt|html]".
-files-output=no
-
-# Tells whether to display a full report or only the messages
-reports=yes
-
-# Python expression which should return a note less than 10 (10 is the highest
-# note). You have access to the variables errors warning, statement which
-# respectively contain the number of errors / warnings messages and the total
-# number of statements analyzed. This is used by the global evaluation report
-# (RP0004).
-evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
-
-# Add a comment according to your evaluation note. This is used by the global
-# evaluation report (RP0004).
-comment=no
-
-
-[MISCELLANEOUS]
-
-# List of note tags to take in consideration, separated by a comma.
-notes=FIXME,XXX,TODO
-
-
-[TYPECHECK]
-
-# Tells whether missing members accessed in mixin class should be ignored. A
-# mixin class is detected if its name ends with "mixin" (case insensitive).
-ignore-mixin-members=yes
-
-# List of classes names for which member attributes should not be checked
-# (useful for classes with attributes dynamically set).
-ignored-classes=SQLObject
-
-# When zope mode is activated, add a predefined set of Zope acquired attributes
-# to generated-members.
-zope=no
-
-# List of members which are set dynamically and missed by pylint inference
-# system, and so shouldn't trigger E0201 when accessed. Python regular
-# expressions are accepted.
-generated-members=REQUEST,acl_users,aq_parent
-
-
-[SIMILARITIES]
-
-# Minimum lines number of a similarity.
-min-similarity-lines=4
-
-# Ignore comments when computing similarities.
-ignore-comments=yes
-
-# Ignore docstrings when computing similarities.
-ignore-docstrings=yes
-
-
-[BASIC]
-
-# Required attributes for module, separated by a comma
-required-attributes=
-
-# List of builtins function names that should not be used, separated by a comma
-bad-functions=map,filter,apply,input
-
-# Regular expression which should only match correct module names
-module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
-
-# Regular expression which should only match correct module level names
-const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
-
-# Regular expression which should only match correct class names
-class-rgx=[A-Z_][a-zA-Z0-9]+$
-
-# Regular expression which should only match correct function names
-function-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct method names
-method-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct instance attribute names
-attr-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct argument names
-argument-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct variable names
-variable-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct list comprehension /
-# generator expression variable names
-inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
-
-# Good variable names which should always be accepted, separated by a comma
-good-names=i,j,k,ex,Run,_
-
-# Bad variable names which should always be refused, separated by a comma
-bad-names=foo,bar,baz,toto,tutu,tata
-
-# Regular expression which should only match functions or classes name which do
-# not require a docstring
-no-docstring-rgx=__.*__
-
-
-[VARIABLES]
-
-# Tells whether we should check for unused import in __init__ files.
-init-import=no
-
-# A regular expression matching the beginning of the name of dummy variables
-# (i.e. not used).
-dummy-variables-rgx=_|dummy
-
-# List of additional names supposed to be defined in builtins. Remember that
-# you should avoid to define new builtins when possible.
-additional-builtins=
-
-
-[FORMAT]
-
-# Maximum number of characters on a single line.
-max-line-length=100
-
-# Maximum number of lines in a module
-max-module-lines=1000
-
-# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
-# tab).
-indent-string='    '
-
-
-[IMPORTS]
-
-# Deprecated modules which should not be used, separated by a comma
-deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
-
-# Create a graph of every (i.e. internal and external) dependencies in the
-# given file (report RP0402 must not be disabled)
-import-graph=
-
-# Create a graph of external dependencies in the given file (report RP0402 must
-# not be disabled)
-ext-import-graph=
-
-# Create a graph of internal dependencies in the given file (report RP0402 must
-# not be disabled)
-int-import-graph=
-
-
-[DESIGN]
-
-# Maximum number of arguments for function / method
-max-args=5
-
-# Argument names that match this expression will be ignored. Default to name
-# with leading underscore
-ignored-argument-names=_.*
-
-# Maximum number of locals for function / method body
-max-locals=15
-
-# Maximum number of return / yield for function / method body
-max-returns=6
-
-# Maximum number of branch for function / method body
-max-branchs=12
-
-# Maximum number of statements in function / method body
-max-statements=50
-
-# Maximum number of parents for a class (see R0901).
-max-parents=7
-
-# Maximum number of attributes for a class (see R0902).
-max-attributes=7
-
-# Minimum number of public methods for a class (see R0903).
-min-public-methods=2
-
-# Maximum number of public methods for a class (see R0904).
-max-public-methods=20
-
-
-[CLASSES]
-
-# List of interface methods to ignore, separated by a comma. This is used for
-# instance to not check methods defines in Zope's Interface base class.
-ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
-
-# List of method names used to declare (i.e. assign) instance attributes.
-defining-attr-methods=__init__,__new__,setUp
-
-# List of valid names for the first argument in a class method.
-valid-classmethod-first-arg=cls
-
-
-[EXCEPTIONS]
-
-# Exceptions that will emit a warning when being caught. Defaults to
-# "Exception"
-overgeneral-exceptions=Exception
diff --git a/wqflask/other_config/nginx-old.conf b/wqflask/other_config/nginx-old.conf
deleted file mode 100644
index 65ee768c..00000000
--- a/wqflask/other_config/nginx-old.conf
+++ /dev/null
@@ -1,108 +0,0 @@
-
-#user  nobody;
-worker_processes  1;
-
-#error_log  logs/error.log;
-#error_log  logs/error.log  notice;
-#error_log  logs/error.log  info;
-
-#pid        logs/nginx.pid;
-
-
-events {
-    worker_connections  1024;
-}
-
-
-http {
-    include       mime.types;
-    default_type  application/octet-stream;
-
-    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
-    #                  '$status $body_bytes_sent "$http_referer" '
-    #                  '"$http_user_agent" "$http_x_forwarded_for"';
-
-    #access_log  logs/access.log  main;
-
-    sendfile        on;
-    #tcp_nopush     on;
-
-    #keepalive_timeout  0;
-    keepalive_timeout  65;
-
-    gzip  on;
-
-    server {
-	# Modeled after http://flask.pocoo.org/docs/deploying/wsgi-standalone/
-	listen 80;
-
-    	server_name _;
-
-    	access_log  /var/log/nginx/access.log;
-    	error_log  /var/log/nginx/error.log;
-
-	location ^~ /css/ {
-		root /home/sam/gene/wqflask/wqflask/static/;
-	}
-
-	location ^~ /javascript/ {
-		root /home/sam/gene/wqflask/wqflask/static/;
-	}
-
-#    location ^~ /image/ {
-#		root /home/sam/gene/wqflask/wqflask/static/;
-#	}
-
-	location ^~ /images/ {
-		root /home/sam/gene/wqflask/wqflask/static/;
-	}
-
-    	location / {
-        	proxy_pass         http://127.0.0.1:5000/;
-        	proxy_redirect     off;
-
-        	proxy_set_header   Host             $host;
-        	proxy_set_header   X-Real-IP        $remote_addr;
-        	proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
-   	 }
-
-    }
-
-
-    # another virtual host using mix of IP-, name-, and port-based configuration
-    #
-    #server {
-    #    listen       8000;
-    #    listen       somename:8080;
-    #    server_name  somename  alias  another.alias;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
-
-    # HTTPS server
-    #
-    #server {
-    #    listen       443;
-    #    server_name  localhost;
-
-    #    ssl                  on;
-    #    ssl_certificate      cert.pem;
-    #    ssl_certificate_key  cert.key;
-
-    #    ssl_session_timeout  5m;
-
-    #    ssl_protocols  SSLv2 SSLv3 TLSv1;
-    #    ssl_ciphers  HIGH:!aNULL:!MD5;
-    #    ssl_prefer_server_ciphers   on;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
-}
diff --git a/wqflask/other_config/nginx_conf/gn2-lei.conf b/wqflask/other_config/nginx_conf/gn2-lei.conf
deleted file mode 100644
index 893ad435..00000000
--- a/wqflask/other_config/nginx_conf/gn2-lei.conf
+++ /dev/null
@@ -1,41 +0,0 @@
-server {
-    # Modeled after http://flask.pocoo.org/docs/deploying/wsgi-standalone/
-    listen 80;
-
-    server_name gn2-lei.genenetwork.org;
-
-    access_log  /var/log/nginx/lei_access.log;
-    error_log  /var/log/nginx/lei_error.log;
-
-    location ^~ /css/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-
-    location ^~ /javascript/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-
-#    location ^~ /image/ {
-#           root /gene/wqflask/wqflask/static/;
-#       }
-
-    location ^~ /images/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-    
-    ### New - added by Sam
-    #location ^~ /static/ {
-    #       root /gene/wqflask/wqflask/static/;
-    #}
-
-    location / {
-            proxy_pass         http://127.0.0.1:5001/;
-            proxy_redirect     off;
-
-            proxy_set_header   Host             $host;
-            proxy_set_header   X-Real-IP        $remote_addr;
-            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
-            
-            proxy_read_timeout 40m;
-    }
-}
diff --git a/wqflask/other_config/nginx_conf/gn2-zach.conf b/wqflask/other_config/nginx_conf/gn2-zach.conf
deleted file mode 100644
index 38347292..00000000
--- a/wqflask/other_config/nginx_conf/gn2-zach.conf
+++ /dev/null
@@ -1,52 +0,0 @@
-server {
-    # Modeled after http://flask.pocoo.org/docs/deploying/wsgi-standalone/
-    listen 80;
-
-    server_name gn2-zach.genenetwork.org;
-
-    access_log  /var/log/nginx/access.log;
-    error_log  /var/log/nginx/error.log;
-
-    location ^~ /css/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-
-    location ^~ /javascript/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-
-#    location ^~ /image/ {
-#           root /gene/wqflask/wqflask/static/;
-#       }
-
-    location ^~ /images/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-    
-    ### New - added by Sam
-    #location ^~ /static/ {
-    #       root /gene/wqflask/wqflask/static/;
-    #}
-
-	location /plink_gemma/ {
-		root /home/zas1024/gene/wqflask/wqflask/;
-		autoindex on;
-	}
-
-	location /download/ {
-		root /home/zas1024/gene/wqflask/wqflask/;
-		autoindex on;
-	}
-
-    location / {
-            proxy_pass         http://127.0.0.1:5002/;
-            proxy_redirect     off;
-
-            proxy_set_header   Host             $host;
-            proxy_set_header   X-Real-IP        $remote_addr;
-            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
-            
-            proxy_read_timeout 40m;
-    }
-}
-
diff --git a/wqflask/other_config/nginx_conf/gn2.conf b/wqflask/other_config/nginx_conf/gn2.conf
deleted file mode 100644
index a51b4113..00000000
--- a/wqflask/other_config/nginx_conf/gn2.conf
+++ /dev/null
@@ -1,41 +0,0 @@
-server {
-    # Modeled after http://flask.pocoo.org/docs/deploying/wsgi-standalone/
-    listen 80;
-
-    server_name gn2.genenetwork.org;
-
-    access_log  /var/log/nginx/access.log;
-    error_log  /var/log/nginx/error.log;
-
-    location ^~ /css/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-
-    location ^~ /javascript/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-
-#    location ^~ /image/ {
-#           root /gene/wqflask/wqflask/static/;
-#       }
-
-    location ^~ /images/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-    
-    ### New - added by Sam
-    #location ^~ /static/ {
-    #       root /gene/wqflask/wqflask/static/;
-    #}
-
-    location / {
-            proxy_pass         http://127.0.0.1:5000/;
-            proxy_redirect     off;
-
-            proxy_set_header   Host             $host;
-            proxy_set_header   X-Real-IP        $remote_addr;
-            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
-            
-            proxy_read_timeout 40m;
-    }
-}
diff --git a/wqflask/other_config/nginx_conf/gn2_sam.conf b/wqflask/other_config/nginx_conf/gn2_sam.conf
deleted file mode 100644
index f9abbbd2..00000000
--- a/wqflask/other_config/nginx_conf/gn2_sam.conf
+++ /dev/null
@@ -1,42 +0,0 @@
-server {
-    # Modeled after http://flask.pocoo.org/docs/deploying/wsgi-standalone/
-    listen 80;
-
-    server_name gn2_sam.genenetwork.org;
-
-    access_log  /var/log/nginx/access.log;
-    error_log  /var/log/nginx/error.log;
-
-    location ^~ /css/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-
-    location ^~ /javascript/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-
-#    location ^~ /image/ {
-#           root /gene/wqflask/wqflask/static/;
-#       }
-
-    location ^~ /images/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-    
-    ### New - added by Sam
-    #location ^~ /static/ {
-    #       root /gene/wqflask/wqflask/static/;
-    #}
-
-    location / {
-            proxy_pass         http://127.0.0.1:5005/;
-            proxy_redirect     off;
-
-            proxy_set_header   Host             $host;
-            proxy_set_header   X-Real-IP        $remote_addr;
-            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
-            
-            proxy_read_timeout 40m;
-    }
-}
-
diff --git a/wqflask/other_config/nginx_conf/penguin.conf b/wqflask/other_config/nginx_conf/penguin.conf
deleted file mode 100644
index c819951c..00000000
--- a/wqflask/other_config/nginx_conf/penguin.conf
+++ /dev/null
@@ -1,44 +0,0 @@
-server {
-    # Modeled after http://flask.pocoo.org/docs/deploying/wsgi-standalone/
-
-    client_max_body_size 20M;
-    listen 80;
-
-    server_name penguin.uthsc.edu;
-
-    access_log  /var/log/nginx/access.log;
-    error_log  /var/log/nginx/error.log;
-
-    location ^~ /css/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-
-    location ^~ /javascript/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-
-#    location ^~ /image/ {
-#           root /gene/wqflask/wqflask/static/;
-#       }
-
-    location ^~ /images/ {
-            root /gene/wqflask/wqflask/static/;
-    }
-    
-    ### New - added by Sam
-    #location ^~ /static/ {
-    #       root /gene/wqflask/wqflask/static/;
-    #}
-
-    location / {
-            proxy_pass         http://127.0.0.1:5000/;
-            proxy_redirect     off;
-
-            proxy_set_header   Host             $host;
-            proxy_set_header   X-Real-IP        $remote_addr;
-            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
-            
-            proxy_read_timeout 40m;
-    }
-}
-
diff --git a/wqflask/other_config/pylintrc b/wqflask/other_config/pylintrc
deleted file mode 100644
index b23af7a4..00000000
--- a/wqflask/other_config/pylintrc
+++ /dev/null
@@ -1,264 +0,0 @@
-[MASTER]
-
-# Specify a configuration file.
-#rcfile=
-
-# Python code to execute, usually for sys.path manipulation such as
-# pygtk.require().
-#init-hook=
-
-# Profiled execution.
-profile=no
-
-# Add files or directories to the blacklist. They should be base names, not
-# paths.
-ignore=CVS
-
-# Pickle collected data for later comparisons.
-persistent=yes
-
-# List of plugins (as comma separated values of python modules names) to load,
-# usually to register additional checkers.
-load-plugins=
-
-
-[MESSAGES CONTROL]
-
-# Enable the message, report, category or checker with the given id(s). You can
-# either give multiple identifier separated by comma (,) or put this option
-# multiple time. See also the "--disable" option for examples.
-#enable=
-
-# Disable the message, report, category or checker with the given id(s). You
-# can either give multiple identifiers separated by comma (,) or put this
-# option multiple times (only on the command line, not in the configuration
-# file where it should appear only once).You can also use "--disable=all" to
-# disable everything first and then reenable specific checks. For example, if
-# you want to run only the similarities checker, you can use "--disable=all
-# --enable=similarities". If you want to run only the classes checker, but have
-# no Warning level messages displayed, use"--disable=all --enable=classes
-# --disable=W"
-disable=no-init, star-args, no-member, import-error
-
-
-[REPORTS]
-
-# Set the output format. Available formats are text, parseable, colorized, msvs
-# (visual studio) and html. You can also give a reporter class, eg
-# mypackage.mymodule.MyReporterClass.
-output-format=text
-
-# Include message's id in output
-include-ids=no
-
-# Include symbolic ids of messages in output
-symbols=no
-
-# Put messages in a separate file for each module / package specified on the
-# command line instead of printing them on stdout. Reports (if any) will be
-# written in a file name "pylint_global.[txt|html]".
-files-output=no
-
-# Tells whether to display a full report or only the messages
-reports=yes
-
-# Python expression which should return a note less than 10 (10 is the highest
-# note). You have access to the variables errors warning, statement which
-# respectively contain the number of errors / warnings messages and the total
-# number of statements analyzed. This is used by the global evaluation report
-# (RP0004).
-evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
-
-# Add a comment according to your evaluation note. This is used by the global
-# evaluation report (RP0004).
-comment=no
-
-
-[SIMILARITIES]
-
-# Minimum lines number of a similarity.
-min-similarity-lines=4
-
-# Ignore comments when computing similarities.
-ignore-comments=yes
-
-# Ignore docstrings when computing similarities.
-ignore-docstrings=yes
-
-# Ignore imports when computing similarities.
-ignore-imports=no
-
-
-[VARIABLES]
-
-# Tells whether we should check for unused import in __init__ files.
-init-import=no
-
-# A regular expression matching the beginning of the name of dummy variables
-# (i.e. not used).
-dummy-variables-rgx=_|dummy
-
-# List of additional names supposed to be defined in builtins. Remember that
-# you should avoid to define new builtins when possible.
-additional-builtins=
-
-
-[BASIC]
-
-# Required attributes for module, separated by a comma
-required-attributes=
-
-# List of builtins function names that should not be used, separated by a comma
-bad-functions=map,filter,apply,input
-
-# Regular expression which should only match correct module names
-module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
-
-# Regular expression which should only match correct module level names
-const-rgx=(([A-Z_][A-Za-z0-9_]*)|(__.*__))$
-
-# Regular expression which should only match correct class names
-class-rgx=[A-Z_][a-zA-Z0-9]+$
-
-# Regular expression which should only match correct function names
-function-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct method names
-method-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct instance attribute names
-attr-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct argument names
-argument-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct variable names
-variable-rgx=[a-z_][a-z0-9_]{2,30}$
-
-# Regular expression which should only match correct list comprehension /
-# generator expression variable names
-inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
-
-# Good variable names which should always be accepted, separated by a comma
-good-names=i,j,k,ex,Run,_
-
-# Bad variable names which should always be refused, separated by a comma
-bad-names=foo,bar,baz,toto,tutu,tata
-
-# Regular expression which should only match functions or classes name which do
-# not require a docstring
-no-docstring-rgx=__.*__
-
-
-[FORMAT]
-
-# Maximum number of characters on a single line.
-max-line-length=100
-
-# Maximum number of lines in a module
-max-module-lines=1000
-
-# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
-# tab).
-indent-string='    '
-
-
-[MISCELLANEOUS]
-
-# List of note tags to take in consideration, separated by a comma.
-notes=FIXME,XXX,TODO
-
-
-[TYPECHECK]
-
-# Tells whether missing members accessed in mixin class should be ignored. A
-# mixin class is detected if its name ends with "mixin" (case insensitive).
-ignore-mixin-members=yes
-
-# List of classes names for which member attributes should not be checked
-# (useful for classes with attributes dynamically set).
-ignored-classes=SQLObject
-
-# When zope mode is activated, add a predefined set of Zope acquired attributes
-# to generated-members.
-zope=no
-
-# List of members which are set dynamically and missed by pylint inference
-# system, and so shouldn't trigger E0201 when accessed. Python regular
-# expressions are accepted.
-generated-members=REQUEST,acl_users,aq_parent
-
-
-[DESIGN]
-
-# Maximum number of arguments for function / method
-max-args=5
-
-# Argument names that match this expression will be ignored. Default to name
-# with leading underscore
-ignored-argument-names=_.*
-
-# Maximum number of locals for function / method body
-max-locals=15
-
-# Maximum number of return / yield for function / method body
-max-returns=6
-
-# Maximum number of branch for function / method body
-max-branchs=12
-
-# Maximum number of statements in function / method body
-max-statements=50
-
-# Maximum number of parents for a class (see R0901).
-max-parents=7
-
-# Maximum number of attributes for a class (see R0902).
-max-attributes=7
-
-# Minimum number of public methods for a class (see R0903).
-min-public-methods=2
-
-# Maximum number of public methods for a class (see R0904).
-max-public-methods=20
-
-
-[IMPORTS]
-
-# Deprecated modules which should not be used, separated by a comma
-deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
-
-# Create a graph of every (i.e. internal and external) dependencies in the
-# given file (report RP0402 must not be disabled)
-import-graph=
-
-# Create a graph of external dependencies in the given file (report RP0402 must
-# not be disabled)
-ext-import-graph=
-
-# Create a graph of internal dependencies in the given file (report RP0402 must
-# not be disabled)
-int-import-graph=
-
-
-[CLASSES]
-
-# List of interface methods to ignore, separated by a comma. This is used for
-# instance to not check methods defines in Zope's Interface base class.
-ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
-
-# List of method names used to declare (i.e. assign) instance attributes.
-defining-attr-methods=__init__,__new__,setUp
-
-# List of valid names for the first argument in a class method.
-valid-classmethod-first-arg=cls
-
-# List of valid names for the first argument in a metaclass class method.
-valid-metaclass-classmethod-first-arg=mcs
-
-
-[EXCEPTIONS]
-
-# Exceptions that will emit a warning when being caught. Defaults to
-# "Exception"
-overgeneral-exceptions=Exception
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py
index 629977ac..ffc698de 100644
--- a/wqflask/wqflask/collect.py
+++ b/wqflask/wqflask/collect.py
@@ -227,6 +227,7 @@ def collections_add():
     traits=request.args['traits']
 
     if g.user_session.logged_in:
+        logger.debug("user_session",g.user_session)
         user_collections = g.user_session.user_ob.user_collections
         logger.debug("user_collections are:", user_collections)
         return render_template("collections/add.html",
diff --git a/wqflask/wqflask/static/dbdoc/TODO.md b/wqflask/wqflask/static/dbdoc/TODO.md
deleted file mode 100644
index c0a8bab7..00000000
--- a/wqflask/wqflask/static/dbdoc/TODO.md
+++ /dev/null
@@ -1 +0,0 @@
-TODO: Add all database documentation into this folder
diff --git a/wqflask/wqflask/user_manager.py b/wqflask/wqflask/user_manager.py
index ebca4807..a0605803 100644
--- a/wqflask/wqflask/user_manager.py
+++ b/wqflask/wqflask/user_manager.py
@@ -23,9 +23,6 @@ import urlparse
 
 import simplejson as json
 
-import sqlalchemy
-from sqlalchemy import orm
-
 #from redis import StrictRedis
 import redis
 Redis = redis.StrictRedis()
@@ -46,7 +43,6 @@ from wqflask.database import db_session
 from wqflask import model
 
 from utility import Bunch, Struct, after
-from utility.tools import LOG_SQL, LOG_SQL_ALCHEMY
 
 import logging
 from utility.logger import getLogger
@@ -223,6 +219,7 @@ class UserSession(object):
     def user_ob(self):
         """Actual sqlalchemy record"""
         # Only look it up once if needed, then store it
+        raise "OBSOLETE: use ElasticSearch instead"
         try:
             if LOG_SQL_ALCHEMY:
                 logging.getLogger('sqlalchemy.pool').setLevel(logging.DEBUG)
@@ -844,19 +841,6 @@ def register():
     return render_template("new_security/register_user.html", values=params, errors=errors)
 
 
-
-
-#@app.route("/n/login", methods=('GET', 'POST'))
-#def login():
-#    return user_manager.login()
-#
-#@app.route("/manage/verify")
-#def verify():
-#    user_manager.verify_email()
-#    return render_template("new_security/verified.html")
-
-
-
 ################################# Sign and unsign #####################################
 
 def url_for_hmac(endpoint, **values):