Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: fix mamba version and some test file paths #208

Merged
merged 4 commits into from
Oct 3, 2024
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
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
Loading