Skip to content

Commit

Permalink
ingest: Add CI build config
Browse files Browse the repository at this point in the history
The ingest workflow current runs in <1 minute so I figured it'd be nice
to add as an additional check in the GH Action CI workflow.
If the ingest workflow ever runs for too long, we should figure out a
way to subset the ingest data.

The CI build config includes a bogus key because Snakemake requires the
config file to have at least one top level key.

Previous CI run without the bogus key ran into an error¹
```
snakemake.exceptions.WorkflowError: Config file must be given as JSON or YAML with keys at top level.
```

¹ <https://github.com/nextstrain/zika/actions/runs/9948628997/job/27483549394#step:9:17>
  • Loading branch information
joverlee521 committed Jul 16, 2024
1 parent 9f8d539 commit 44f27a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ingest/build-configs/ci/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 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.

# 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
bogus_ci_config: "bogus_ci_config"

2 comments on commit 44f27a5

@tsibley
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

More precisely, Snakemake requires a YAML file with a top-level map/dict/object type. It may be empty; keys are not required.

We could avoid the bogus config key above by using flow syntax for a map ({}) instead, e.g.

# 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.
{}

The bogus config key also got propagated to measles, rabies, and oropouche, and seems likely to propagate further over time. It'd be nice to avoid, IMO.

@genehack
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Memorized as an issue in the pathogen-repo-guide repo

Please sign in to comment.