Skip to content

Commit

Permalink
feat: ugprade (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
acesyde authored Dec 9, 2023
1 parent 879cd7f commit c219558
Show file tree
Hide file tree
Showing 8 changed files with 661 additions and 560 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: [ "3.10", "3.11" ]
python_version: [ "3.11" ]
steps:
- name: 📥 Checkout the repository
uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: 3.6.0
rev: v3.13.0
hooks:
- id: commitizen
- id: commitizen-branch
stages: [ push ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.284
rev: v0.1.7
hooks:
- id: ruff
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: no-commit-to-branch
args:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/mylight_systems/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
NAME = "MyLight Systems"
DOMAIN = "mylight_systems"
PLATFORMS = [Platform.SENSOR]
VERSION = "0.0.5"
VERSION = "0.0.6"
COORDINATOR = "coordinator"
ATTRIBUTION = "Data provided by https://www.mylight-systems.com/"
SCAN_INTERVAL_IN_MINUTES = 15
Expand Down
2 changes: 1 addition & 1 deletion custom_components/mylight_systems/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"documentation": "https://github.com/acesyde/hassio_mylight_integration",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/acesyde/hassio_mylight_integration/issues",
"version": "0.0.2"
"version": "0.0.6"
}
1 change: 0 additions & 1 deletion custom_components/mylight_systems/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ class MyLightSensorEntityDescription(
state_class=SensorStateClass.TOTAL_INCREASING,
device_class=SensorDeviceClass.ENERGY,
value_fn=lambda data: _calculate_grid_returned_energy(data)

),
)

Expand Down
1,187 changes: 640 additions & 547 deletions poetry.lock

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ license = "MIT"
keywords = ["homeassistant", "hassio", "mylight", "solar", "power", "energy"]
readme = "README.md"
repository = "https://github.com/acesyde/hassio_mylight_integration"
packages = [{ include = "custom_components/mylight_systems" }]

[tool.poetry.dependencies]
python = "^3.10"
python = "~3.11"
colorlog = "^6.7.0"
aiohttp = "^3.8.5"
homeassistant = "^2023.1.0"
async-timeout = "^4.0.3"

[tool.poetry.group.dev.dependencies]
asynctest = "^0.13.0"
Expand All @@ -21,22 +23,29 @@ pytest-asyncio = "^0.21.1"
pytest-cov = "^4.1.0"
pytest-socket = "^0.6.0"
aioresponses = "^0.7.6"
ruff = "^0.0.291"
pre-commit = "^3.3.3"
ruff = "^0.1.7"
pre-commit = "^3.5.0"
vulture = "^2.10"

[virtualenvs]
create = true
in-project = true

[tool.ruff]
line-length = 120
target-version = "py310"
target-version = "py311"
exclude = [
".venv"
]

[tool.pytest.ini_options]
addopts = "-rxf -x -v -l --cov=./ --cov-report=xml"
pythonpath = ["custom_components/mylight_systems"]
testpaths = [
"tests"
]

[tool.vulture]
min_confidence = 80
paths = ["custom_components", "tests"]
verbose = true
2 changes: 1 addition & 1 deletion taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
env:
PYTEST: true
cmds:
- poetry run pytest -rxf -x -v -l --cov=./ --cov-report=xml
- poetry run pytest

coverage:
deps:
Expand Down

0 comments on commit c219558

Please sign in to comment.