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

Bsweger/hotfix cladetime #12

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/get-covid-clade-counts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
schedule:
- cron: "37 04 * * 1" # 4:37 AM UTC every Mon
workflow_dispatch:
inputs:
Copy link
Contributor Author

@bsweger bsweger Dec 2, 2024

Choose a reason for hiding this comment

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

Allowing someone to pass in YYYY-MM-DD when running this workflow manually makes it easier to recover in the event of an error.

In this case, I think we can pass in the dates of the failed runs:

as_of:
description: "Get clade counts as of 11:59 UTC on this date (YYYY-MM-DD)"
required: true
default: $(date +'%Y-%m-%d')

env:
# Hubverse AWS account number
Expand All @@ -19,6 +24,17 @@ jobs:
runs-on: ubuntu-latest

steps:

- name: Get --as-of date 🕰️
run: |
if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then
AS_OF=${{ inputs.as_of }}
else
AS_OF=$(date +'%Y-%m-%d')
fi
echo "as_of date is set to $AS_OF"
echo "AS_OF=$AS_OF" >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@v4

Expand All @@ -37,7 +53,7 @@ jobs:

- name: Get covid clade counts
run: |
uv run get_covid_clade_counts.py --as-of=$(date +'%Y-%m-%d')
uv run get_covid_clade_counts.py --as-of="$AS_OF"

- name: Install rclone
run: |
Expand Down
2 changes: 1 addition & 1 deletion get_covid_clade_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# requires-python = "==3.12"
# dependencies = [
# "click",
# "cladetime@git+https://github.com/reichlab/cladetime"
# "cladetime@git+https://github.com/reichlab/cladetime@elr/use_metadata_url"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

# ]
# ///

Expand Down