-
Notifications
You must be signed in to change notification settings - Fork 8
Chores (mainly migrating to prek) #845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,9 +4,8 @@ | |||||||
| name: Latest commit | ||||||||
|
|
||||||||
| env: | ||||||||
| CACHE_VERSION: 2 | ||||||||
| CACHE_VERSION: 3 | ||||||||
| DEFAULT_PYTHON: "3.14" | ||||||||
| PRE_COMMIT_HOME: ~/.cache/pre-commit | ||||||||
| VENV: venv | ||||||||
CoMPaTech marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
| VENV: venv | |
| VENV: venv | |
| PREK_HOME: .prek |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| { "plugins": { "md013": { "enabled": false } } } | ||
CoMPaTech marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,6 +3,10 @@ | |||||
| ## Ongoing | ||||||
|
|
||||||
| - More code optimizations via PR[#843](https://github.com/plugwise/python-plugwise/pull/843) | ||||||
| - Chores: | ||||||
| - Introduce prek (for pre-commit) & align with v2 gh-actions | ||||||
| - Remove biome (as prettier was reinstated) | ||||||
| - Replace node-based markdownlint with pythonesk library | ||||||
|
||||||
| - Replace node-based markdownlint with pythonesk library | |
| - Replace node-based markdownlint with Python-based library |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,6 @@ | |
| coverage | ||
| ruff | ||
| mypy | ||
| pre-commit | ||
| prek | ||
| pylint | ||
| pylint_strict_informational==0.1 | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,4 +20,4 @@ fi | |||||
| uv pip install --upgrade -e . -r requirements_commit.txt -c https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/package_constraints.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test_pre_commit.txt | ||||||
|
|
||||||
| # Install pre-commit hook | ||||||
|
||||||
| # Install pre-commit hook | |
| # Install prek hook |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,6 @@ | |
| # 20250613 Copied from HA-core and shell-check adjusted and modified for local use | ||
| set -e | ||
|
|
||
| my_path=$(git rev-parse --show-toplevel) | ||
|
|
||
| if [ -z "$VIRTUAL_ENV" ]; then | ||
| if [ -x "$(command -v uv)" ]; then | ||
| uv venv venv | ||
|
|
@@ -23,20 +21,7 @@ mkdir -p ./tmp | |
| # Install test requirements | ||
| uv pip install --upgrade -e . -r requirements_test.txt -c https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/package_constraints.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test_pre_commit.txt | ||
|
|
||
| # Prepare biomejs | ||
| echo "Fetching/updating biome cli" | ||
| arch=$(uname -m) | ||
| case "$arch" in | ||
| aarch64|arm64) use_arch="darwin-arm64" ;; | ||
| x86_64) use_arch="linux-x64" ;; | ||
| *) echo "Unsupported arch for biome cli version: $arch"; exit 2 ;; | ||
| esac | ||
| curl -sL "https://github.com/biomejs/biome/releases/latest/download/biome-${use_arch}" -o "${my_path}/tmp/biome" | ||
|
|
||
| # Make biome executable (if necessary) | ||
| chmod +x "${my_path}/tmp/biome" | ||
|
|
||
| # Install pre-commit hook unless running from within pre-commit | ||
| # Install prek hook unless running from within pre-commit | ||
|
||
| if [ "$#" -eq 0 ]; then | ||
| pre-commit install | ||
| prek install --install-hooks | ||
| fi | ||
Uh oh!
There was an error while loading. Please reload this page.