File tree Expand file tree Collapse file tree 6 files changed +89
-40
lines changed
Expand file tree Collapse file tree 6 files changed +89
-40
lines changed Original file line number Diff line number Diff line change 3838 },
3939 "remoteUser" : " vscode" ,
4040 "features" : {
41+ "ghcr.io/va-h/devcontainers-features/uv:1" : {},
4142 "ghcr.io/devcontainers-extra/features/apt-packages:1" : {
4243 "packages" : [
4344 " ffmpeg" ,
Original file line number Diff line number Diff line change @@ -3,18 +3,21 @@ name = "panda_status"
33version = " 1.2.0"
44requires-python = " >=3.13.2"
55dependencies = [
6- " colorlog>=6.9.0" ,
7- " hassil>=3.2.0" ,
6+ " colorlog" ,
7+ " ffmpeg" ,
8+ " ha-ffmpeg" ,
9+ " hassil" ,
810 " home-assistant-intents==2025.9.3" ,
911 " homeassistant==2025.8.1" ,
10- " mutagen>=1.47.0 " ,
11- " numpy>=2.3.2 " ,
12+ " mutagen" ,
13+ " numpy" ,
1214 " pip>=25.2" ,
15+ " pip>=25.2" ,
16+ " pymicro-vad" ,
17+ " pyspeex-noise" ,
18+ " PyTurboJPEG" ,
1319 " ruff>=0.12.12" ,
14- " websockets>=15.0.1" ,
15- ]
16-
17- [dependency-groups ]
18- dev = [
19- " ruff>=0.12.12"
20+ " ruff>=0.12.12" ,
21+ " websockets" ,
22+ " websockets" ,
2023]
Original file line number Diff line number Diff line change 44
55cd " $( dirname " $0 " ) /.."
66
7+ echo " 🐼 [develop] Starting Home Assistant development environment in $( pwd) "
8+
79# Create config dir if not present
810if [[ ! -d " ${PWD} /config" ]]; then
11+ echo " 📁 [develop] Creating config directory..."
912 mkdir -p " ${PWD} /config"
10- hass --config " ${PWD} /config" --script ensure_config
13+ echo " ⚙️ [develop] Ensuring Home Assistant config..."
14+ uv run hass --config " ${PWD} /config" --script ensure_config
15+ echo " ✅ [develop] Config directory ready."
1116fi
1217
1318# Set the path to custom_components
14- # # This let's us have the structure we want <root>/custom_components/panda_status
15- # # while at the same time have Home Assistant configuration inside <root>/config
16- # # without resulting to symlinks.
19+ echo " 🔧 [develop] Setting PYTHONPATH for custom_components..."
1720export PYTHONPATH=" ${PYTHONPATH} :${PWD} /custom_components"
1821
1922# Start Home Assistant
20- hass --config " ${PWD} /config" --debug
23+ echo " 🚀 [develop] Starting Home Assistant with debug mode..."
24+ uv run hass --config " ${PWD} /config" --debug
Original file line number Diff line number Diff line change 44
55cd " $( dirname " $0 " ) /.."
66
7- ruff format .
8- ruff check . --fix
7+ echo " 🐼 [lint] Starting linting in $( pwd) "
8+
9+ # Run ruff format and check
10+ echo " 🧹 [lint] Running ruff format..."
11+ uv run ruff format .
12+ echo " ✅ [lint] Formatting complete."
13+
14+ echo " 🔎 [lint] Running ruff check with --fix..."
15+ uv run ruff check . --fix
16+ echo " ✅ [lint] Linting complete."
17+
18+ echo " 🎉 [lint] Linting finished."
Original file line number Diff line number Diff line change 44
55cd " $( dirname " $0 " ) /.."
66
7- uv venv && uv pip install -r pyproject.toml
7+ echo " 🐼 [setup] Starting setup in $( pwd) "
8+
9+ # Download UV if not present
10+ if ! command -v uv > /dev/null 2>&1 ; then
11+ echo " 🔍 [setup] 'uv' not found. Installing UV..."
12+ curl -LsSf https://astral.sh/uv/install.sh | sh
13+ echo " ✅ [setup] UV installed."
14+ else
15+ echo " ✅ [setup] 'uv' is already installed."
16+ fi
17+
18+ # Create venv if not present
19+ if [[ ! -d " ${PWD} /.venv" ]]; then
20+ echo " 🔧 [setup] Creating Python virtual environment (.venv)..."
21+ uv venv
22+ echo " ✅ [setup] Virtual environment created."
23+ else
24+ echo " ✅ [setup] Virtual environment already exists."
25+ fi
26+
27+ # Install dependencies
28+ echo " 📦 [setup] Installing dependencies with uv..."
29+ uv sync --dev --frozen --link-mode=copy
30+ echo " ✅ [setup] Dependencies installed."
31+
32+ echo " 🎉 [setup] Setup complete."
You can’t perform that action at this time.
0 commit comments