-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify renaming logic for nextflu-private deploy
Simplifies the logic to rename Auspice JSONs for nextflu-private builds to match what we were already doing manually and collects the "rename" and "deploy" rules into a single Snakemake file.
- Loading branch information
Showing
4 changed files
with
22 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
""" | ||
This part of the workflow handles automatic deployments of nextflu-private builds. | ||
Depends on the `all_private` rule from rename.smk | ||
""" | ||
|
||
rule all_private: | ||
input: | ||
jsons=_get_build_outputs(), | ||
output: | ||
json_dir=directory("auspice_renamed"), | ||
params: | ||
build_date=datetime.date.today().strftime("%Y-%m-%d"), | ||
shell: | ||
""" | ||
for file in {input.jsons} | ||
do | ||
ln ${{file}} {output.json_dir}/"flu_seasonal_{params.build_date}_`basename ${{file}}`" | ||
done | ||
""" | ||
|
||
rule deploy_all: | ||
input: rules.all_private.input | ||
input: | ||
json_dir=directory("auspice_renamed"), | ||
params: | ||
deploy_url = config["deploy_url"] | ||
shell: | ||
""" | ||
nextstrain login --no-prompt; | ||
nextstrain remote upload {params.deploy_url} {input} | ||
nextstrain remote upload {params.deploy_url} {input.json_dir}/*.json | ||
""" |
This file was deleted.
Oops, something went wrong.