fix: updater path to rclone #13
Workflow file for this run
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
name: Runs the climate observations XL | |
on: | |
# debugging while working on this action | |
push: | |
branches: | |
- "feat-15-xl-ingestion" | |
# cron schedules are in UTC | |
# this job should run at 7.15 am pst, which translates to 2.15 pm. UTC which | |
# is the timezone that gha uses. | |
schedule: | |
- cron: '15 14 * * *' | |
workflow_dispatch: | |
repository_dispatch: | |
types: prep-xl | |
jobs: | |
prep-xl: | |
defaults: | |
run: | |
shell: bash | |
name: 'Download and Process Automated Snow Pillow Data' | |
runs-on: windows-latest | |
environment: PROD | |
env: | |
OBJ_STORE_BUCKET: ${{ secrets.OBJ_STORE_BUCKET }} | |
OBJ_STORE_SECRET: ${{ secrets.OBJ_STORE_SECRET }} | |
OBJ_STORE_USER: ${{ secrets.OBJ_STORE_USER }} | |
OBJ_STORE_HOST: ${{ vars.OBJ_STORE_HOST }} | |
ASP_ENV_DATA_DIR: ./data/asp_env | |
ASP_PREPD_DATA_DIR: ./data/asp_prepd | |
ASP_OSTORE_RAW_DATA_DIR: ASP/raw | |
ASP_OSTORE_PREPD_DATA_DIR: ASP/prepd | |
steps: | |
- uses: actions/checkout@v3 | |
id: checkout | |
with: | |
fetch-depth: 0 | |
- name: Install Rclone | |
id: install_rclone | |
run: choco install rclone | |
- name: pull ostore data | |
id: pull_ostore_data | |
shell: cmd | |
run: | | |
:: calculate the path for where the input ss will be located | |
mkdir data | |
set current_dir=%cd% | |
set MODEL_DIR=%current_dir%\data | |
:: setup the rclone config file | |
echo off | |
echo [nrsobjstore] > rclone.config | |
echo type = s3 >> rclone.config | |
echo provider = Minio >> rclone.config | |
echo env_auth = false >> rclone.config | |
echo access_key_id = %OBJ_STORE_USER% >> rclone.config | |
echo secret_access_key = %OBJ_STORE_SECRET% >> rclone.config | |
echo region = us-east-1 >> rclone.config | |
echo endpoint = https://nrs.objectstore.gov.bc.ca:443 >> rclone.config | |
echo on | |
:: get the current year for the folder name | |
set RCLONE_CONFIG=%current_dir%\rclone.config | |
set current_year=%Date:~0,4% | |
echo current year is %current_year% | |
:: pull the rclone data from ostore | |
rclone.exe copy ^ | |
nrsobjstore:rfcdata\\models\\data\\climate_obs ^ | |
%current_dir%\data ^ | |
# - name: Install Office | |
# run: choco install office365business --version=16731.20354 --params "'/exclude:Access Groove Lync OneDrive OneNote Outlook Publisher /updates:FALSE /eula:TRUE'" | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- id: install_dependencies | |
name: install python dependencies | |
shell: bash | |
run: | | |
pip install --upgrade pip | |
pip install -r scripts/python/requirements.txt | |
pip install -r scripts/python/requirements-win32-xl.txt | |
- id: run_asp_data_pipe | |
name: download and process asp data | |
shell: bash | |
env: | |
DATESTR: ${{ github.event.client_payload.idem_key }} | |
run: | | |
python scripts/python/main_win32_climateobs_prep.py |