Skip to content

Commit 8e82886

Browse files
authored
Merge pull request #168 from plugwise/precommit
Repair/rework local CI
2 parents 5067aab + afe30e3 commit 8e82886

File tree

9 files changed

+159
-108
lines changed

9 files changed

+159
-108
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Test with HA-core
4+
name: Test against HA-core (master/released)
55

66
env:
7-
CACHE_VERSION: 8
7+
CACHE_VERSION: 10
88
DEFAULT_PYTHON: "3.12"
99

1010
on:
@@ -18,7 +18,7 @@ jobs:
1818
# Prepare default python version environment
1919
ha-core-prepare:
2020
runs-on: ubuntu-latest
21-
name: Setup for HA-core
21+
name: Setup for HA-core (release)
2222
steps:
2323
- name: Check out committed code
2424
uses: actions/checkout@v4.1.7
@@ -44,18 +44,9 @@ jobs:
4444
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-hacore
4545
${{ env.CACHE_VERSION}}-${{ runner.os }}
4646
${{ env.CACHE_VERSION}}
47-
- name: Create HA-core Python virtual environment
47+
- name: Test through HA-core (master/release)
4848
run: |
49-
scripts/core-testing.sh core_prep
50-
- name: Prepare HA-core Python virtual environment
51-
run: |
52-
scripts/core-testing.sh pip_prep
53-
- name: Test
54-
run: |
55-
scripts/core-testing.sh testing
56-
- name: Quality
57-
run: |
58-
scripts/core-testing.sh quality
49+
GITHUB_ACTIONS="" BRANCH="master" scripts/core-testing.sh
5950
6051
shellcheck:
6152
name: Shellcheck

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ venv
66
*.swp
77
*.rej
88
*.orig
9+
manual_clone_ha

.pre-commit-config.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
args:
2929
- --branch=main
3030
- repo: https://github.com/asottile/pyupgrade
31-
rev: v3.16.0
31+
rev: v3.17.0
3232
hooks:
3333
- id: pyupgrade
3434
name: "Checking pyupgrade"
@@ -58,11 +58,12 @@ repos:
5858
hooks:
5959
- id: yamllint
6060
name: "Linting yaml"
61-
- repo: https://github.com/pre-commit/mirrors-prettier
62-
rev: v3.1.0
61+
- repo: https://github.com/biomejs/pre-commit
62+
rev: v0.4.0
6363
hooks:
64-
- id: prettier
65-
name: "Verifying/updating code with prettier"
64+
- id: biome-lint
65+
additional_dependencies: ["@biomejs/biome@1.8.3"]
66+
name: "Verifying/updating code with biome (improved prettier)"
6667
- repo: https://github.com/cdce8p/python-typing-update
6768
rev: v0.6.0
6869
hooks:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Versions from 0.4x
44

5+
### Ongoing
6+
7+
- Fix `pre-commit` `prettier` (replace with `biome`)
8+
- Fix python`3.12` compatibility, use of `uv` and improved ha-core handling from `plugwise-beta`
9+
- TODO: running hasfest with `--requirements` takes forever (apparently checking all), skipped it for now
10+
511
### 0.40.6
612

713
- Update backend-library to v0.31.3: fix midnight rollover, by @dirixmjm

pyproject.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
[project]
2+
name = "plugwise_usb-beta"
3+
version = "0.40.7"
4+
description = "Plugwise USB custom_component (BETA)"
5+
readme = "README.md"
6+
requires-python = ">=3.12"
7+
license = {file = "LICENSE"}
8+
keywords = ["Plugwise", "Switch", "Circle", "Plus"]
9+
authors = [
10+
{ name = "Plugwise device owners"}
11+
]
12+
maintainers = [
13+
{ name = "arnoutd_77" },
14+
{ name = "bouwew"},
15+
{ name = "brefra"},
16+
{ name = "CoMPaTech" },
17+
{ name = "dirixmjm" }
18+
]
19+
classifiers = [
20+
"Development Status :: 4 - Beta",
21+
"Programming Language :: Python"
22+
]
23+
dependencies = ["homeassistant", "plugwise-usb"]
24+
125
[project.urls]
226
"Source Code" = "https://github.com/plugwise/plugwise_usb-beta"
327
"Bug Reports" = "https://github.com/plugwise/plugwise_usb-beta/issues"

0 commit comments

Comments
 (0)