Skip to content

Commit

Permalink
Merge pull request #47 from nextstrain/test-data
Browse files Browse the repository at this point in the history
feat(ci): Use cached ncbi dataset package to isolate tests
  • Loading branch information
joverlee521 authored Jul 19, 2024
2 parents cdab12d + b9386ad commit 168b91a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ingest/build-configs/ci/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# TODO: If the ingest workflow ever runs too long, we should figure out a way
# to subset the ingest data. Currently, the CI just runs the default ingest workflow.
custom_rules:
- "build-configs/ci/copy_example_data.smk"

# Snakemake requires at least one top level key in a config file, so including
# a bogus key here that should not be used anywhere in the Snakemake workflow
Expand Down
14 changes: 14 additions & 0 deletions ingest/build-configs/ci/copy_example_data.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
rule copy_example_data:
input:
ncbi_dataset="example_data/ncbi_dataset.zip"
output:
ncbi_dataset=temp("data/ncbi_dataset.zip")
shell:
"""
cp -f {input.ncbi_dataset} {output.ncbi_dataset}
"""

# Add a Snakemake ruleorder directive here if you need to resolve ambiguous rules
# that have the same output as the copy_example_data rule.

ruleorder: copy_example_data > fetch_ncbi_dataset_package
Binary file added ingest/example_data/ncbi_dataset.zip
Binary file not shown.
1 change: 0 additions & 1 deletion ingest/rules/fetch_from_ncbi.smk
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,3 @@ rule format_ncbi_datasets_ndjson:
--duplicate-reporting warn \
2> {log} > {output.ndjson}
"""

0 comments on commit 168b91a

Please sign in to comment.