update dev environment

This commit is contained in:
Julian Pawlowski 2025-11-03 17:00:08 +00:00
parent 263d9822d1
commit c6eed9329b
3 changed files with 18 additions and 6 deletions

View file

@ -10,14 +10,19 @@ echo "==> Updating system packages..."
sudo apt-get update
sudo apt-get upgrade -y
rm -rf .venv/
echo "==> Checking for uv..."
if ! command -v uv >/dev/null 2>&1; then
echo "UV not found, installing..."
pipx install uv
fi
echo "==> Setting up Python environment..."
uv venv && . .venv/bin/activate
echo "==> Installing dependencies..."
python3 -m pip install --requirement requirements.txt
uv pip install --requirement requirements.txt
echo "==> Installing pre-commit hooks..."
pre-commit install

View file

@ -1,13 +1,19 @@
#!/usr/bin/env bash
#!/bin/sh
# script/develop: Start Home Assistant in development mode
set -e
cd "$(dirname "$0")/.."
if [ -z "$VIRTUAL_ENV" ]; then
. .venv/bin/activate
fi
# Create config dir if not present
if [[ ! -d "${PWD}/config" ]]; then
mkdir -p "${PWD}/config"
hass --config "${PWD}/config" --script ensure_config
if [ ! -d "${PWD}/config" ]; then
mkdir -p "${PWD}/config"
hass --config "${PWD}/config" --script ensure_config
fi
# Set the path to custom_components

View file

@ -1,10 +1,11 @@
#!/usr/bin/env bash
# script/setup: Setup script used by DevContainers to prepare the project
set -e
cd "$(dirname "$0")/.."
#python3 -m pip install --requirement requirements.txt
scripts/bootstrap
echo "==> Project is now ready to go!"