Skip to content

Commit

Permalink
decreasing load of tests of installing webserver
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Jun 25, 2019
1 parent 06007b5 commit 805f47b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions install_webserver.py
Expand Up @@ -23,7 +23,7 @@
import modomics
import pro

def build(alphabet_ids=None):
def build(alphabet_ids=None, pro_max_num_proteins=None):
""" Install website
* Clear REST cache
Expand All @@ -35,6 +35,7 @@ def build(alphabet_ids=None):
Args:
alphabet_ids (:obj:`list` of :obj:`str`): list of ids of alphabets to cache; if :obj:`None`,
cache all alphabets
max_num_proteins (:obj:`int`, optional): maximum number of proteins in PRO to analyze
"""
rest_client = bpforms.rest.app.test_client()

Expand Down Expand Up @@ -86,9 +87,10 @@ def build(alphabet_ids=None):
file.write(monomer.get_image(image_format='png', width=250, height=150))

# build examples
build_examples.build()
build_examples.build()
modomics.run()
pro.run()
if pro_max_num_proteins is not None and pro_max_num_proteins:
pro.run(max_num_proteins=pro_max_num_proteins)

# restart server
restart_filename = os.path.join('..', 'tmp', 'restart')
Expand Down
2 changes: 1 addition & 1 deletion tests/test_install_webserver.py
Expand Up @@ -21,4 +21,4 @@ def tearDownClass(cls):

def test(self):
import install_webserver
install_webserver.build(['dna'])
install_webserver.build(['dna'], pro_max_num_proteins=0)

0 comments on commit 805f47b

Please sign in to comment.