diff --git a/.github/workflows/generate-static-model-viz.yaml b/.github/workflows/generate-static-model-viz.yaml deleted file mode 100644 index 5fbb868..0000000 --- a/.github/workflows/generate-static-model-viz.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: Static Model Viz - -on: - repository_dispatch: - types: - - static-model-viz - workflow_dispatch: - inputs: - trial_name: - description: 'Short name for a trial run. WARNING: without this we will overwrite files in s3://nextstrain-data/files/workflows/forecasts-ncov' - required: false - -jobs: - generate_and_upload_static_viz: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: nextstrain/.github/actions/setup-nextstrain-cli@master - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install viz dependencies - run: npm ci --prefix viz/ - - - name: Build viz app - run: npm run build --prefix viz/ - - - name: Generate static model figures - run: node viz/scripts/static-images.js --output-dir figures - - - name: Upload static model figures - run: | - S3_DST=s3://nextstrain-data/files/workflows/forecasts-ncov/gisaid - - if [[ "$TRIAL_NAME" ]]; then - S3_DST+=/trial/"$TRIAL_NAME" - fi - - nextstrain remote upload \ - "$S3_DST"/nextstrain_clades/global/ \ - figures/*.png - env: - AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TRIAL_NAME: ${{ github.event.inputs.trial_name }} - diff --git a/Snakefile b/Snakefile index 5e22a06..f61a15f 100644 --- a/Snakefile +++ b/Snakefile @@ -82,16 +82,6 @@ def _get_all_input(w): date=run_date )) - if config.get("trigger_static_model_viz", False): - # Currently we only support gisaid/nextstrain_clades/global model results - all_input.extend(expand( - "results/{data_provenance}/{variant_classification}/{geo_resolution}/{date}_trigger_static_model_viz.done", - data_provenance=[data_provenance for data_provenance in data_provenances if data_provenance == "gisaid"], - variant_classification=[variant_classification for variant_classification in variant_classifications if variant_classification == "nextstrain_clades"], - geo_resolution=[geo_resolution for geo_resolution in geo_resolutions if geo_resolution == "global"], - date=run_date - )) - return all_input @@ -107,4 +97,3 @@ if config.get("send_slack_notifications"): if config.get("upload"): include: "workflow/snakemake_rules/upload.smk" - include: "workflow/snakemake_rules/trigger.smk" diff --git a/config/optional.yaml b/config/optional.yaml index d1446bf..482733f 100644 --- a/config/optional.yaml +++ b/config/optional.yaml @@ -10,6 +10,3 @@ upload: # Send Slack notifications send_slack_notifications: True - -# Trigger static model viz workflow -trigger_static_model_viz: True diff --git a/workflow/snakemake_rules/trigger.smk b/workflow/snakemake_rules/trigger.smk deleted file mode 100644 index 5efd4b5..0000000 --- a/workflow/snakemake_rules/trigger.smk +++ /dev/null @@ -1,22 +0,0 @@ -""" -This part of the workflow triggers downstream GitHub Action workflows. - -Requires `models_to_run` variable to be defined upstream. -""" - -def _get_trigger_static_model_viz_input(wildcards): - return [ - f"results/gisaid/nextstrain_clades/global/{model}/{wildcards.date}_latest_results_s3_upload.done" - for model in models_to_run - ] - - -rule trigger_static_model_viz: - input: _get_trigger_static_model_viz_input - output: - touch("results/gisaid/nextstrain_clades/global/{date}_trigger_static_model_viz.done") - shell: - """ - ./bin/trigger forecasts-ncov static-model-viz - """ -