mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
update dev environment
This commit is contained in:
parent
263d9822d1
commit
c6eed9329b
3 changed files with 18 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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!"
|
||||
|
|
|
|||
Loading…
Reference in a new issue