Skip to content

Send notifications for new/resolved outages #5

Send notifications for new/resolved outages

Send notifications for new/resolved outages #5

Workflow file for this run

name: Scrape latest outage data
on:
push:
workflow_dispatch:
schedule:
- cron: '*/5 * * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v4
with:
path: current-repo
- name: Checkout the pse repository
uses: actions/checkout@v4
with:
repository: davemattson/pse-outage
path: pse-outage
- name: Checkout the scl repository
uses: actions/checkout@v4
with:
repository: davemattson/scl-outage
path: scl-outage
- name: Checkout the snopud repository
uses: actions/checkout@v4
with:
repository: davemattson/snopud-outage
path: snopud-outage
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # Use the latest Python 3 version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pykml
pip install pandas
pip install pytz
pip install requests
- name: Run pse notifier
run: |
echo "Running PSE notifier"
python outage-data-analysis/expand.py -r pse-outage -i -o output_files -l 2 pse-outage\pse-events.json
python outage-data-analysis/create_outages_dataframe.py -l -d pse-outage/output_files -u pse -o output_files/pse_outages_dataframe.csv
python outage-data-analysis/analyze_current_outages.py -f output_files/pse_outages_dataframe.csv -l .5 -c 1 -e .1 -u pse --telegram-token "<token>" --telegram-chat-id "-1003012377346" --telegram-thread-id "2" --geocode-api-key "689c04ea91cf4154626975qcz13eb93"