Skip to content

Commit

Permalink
run one test
Browse files Browse the repository at this point in the history
  • Loading branch information
raphenya committed Sep 8, 2023
1 parent 5dedd83 commit a68459c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
sudo apt-get -qq update
sudo apt-get -qq install -y prodigal
sudo apt-get -qq install -y prodigal tree
sudo apt-get -qq install -y libtbb-dev
sudo apt-get -qq install -y cmake g++ make
Expand Down
12 changes: 9 additions & 3 deletions app/auto_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ def main(args):
# get latest card database
data=os.path.join(directory,"data")
card_data=os.path.join(directory,"card_data")
os.system("wget -O {data} --no-check-certificate https://card.mcmaster.ca/download/0/broadstreet-v{card_cannonical_version}.tar.bz2".format(
verbose = ""
if debug != "":
verbose = "--quiet"

os.system("wget {verbose} -O {data} --no-check-certificate https://card.mcmaster.ca/download/0/broadstreet-v{card_cannonical_version}.tar.bz2".format(
verbose=verbose,
data=data,
card_cannonical_version=card_cannonical_version
)
Expand All @@ -42,14 +47,15 @@ def main(args):
logger.info("=================================== DOWNLOAD CARD VARIANTS DATA ===================================")
variants=os.path.join(directory,"variants")
card_variants=os.path.join(directory,"card_variants")
os.system("wget -O {variants} --no-check-certificate https://card.mcmaster.ca/download/6/prevalence-v{card_variants_version}.tar.bz2".format(
os.system("wget {verbose} -O {variants} --no-check-certificate https://card.mcmaster.ca/download/6/prevalence-v{card_variants_version}.tar.bz2".format(
verbose=verbose,
variants=variants,
card_variants_version=card_variants_version
)
)
os.system("mkdir -p {card_variants}".format(card_variants=card_variants))
os.system("tar xf {variants} -C {card_variants}".format(variants=variants,card_variants=card_variants))
os.system("gunzip {card_variants}/*.gz".format(card_variants=card_variants))
os.system("gunzip {verbose} {card_variants}/*.gz".format(verbose=verbose,card_variants=card_variants))

logger.info("=================================== CARD CANONICAL ANNOTATIONS ===================================")
os.system("rgi card_annotation --input {card_data}/card.json".format(card_data=card_data))
Expand Down
13 changes: 9 additions & 4 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,15 @@ rgi auto_load --clean

echo "=================================== RUN TESTS ==================================="
# run unit tests
echo "$cmd cd tests"
cd tests
echo "$cmd pytest --capture=fd -v -rxs"
pytest --capture=fd -v -rxs
# echo "$cmd cd tests"
pushd tests
# cd tests
echo `pwd`
tree -L 2
# echo "$cmd pytest --capture=fd -v -rxs"
pytest test_1.py -v -rxs --color=auto --durations=0 -k "protein"
# pytest --capture=fd -v -rxs
popd

echo "=================================== DONE ==================================="

Expand Down

0 comments on commit a68459c

Please sign in to comment.