Skip to content

Commit

Permalink
CI: fix mamba version and some test file paths (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
misialq authored Oct 3, 2024
1 parent b56f64b commit a6e3a4d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.9
mamba-version: "*"
mamba-version: 1.5.10
channels: conda-forge,defaults
channel-priority: true
activate-environment: conda-env
Expand Down
8 changes: 3 additions & 5 deletions q2_moshpit/kraken2/tests/test_bracken.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_run_bracken_one_sample(self, p1):
)

kraken2_report_fp = self.get_data_path(
'kraken2-report/sample1/sample1.report.txt'
'kraken2-reports-select/samples/sample1.report.txt'
)
bracken_report_dir = self.get_data_path('bracken-report')
obs_table = _run_bracken_one_sample(
Expand Down Expand Up @@ -113,15 +113,13 @@ def test_run_bracken_one_sample(self, p1):
side_effect=CalledProcessError(returncode=123, cmd='bracken')
)
def test_run_bracken_one_sample_error(self, p1):
kraken2_report_fp = self.get_data_path(
'kraken2-report/sample1/sample1.report.txt'
)
kraken2_report_fp = tempfile.NamedTemporaryFile()
bracken_report_dir = self.get_data_path('bracken-report')

with self.assertRaisesRegex(Exception, 'return code 123'):
_run_bracken_one_sample(
bracken_db=self.bracken_db_dir,
kraken2_report_fp=kraken2_report_fp,
kraken2_report_fp=kraken2_report_fp.name,
bracken_report_dir=bracken_report_dir,
tmp_dir=self.temp_dir,
threshold=self.kwargs['threshold'],
Expand Down
8 changes: 6 additions & 2 deletions q2_moshpit/kraken2/tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ def test_fetch_libraries_exception(self, p1):

@patch('q2_moshpit.kraken2.database.run_command')
def test_add_seqs_to_library(self, p1):
seqs = DNAFASTAFormat(self.get_data_path('mags/samp1/bin1.fa'), 'r')
seqs = DNAFASTAFormat(self.get_data_path(
'mags/sample1/3b72d1a7-ddb0-4dc7-ac36-080ceda04aaa.fasta'), 'r'
)

_add_seqs_to_library(self.kraken2_db_dir, seqs=seqs, no_masking=True)

Expand All @@ -218,7 +220,9 @@ def test_add_seqs_to_library(self, p1):
side_effect=CalledProcessError(123, 'cmd')
)
def test_add_seqs_to_library_exception(self, p1):
seqs = DNAFASTAFormat(self.get_data_path('mags/samp1/bin1.fa'), 'r')
seqs = DNAFASTAFormat(self.get_data_path(
'mags/sample1/3b72d1a7-ddb0-4dc7-ac36-080ceda04aaa.fasta'), 'r'
)

with self.assertRaisesRegex(
Exception,
Expand Down

0 comments on commit a6e3a4d

Please sign in to comment.