Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libssl-dev

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .

- name: Install test dependencies
run: |
pip install pytest

- name: Run tests with pytest
run: |
pytest test/
continue-on-error: ${{ matrix.python-version == '3.14' }}

- name: Test installation
run: |
hivtrace --help
hivtrace_strip_drams --help
hivtrace_viz --help
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def setup_package():
'web/static/fonts/*'
]
},
python_requires='>=3.10',
install_requires=[
'biopython >= 1.58',
'bioext >= 0.21.8',
Expand All @@ -58,7 +59,7 @@ def setup_package():
]
},
tests_require=[
'nose'
'pytest'
]

)
Expand Down
13 changes: 11 additions & 2 deletions test/test_hivtrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@
import logging
import tempfile
import shutil
import pytest

logging.basicConfig(level=logging.DEBUG)

# Check if tn93 is available in PATH
TN93_AVAILABLE = shutil.which('tn93') is not None
skip_if_no_tn93 = pytest.mark.skipif(not TN93_AVAILABLE, reason="tn93 not available")


class TestHIVTrace(unittest.TestCase):
def setUp(self):
Expand Down Expand Up @@ -200,7 +205,7 @@ def test_attribute_adaptation(self):

return

#
@skip_if_no_tn93
def test_strip_drams(self):

# run the whole thing and make sure it completed via the status file
Expand All @@ -221,7 +226,7 @@ def test_strip_drams(self):

return

# TODO: Expand test
@skip_if_no_tn93
def test_env(self):

id = os.path.basename(self.env_fn)
Expand All @@ -234,6 +239,7 @@ def test_env(self):

self.assertTrue(True)

@skip_if_no_tn93
def test_custom_reference(self):

input_fn = self.fn
Expand All @@ -257,6 +263,7 @@ def test_custom_reference(self):
for node in results["trace_results"]["Nodes"]
]

@skip_if_no_tn93
def test_empty_contaminants(self):

input_fn = self.fn
Expand All @@ -276,6 +283,7 @@ def test_empty_contaminants(self):
handle_contaminants='remove',
filter_edges='remove')

@skip_if_no_tn93
def test_premade_alignment(self):

compare_to_lanl = True
Expand Down Expand Up @@ -328,6 +336,7 @@ def test_premade_alignment(self):

self.assertTrue('trace_results' in results.keys())

@skip_if_no_tn93
def test_contaminant_screening_separately(self):

this_dirname = os.path.join(
Expand Down
Loading