Skip to content

Commit

Permalink
Updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
fboundy committed Dec 22, 2024
1 parent 5e6f6bf commit 344101a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/black-check.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: Auto-format with Black
name: Auto-format with Black and isort

on:
push:
branches:
- main # Specify branches to run on (e.g., `main`)
- main
- patch
- dev

- dev # Add additional branches here as needed
pull_request:
branches:
- main # Automatically format PRs targeting `main`
- main
- patch
- dev
- dev # Ensure formatting is applied for PRs targeting these branches

jobs:
autoformat:
name: Auto-format Code with Black
name: Auto-format Code with Black and isort
runs-on: ubuntu-latest

steps:
Expand All @@ -27,10 +26,13 @@ jobs:
with:
python-version: '3.x'

- name: Install Black
- name: Install Black and isort
run: |
python -m pip install --upgrade pip
pip install black
pip install black isort
- name: Run isort
run: isort .

- name: Run Black Formatter
run: black --line-length 119 .
Expand All @@ -41,7 +43,7 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Automatically formatted code with Black (line-length=119)"
git commit -m "Automatically formatted code with Black and isort"
git push
else
echo "No changes to commit."
10 changes: 9 additions & 1 deletion apps/pv_opt/solis.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,15 @@

REGISTERS = {
True: {
"timed_charge_soc": 43708, "timed_charge_current": 43709, "timed_charge_start_hours": 43711, "timed_charge_start_minutes": 43712, "timed_charge_end_hours": 43713, "timed_charge_end_minutes": 43714, "timed_discharge_soc": 43750, "timed_discharge_current": 43151, "timed_discharge_start_hours": 43153,
"timed_charge_soc": 43708,
"timed_charge_current": 43709,
"timed_charge_start_hours": 43711,
"timed_charge_start_minutes": 43712,
"timed_charge_end_hours": 43713,
"timed_charge_end_minutes": 43714,
"timed_discharge_soc": 43750,
"timed_discharge_current": 43151,
"timed_discharge_start_hours": 43153,
"timed_discharge_start_minutes": 43154,
"timed_discharge_end_hours": 43155,
"timed_discharge_end_minutes": 43156,
Expand Down

0 comments on commit 344101a

Please sign in to comment.