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

Use default config and partial overrides #173

Merged
merged 2 commits into from
Aug 22, 2023
Merged

Conversation

victorlin
Copy link
Member

Description of proposed changes

Refactoring the way Snakemake configuration is handled in this workflow to be more consistent with the ncov workflow.

Related issue(s)

Testing

  • Checks pass

Previously, either config_hmpxv1.yaml was used as the default as-is or
all required configuration were to be specified via Snakemake CLI
options. This resulted in much duplication of configuration across
different usages, and the default was never actually used in practice
except for in CI out of convenience of not specifying --configfile.

Switch to a two-tiered configuration setup with (1) a base "default"
tier of common values that can be applied to all workflow usages and (2)
a second tier of usage-specific config values which can also partially override

Since some required config entries (e.g. build_name) do not share common
values across the existing configs, this results in a workflow that is
only usable when additional configuration is defined. This will be
addressed by subsequent commits.
Copy values from the hmpxv1 configuration since that was the previous
default, but change the names to be boilerplate defaults.

Add required entries so that:

1. The default config file serves as a reference for all required keys.
2. The workflow can be run by CI without specifying an additional
   --configfile.
Copy link
Contributor

@joverlee521 joverlee521 left a comment

Choose a reason for hiding this comment

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

Thanks for making this change! Having a reasonable default config file is definitely a change I want to push across all Nextstrain pathogen repos!

config/defaults.yaml Show resolved Hide resolved
@victorlin victorlin merged commit fb81750 into master Aug 22, 2023
@victorlin victorlin deleted the victorlin/config-defaults branch August 22, 2023 23:55
@corneliusroemer
Copy link
Member

Hmm, I don't like having an extra default config file which makes it more difficult to trace where a particular config value comes from.

PR #171 reworks things a little anyways. I'll add a default profile which specifies a default config file so things can be run as snakemake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants