-
Notifications
You must be signed in to change notification settings - Fork 74
38 lines (36 loc) · 1.31 KB
/
updatePVLibDB.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Update EMHASS PVLib databases
on:
push:
branches: [ master ]
schedule: # run once a month
- cron: '0 0 1 * *'
workflow_dispatch:
jobs:
pull-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: install requirements
run: python3 -m pip install --break-system-packages .[test]
- name: pull latest SAM CEC files
run: |
git clone https://github.com/NREL/SAM.git /tmp/SAM
cp /tmp/SAM/deploy/libraries/CEC\ Inverters.csv ./src/emhass/data/CEC\ Inverters.csv
cp /tmp/SAM/deploy/libraries/CEC\ Modules.csv ./src/emhass/data/CEC\ Modules.csv
- name: build database via python script
run: python3 ./scripts/save_pvlib_module_inverter_database.py
- name: push database changes
run: |
rm -r /tmp/SAM
rm ./src/emhass/data/CEC\ Inverters.csv
rm ./src/emhass/data/CEC\ Modules.csv
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add ./src/emhass/data/cec_inverters.pbz2
git add ./src/emhass/data/cec_modules.pbz2
git commit -m "Bump inverter/module database"
git push