Skip to content

Commit

Permalink
Merge pull request #632 from heerden/master
Browse files Browse the repository at this point in the history
Full automation for Rt model 2 results
  • Loading branch information
Schalk van Heerden authored Aug 9, 2020
2 parents 6de0c8c + 18db1ef commit 0c9522d
Show file tree
Hide file tree
Showing 6 changed files with 645 additions and 565 deletions.
23 changes: 2 additions & 21 deletions .github/workflows/realtime_rt_action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
# Do not modify this action before discussing

# If you have an analysis notebook or script that can export data, chat to @heerden and @vukosim
# Every analysis has unique triggers so a new Github Action might be required

on:
#push
push:
branches:
- master
#tags:
# - dailyfinal
paths:
- data/covid19za_provincial_cumulative_timeline_confirmed.csv

Expand Down Expand Up @@ -45,22 +41,6 @@ jobs:
isReport: False
poll: True

- name: Calc Debug
run: |
cd data/calc
ls
# Note: some actions runs are skipped with this recipe, trying git-auto-commit-action
#- name: Commit csv Changes
# uses: EndBug/add-and-commit@v4
# with:
# author_name: "Schalk van Heerden"
# author_email: [email protected]
# message: "Rt action run"
# #'calculated_r0_sa_provincial_cumulative.csv'
# add: "data/calc/"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
# Required
Expand All @@ -78,4 +58,5 @@ jobs:
# Action will create and push a new tag to the remote repository and the defined branch
#tagging_message: 'v1.0.0'
# Optional options appended to `git-push`
#push_options: '--force'
#push_options: '--force'
commit_author: github-actions <[email protected]>
50 changes: 50 additions & 0 deletions .github/workflows/rtlive-model-za.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow was created by @heerden
# Do not modify this action before discussing

# If you have an analysis notebook or script that can export data, chat to @heerden and @vukosim

on:
push:
branches:
- master
paths:
- data/covid19za_provincial_cumulative_timeline_confirmed.csv

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v1

- name: Setup Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r notebooks/covid-model/requirements.txt
- name: Run Python Script
run: |
cd notebooks/covid-model
python rtlive-model-za.py
- uses: stefanzweifel/git-auto-commit-action@v4
with:
# Required
commit_message: Rt model 2 action run
# Optional branch to push to, defaults to the current branch
#branch: master
# Optional options appended to `git-commit`
#commit_options: '--no-verify --signoff'
# Optional glob pattern of files which should be added to the commit
file_pattern: data/calc/*.csv
# Optional local file path to the repository
#repository: .
# Optional commit user and author settings
# Optional tag message
# Action will create and push a new tag to the remote repository and the defined branch
#tagging_message: 'v1.0.0'
# Optional options appended to `git-push`
#push_options: '--force'
commit_author: github-actions <[email protected]>
Loading

0 comments on commit 0c9522d

Please sign in to comment.