use uv, fix devcontainer, and drop support for HA ≤2023.6 (#1151)

* Update .devcontainer

* Drop support for ≤2023.6

* Add .vscode/settings.json

* Use async_process_ha_core_config

* Fix for HA ≤2023.10

* pop normalized_name

* Add comments

* use . instead of source

* set pytest args

* set country

* use py3.13 for dev branch of core

* set country in test_adaptive_lighting_time_zones_with_default_settings

* Add comment
This commit is contained in:
Bas Nijholt 2025-01-01 16:11:22 -08:00 committed by GitHub
commit f8719994a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 72 additions and 46 deletions

View file

@ -2,7 +2,11 @@
set -ex
cd "$(dirname "$0")/.."
pip install -r core/requirements.txt
pip install uv
uv venv
source .venv/bin/activate
uv pip install -r core/requirements.txt
if grep -q 'codecov' core/requirements_test.txt; then
# Older HA versions still have `codecov` in `requirements_test.txt`
@ -14,8 +18,8 @@ if grep -q 'mypy-dev==1.10.0a3' core/requirements_test.txt; then
# mypy-dev==1.10.0a3 seems to not be available anymore, HA 2024.4 and 2024.5 are affected
sed -i 's/mypy-dev==1.10.0a3/mypy-dev==1.10.0b1/' core/requirements_test.txt
fi
pip install -r core/requirements_test.txt
uv pip install -r core/requirements_test.txt
pip install -e core/
pip install ulid-transform # this is in Adaptive-lighting's manifest.json
pip install $(python test_dependencies.py)
uv pip install -e core/
uv pip install ulid-transform # this is in Adaptive-lighting's manifest.json
uv pip install $(python test_dependencies.py)

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -e
set -ex
cd "$(dirname "$0")/.."
# Clone only if the folder doesn't exist
@ -8,10 +8,10 @@ if [[ ! -d "core" ]]; then
fi
pip install \
colorlog==6.7.0 \
pip>=21.0,<23.2 \
ruff==0.0.265
colorlog \
pip \
ruff
./scripts/setup-dependencies
./scripts/setup-symlinks
pre-commit install-hooks
uv run pre-commit install-hooks