Skip to content

Commit 57ee3bc

Browse files
author
Peter J. Freeman
authored
Merge pull request #69 from openvar/develop_2_0
fix locust for python3 and remove biopython==1.74 requirement
2 parents 94022de + 785aa7a commit 57ee3bc

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

REQUIREMENTS.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
git+https://github.com/openvar/vv_hgvs@master#egg=vvhgvs
22
git+https://github.com/openvar/variantValidator@master#egg=VariantValidator
33
git+https://github.com/openvar/variantFormatter@master#egg=VariantFormatter
4-
biopython==1.74
5-
flask
4+
biopython
5+
flask==1.1.1
66
flask-restplus
77
gunicorn
88
biocommons.seqrepo>=0.5.1
-9 Bytes
Binary file not shown.

locust/locust.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from locust import HttpLocust, TaskSet, task, between
1+
from locust import HttpUser, TaskSet, task, between
22
import test_set
33

44
"""
@@ -23,7 +23,8 @@
2323
2424
"""
2525

26-
class UserBehavior(TaskSet):
26+
27+
class UserBehavior(HttpUser):
2728
"""
2829
Endpoint load-testing for the VariantValidator REST API
2930
@@ -51,6 +52,6 @@ def profile(self):
5152
self.client.get(url)
5253

5354

54-
class WebsiteUser(HttpLocust):
55+
class WebsiteUser(HttpUser):
5556
task_set = UserBehavior
56-
wait_time = between(1, 10) # seconds
57+
wait_time = between(1, 10) # seconds

locust/test_set.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import random
22

3+
34
def variant_list():
45
tests = [
56
"NC_000016.9:g.2099572TC>T",
@@ -327,6 +328,7 @@ def variant_list():
327328
odd_job = tests[random_number]
328329
return odd_job
329330

331+
330332
def gene_list():
331333
tests = [
332334
"BRCA1",
@@ -340,4 +342,4 @@ def gene_list():
340342

341343
random_number = random.randint(0, 6)
342344
random_task = tests[random_number]
343-
return random_task
345+
return random_task

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"VariantValidator @ git+https://github.com/openvar/variantValidator.git@master#egg=VariantValidator",
6161
"VariantFormatter @ git+https://github.com/openvar/variantFormatter.git@master#egg=VariantFormatter",
6262
"biocommons.seqrepo>=0.5.1",
63-
"biopython==1.74",
63+
"biopython",
6464
],
6565
setup_requires=[
6666
"setuptools_scm",

0 commit comments

Comments
 (0)