Several registered actions in q2-annotate currently exercise only mocked external dependency paths. These actions should get integration tests that actually invoke the relevant external CLI, network/API path, or plugin action path where feasible.
Parent issue: rachis-org/roadmap#73
When a registered pipeline wraps a lower-level registered action that reaches the same external dependency, add the integration test for the pipeline and do not add a duplicate integration test for the lower-level action.
Slow Integration Test Marks
If an integration test is too slow or resource-heavy for the normal pull request test suite, mark it so it can run on a less frequent schedule:
weekly: integration tests that should run only on weekly builds.
release: integration tests that should run only before a release.
Actions Needing External Integration Tests
| Plugin |
Registered action function |
External dependency or plugin call |
| q2-annotate |
q2_annotate.kraken2.bracken.estimate_bracken |
bracken CLI. |
| q2-annotate |
q2_annotate.eggnog.build_custom_diamond_db |
diamond makedb CLI. |
| q2-annotate |
q2_annotate.eggnog.build_eggnog_diamond_db |
create_dbs.py external script. |
| q2-annotate |
q2_annotate.eggnog.search_orthologs_hmmer |
Plugin actions; reaches emapper.py through _eggnog_hmmer_search. |
| q2-annotate |
q2_annotate.prodigal.predict_genes_prodigal |
prodigal CLI. |
| q2-annotate |
q2_annotate.kaiju.classify_kaiju |
Plugin actions for partitioning and feature_table merge/merge_taxa; reaches Kaiju through _classify_kaiju. |
| q2-annotate |
q2_annotate.filtering.construct_human_pangenome_index |
wget, gunzip, gfatools, seqtk; plugin actions rescript.get_ncbi_genomes and quality_control.bowtie2_build. |
| q2-annotate |
q2_annotate.filtering.filter_reads_human_pangenome |
Plugin actions quality_control.filter_reads and optionally annotate.construct_human_pangenome_index. |
Fetch Actions
These actions should get two levels of integration coverage for the download/database path:
| Plugin |
Registered action function |
How current tests work |
| q2-annotate |
q2_annotate.kraken2.build_kraken_db |
Mocked. Tests patch requests.get, tar extraction, _fetch_prebuilt_dbs, _build_dbs_from_seqs, and Kraken/Bracken helper functions; they verify command/request construction and mocked response handling. |
| q2-annotate |
q2_annotate.eggnog.fetch_eggnog_db |
Completely mocked. Tests patch subprocess.run for wget, gunzip, and tar, plus file removal. |
| q2-annotate |
q2_annotate.eggnog.fetch_diamond_db |
Completely mocked. Tests patch subprocess.run for wget and gunzip. |
| q2-annotate |
q2_annotate.eggnog.fetch_eggnog_proteins |
Completely mocked. Tests patch subprocess.run for both wget calls. |
| q2-annotate |
q2_annotate.eggnog.fetch_ncbi_taxonomy |
Completely mocked. Tests patch subprocess.run, MD5 collection/checking, and file removal. |
| q2-annotate |
q2_annotate.eggnog.fetch_eggnog_hmmer_db |
Mocked. The top-level action test patches validation and download/build helpers; helper tests patch urllib.request.urlopen with fake HTML and patch subprocess.run for wget, tar, and hmmpress. |
| q2-annotate |
q2_annotate.kaiju.fetch_kaiju_db |
Mocked. Tests patch requests.get with static HTML and patch _fetch_and_extract_db; download/extract helper tests also patch requests.get, tar extraction, progress bar, and file removal. |
Several registered actions in
q2-annotatecurrently exercise only mocked external dependency paths. These actions should get integration tests that actually invoke the relevant external CLI, network/API path, or plugin action path where feasible.Parent issue: rachis-org/roadmap#73
When a registered pipeline wraps a lower-level registered action that reaches the same external dependency, add the integration test for the pipeline and do not add a duplicate integration test for the lower-level action.
Slow Integration Test Marks
If an integration test is too slow or resource-heavy for the normal pull request test suite, mark it so it can run on a less frequent schedule:
weekly: integration tests that should run only on weekly builds.release: integration tests that should run only before a release.Actions Needing External Integration Tests
q2_annotate.kraken2.bracken.estimate_brackenq2_annotate.eggnog.build_custom_diamond_dbq2_annotate.eggnog.build_eggnog_diamond_dbq2_annotate.eggnog.search_orthologs_hmmerq2_annotate.prodigal.predict_genes_prodigalq2_annotate.kaiju.classify_kaijuq2_annotate.filtering.construct_human_pangenome_indexq2_annotate.filtering.filter_reads_human_pangenomeq2_annotate.kraken2.bracken.estimate_brackenbrackenCLI.q2_annotate.eggnog.build_custom_diamond_dbdiamond makedbCLI.q2_annotate.eggnog.build_eggnog_diamond_dbcreate_dbs.pyexternal script.q2_annotate.eggnog.search_orthologs_hmmeremapper.pythrough_eggnog_hmmer_search.q2_annotate.prodigal.predict_genes_prodigalprodigalCLI.q2_annotate.kaiju.classify_kaijufeature_tablemerge/merge_taxa; reaches Kaiju through_classify_kaiju.q2_annotate.filtering.construct_human_pangenome_indexwget,gunzip,gfatools,seqtk; plugin actionsrescript.get_ncbi_genomesandquality_control.bowtie2_build.q2_annotate.filtering.filter_reads_human_pangenomequality_control.filter_readsand optionallyannotate.construct_human_pangenome_index.Fetch Actions
These actions should get two levels of integration coverage for the download/database path:
weekly: a lightweight URL or remote availability check that verifies the configured download location is reachable.release: a full database download test that verifies the action can fetch and prepare the database before release.q2_annotate.kraken2.build_kraken_dbq2_annotate.eggnog.fetch_eggnog_dbq2_annotate.eggnog.fetch_diamond_dbq2_annotate.eggnog.fetch_eggnog_proteinsq2_annotate.eggnog.fetch_ncbi_taxonomyq2_annotate.eggnog.fetch_eggnog_hmmer_dbq2_annotate.kaiju.fetch_kaiju_dbq2_annotate.kraken2.build_kraken_dbrequests.get, tar extraction,_fetch_prebuilt_dbs,_build_dbs_from_seqs, and Kraken/Bracken helper functions; they verify command/request construction and mocked response handling.q2_annotate.eggnog.fetch_eggnog_dbsubprocess.runforwget,gunzip, andtar, plus file removal.q2_annotate.eggnog.fetch_diamond_dbsubprocess.runforwgetandgunzip.q2_annotate.eggnog.fetch_eggnog_proteinssubprocess.runfor bothwgetcalls.q2_annotate.eggnog.fetch_ncbi_taxonomysubprocess.run, MD5 collection/checking, and file removal.q2_annotate.eggnog.fetch_eggnog_hmmer_dburllib.request.urlopenwith fake HTML and patchsubprocess.runforwget,tar, andhmmpress.q2_annotate.kaiju.fetch_kaiju_dbrequests.getwith static HTML and patch_fetch_and_extract_db; download/extract helper tests also patchrequests.get, tar extraction, progress bar, and file removal.