diff --git a/ingest/build-configs/nextstrain-automation/config.yaml b/ingest/build-configs/nextstrain-automation/config.yaml index c62b067..4490f64 100644 --- a/ingest/build-configs/nextstrain-automation/config.yaml +++ b/ingest/build-configs/nextstrain-automation/config.yaml @@ -18,8 +18,3 @@ files_to_upload: metadata.tsv.zst: results/metadata.tsv sequences.fasta.zst: results/sequences.fasta -# Toggle for Slack notifications -send_slack_notifications: True - -# Toggle for triggering builds -trigger_rebuild: True diff --git a/ingest/rules/slack_notifications.smk b/ingest/rules/slack_notifications.smk deleted file mode 100644 index 2b7ec61..0000000 --- a/ingest/rules/slack_notifications.smk +++ /dev/null @@ -1,55 +0,0 @@ -""" -This part of the workflow handles various Slack notifications. -Designed to be used internally by the Nextstrain team with hard-coded paths -to files on AWS S3. - -All rules here require two environment variables: - * SLACK_TOKEN - * SLACK_CHANNELS -""" -import os -import sys - -slack_envvars_defined = "SLACK_CHANNELS" in os.environ and "SLACK_TOKEN" in os.environ -if not slack_envvars_defined: - print( - "ERROR: Slack notifications require two environment variables: 'SLACK_CHANNELS' and 'SLACK_TOKEN'.", - file=sys.stderr, - ) - sys.exit(1) - -S3_SRC = "s3://nextstrain-data/files/workflows/zika" - - -rule notify_on_genbank_record_change: - input: - genbank_ndjson="data/genbank.ndjson", - output: - touch("data/notify/genbank-record-change.done"), - params: - s3_src=S3_SRC, - shell: - """ - ./vendored/notify-on-record-change {input.genbank_ndjson} {params.s3_src:q}/genbank.ndjson.xz Genbank - """ - - -rule notify_on_metadata_diff: - input: - metadata="results/metadata.tsv", - output: - touch("data/notify/metadata-diff.done"), - params: - s3_src=S3_SRC, - shell: - """ - ./vendored/notify-on-diff {input.metadata} {params.s3_src:q}/metadata.tsv.gz - """ - - -onstart: - shell("./vendored/notify-on-job-start Ingest nextstrain/zika") - - -onerror: - shell("./vendored/notify-on-job-fail Ingest nextstrain/zika") diff --git a/ingest/rules/trigger_rebuild.smk b/ingest/rules/trigger_rebuild.smk deleted file mode 100644 index 0cf6731..0000000 --- a/ingest/rules/trigger_rebuild.smk +++ /dev/null @@ -1,22 +0,0 @@ -""" -This part of the workflow handles triggering new zika builds after the -latest metadata TSV and sequence FASTA files have been uploaded to S3. - -Designed to be used internally by the Nextstrain team with hard-coded paths -to expected upload flag files. -""" - - -rule trigger_build: - """ - Triggering zika builds via repository action type `rebuild`. - """ - input: - metadata_upload="data/upload/s3/metadata.tsv.gz.done", - fasta_upload="data/upload/s3/sequences.fasta.xz.done", - output: - touch("data/trigger/rebuild.done"), - shell: - """ - ./vendored/trigger-on-new-data nextstrain/zika rebuild {input.metadata_upload} {input.fasta_upload} - """