Skip to content

Commit

Permalink
Stop hitting S3 in the smasher tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wvauclain committed Jun 11, 2020
1 parent e00fef0 commit 53025eb
Show file tree
Hide file tree
Showing 6 changed files with 262 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ workers/test_volume/*
# However for a couple tests we do store the data in the repo and need to track them.
!workers/test_volume/raw/TEST/TRANSCRIPTOME_INDEX/aegilops_tauschii_short.gtf.gz
!workers/test_volume/raw/TEST/NO_OP/test.txt
!workers/test_volume/cassettes


# Byte-compiled / optimized / DLL files
Expand Down
2 changes: 2 additions & 0 deletions workers/data_refinery_workers/processors/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ datashader>=0.6.9
datashape>=0.5.2
holoviews>=1.11.2
selenium==3.141.0
# For mocking out S3 calls for the smasher
vcrpy
12 changes: 8 additions & 4 deletions workers/data_refinery_workers/processors/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ docopt==0.6.2 # via coveralls
docutils==0.14 # via botocore
heapdict==1.0.0 # via zict
holoviews==1.11.3 # via -r requirements.in
idna==2.7 # via requests
idna==2.7 # via requests, yarl
jinja2==2.11.1 # via -r requirements.in, bokeh
jmespath==0.9.3 # via boto3, botocore
joblib==0.13.2 # via scikit-learn
Expand All @@ -36,10 +36,11 @@ markupsafe==1.1.1 # via jinja2
matplotlib==3.0.0 # via -r requirements.in, scikit-image
mpmath==1.0.0 # via sympy
msgpack==0.6.1 # via distributed
multidict==4.7.6 # via yarl
multipledispatch==0.6.0 # via datashape
networkx==2.2 # via scikit-image
numba==0.43.0 # via datashader
numpy==1.15.2 # via -r requirements.in, bokeh, dask, datashader, datashape, holoviews, matplotlib, numba, pandas, pywavelets, scikit-learn, scipy, xarray
numpy==1.15.2 # via -r requirements.in, bokeh, dask, datashader, datashape, holoviews, matplotlib, numba, pandas, pywavelets, scikit-learn, xarray
packaging==19.0 # via bokeh
pandas==0.23.4 # via -r requirements.in, dask, datashader, xarray
param==1.8.2 # via colorcet, datashader, holoviews, pyct, pyviz-comms
Expand All @@ -54,7 +55,7 @@ python-nomad==1.1.0 # via -r requirements.in
pytz==2018.5 # via django, pandas
pyviz-comms==0.7.2 # via holoviews
pywavelets==1.0.2 # via scikit-image
pyyaml==4.2b4 # via -r requirements.in, bokeh, distributed, pyct
pyyaml==4.2b4 # via -r requirements.in, bokeh, distributed, pyct, vcrpy
requests==2.22.0 # via -r requirements.in, coveralls, pyct, python-nomad
retrying==1.3.3 # via -r requirements.in
s3transfer==0.2.1 # via boto3
Expand All @@ -63,7 +64,7 @@ scikit-learn==0.21.3 # via -r requirements.in
scipy==1.1.0 # via -r requirements.in, datashader, scikit-image, scikit-learn
selenium==3.141.0 # via -r requirements.in
simplejson==3.16.0 # via -r requirements.in
six==1.11.0 # via bokeh, cycler, distributed, multipledispatch, packaging, python-dateutil, retrying, scikit-image
six==1.11.0 # via bokeh, cycler, distributed, multipledispatch, packaging, python-dateutil, retrying, scikit-image, vcrpy
sortedcontainers==2.1.0 # via distributed
sqlparse==0.3.0 # via django
sympy==1.3 # via -r requirements.in
Expand All @@ -74,7 +75,10 @@ tornado==6.0.2 # via bokeh, distributed
unicodecsv==0.14.1 # via -r requirements.in
untangle==1.1.1 # via -r requirements.in
urllib3==1.25.3 # via botocore, requests, selenium
vcrpy==4.0.2 # via -r requirements.in
wrapt==1.12.1 # via vcrpy
xarray==0.12.3 # via -r requirements.in, datashader
yarl==1.4.2 # via vcrpy
zict==0.1.4 # via distributed

# The following packages are considered to be unsafe in a requirements file:
Expand Down
3 changes: 3 additions & 0 deletions workers/data_refinery_workers/processors/test_smasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from django.core.management import call_command
from django.test import TransactionTestCase, tag

import vcr

from data_refinery_common.models import (
ComputationalResult,
ComputationalResultAnnotation,
Expand Down Expand Up @@ -1090,6 +1092,7 @@ def test_sanity_imports(self):
import sympy # noqa

@tag("smasher")
@vcr.use_cassette("/home/user/data_store/cassettes/smasher.get_synced_files.yaml")
def test_get_synced_files(self):
""" """
result = ComputationalResult()
Expand Down
10 changes: 4 additions & 6 deletions workers/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,10 @@ if [ -z "$tag" ] || [ "$tag" = "smasher" ] || [ "$tag" = "compendia" ]; then
wget -q -O "$quant_test_data_1" \
"$test_data_repo/$quant_name"
fi
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
AWS_ACCESS_KEY_ID="$(~/bin/aws configure get default.aws_access_key_id)"
export AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY="$(~/bin/aws configure get default.aws_secret_access_key)"
export AWS_SECRET_ACCESS_KEY
fi
# Mock out the AWS keys since we use VCR to mock out the request with these
# as the AWS credentials
export AWS_ACCESS_KEY_ID=XXX
export AWS_SECRET_ACCESS_KEY=XXX
fi

if [ -z "$tag" ] || [ "$tag" = "qn" ]; then
Expand Down
Loading

0 comments on commit 53025eb

Please sign in to comment.