Compare commits

...

1 commit

Author SHA1 Message Date
Mario Guggenberger
11bd4d214e
build: extract strings sync script for local use 2026-01-10 13:03:03 +00:00
7 changed files with 19 additions and 12 deletions

View file

@ -22,18 +22,8 @@ jobs:
with:
python-version: "3.13"
- name: Install markdown-code-runner and README code dependencies
run: |
uv pip install markdown-code-runner==2.1.0 pandas tabulate
- name: Run markdown-code-runner
run: uv run markdown-code-runner --verbose README.md
- name: Run update services.yaml
run: uv run python .github/update-services.py
- name: Run update strings.json
run: uv run python .github/update-strings.py
- name: Run sync script
run: ./scripts/sync-strings
- name: Commit updated README.md, strings.json, and services.yaml
id: commit

View file

@ -47,6 +47,7 @@ ignore = [
"webapp/homeassistant_util_color.py" = ["ALL"]
"webapp/app.py" = ["INP001", "DTZ011", "A002"]
"custom_components/adaptive_lighting/homeassistant_util_color.py" = ["ALL"]
"scripts/*.py" = ["INP001"]
[lint.flake8-pytest-style]
fixture-parentheses = false

6
.vscode/tasks.json vendored
View file

@ -12,6 +12,12 @@
"type": "shell",
"command": "scripts/lint",
"problemMatcher": []
},
{
"label": "Sync strings (README, services.yaml, strings.json, etc.)",
"type": "shell",
"command": "scripts/sync-strings",
"problemMatcher": []
}
]
}

View file

@ -19,3 +19,6 @@ uv pip install --upgrade mypy-dev
# Workaround for aiodns/pycares compatibility issue
# See: https://github.com/aio-libs/aiodns/issues/214
uv pip install --upgrade aiodns
# README code dependencies
uv pip install markdown-code-runner==2.1.0 pandas tabulate

7
scripts/sync-strings Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -ex
cd "$(dirname "$0")/.."
uv run markdown-code-runner --verbose README.md
uv run python ./scripts/update-services.py
uv run python ./scripts/update-strings.py