generated from hubverse-org/hubTemplate
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Generate a list of sequence collections by date and location #92
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bdb14ec
Add a script that counts sequences reported by location and date
bsweger d6e283e
Use sequence metadata as of the round closing time rather than currne…
bsweger f30302e
Add a check to the computed location/state counts
bsweger c06d8a9
Add some logging, as a treat
bsweger 8a787e9
Change virus-clade-utils back to main branch
bsweger 79940c2
Enable streaming mode on the Polars collect() operation
bsweger 090406e
Add GitHub action to run after round close
bsweger 85b5515
GitHub workflow cleanup
bsweger c9a571f
Eliminate date pivot from the output .csv
bsweger e757dcc
rename folder for summarized location/date counts
bsweger 0e6f05f
Add location of unscored location/date file to README
bsweger fe16e00
Update for changes in the virus-clade-utils repo
bsweger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
.github/workflows/create-location-date-sequence-counts.yaml
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Create a file of sequence counts by location and collection date | ||
|
||
on: | ||
schedule: | ||
# Not precise, but GithHub actions don't support time zones | ||
- cron: "0 02 * 11-12,1-3 3" # 2 AM UTC every Wed (Nov-Dec, Jan-Mar) | ||
- cron: "0 01 * 4-10 3" # 1 AM UTC every Wed (Apr-Oct) | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
create-clade-modeling-round: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
with: | ||
# don't check out repo folders with large amounts of data | ||
# (e.g., model-output, target-data) | ||
sparse-checkout: | | ||
auxiliary-data/ | ||
hub-config/ | ||
src/ | ||
|
||
- name: Install uv 🐍 | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
version: "0.4.9" | ||
enable-cache: true | ||
|
||
- name: Create file of sequence counts by location and date 🦠 | ||
run: | | ||
uv run get_location_date_counts.py | ||
working-directory: src | ||
|
||
- name: Get current date and time 🕰️ | ||
run: | | ||
PR_DATETIME=$(date +'%Y-%m-%d_%H-%M-%S') | ||
echo "PR_DATETIME=$PR_DATETIME" >> $GITHUB_ENV | ||
|
||
- name: Create PR for sequence counts 🚀 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git checkout -b new_location_date_sequence_counts_"$PR_DATETIME" | ||
git add auxiliary-data/unscored-location-dates/ | ||
git commit -m "Add sequence counts by location & date $PR_DATETIME" | ||
git push -u origin new_location_date_sequence_counts_"$PR_DATETIME" | ||
gh pr create \ | ||
--base main \ | ||
--title "Add new sequence counts by location and date $PR_DATETIME" \ | ||
--body "Created via GitHub Actions: generate count of sequences collected by date/location for the past 31 days." |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timezones 🙀
Rounds close at 8 PM US Eastern, and GitHub actions are UTC, so tried to come as close as possible when accounting to daylight savings time (not exact, obviously)