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 update
|
||||||
sudo apt-get upgrade -y
|
sudo apt-get upgrade -y
|
||||||
|
|
||||||
|
rm -rf .venv/
|
||||||
|
|
||||||
echo "==> Checking for uv..."
|
echo "==> Checking for uv..."
|
||||||
if ! command -v uv >/dev/null 2>&1; then
|
if ! command -v uv >/dev/null 2>&1; then
|
||||||
echo "UV not found, installing..."
|
echo "UV not found, installing..."
|
||||||
pipx install uv
|
pipx install uv
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "==> Setting up Python environment..."
|
||||||
|
uv venv && . .venv/bin/activate
|
||||||
|
|
||||||
echo "==> Installing dependencies..."
|
echo "==> Installing dependencies..."
|
||||||
python3 -m pip install --requirement requirements.txt
|
uv pip install --requirement requirements.txt
|
||||||
|
|
||||||
echo "==> Installing pre-commit hooks..."
|
echo "==> Installing pre-commit hooks..."
|
||||||
pre-commit install
|
pre-commit install
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,17 @@
|
||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
|
# script/develop: Start Home Assistant in development mode
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
if [ -z "$VIRTUAL_ENV" ]; then
|
||||||
|
. .venv/bin/activate
|
||||||
|
fi
|
||||||
|
|
||||||
# Create config dir if not present
|
# Create config dir if not present
|
||||||
if [[ ! -d "${PWD}/config" ]]; then
|
if [ ! -d "${PWD}/config" ]; then
|
||||||
mkdir -p "${PWD}/config"
|
mkdir -p "${PWD}/config"
|
||||||
hass --config "${PWD}/config" --script ensure_config
|
hass --config "${PWD}/config" --script ensure_config
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# script/setup: Setup script used by DevContainers to prepare the project
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
#python3 -m pip install --requirement requirements.txt
|
|
||||||
scripts/bootstrap
|
scripts/bootstrap
|
||||||
|
|
||||||
echo "==> Project is now ready to go!"
|
echo "==> Project is now ready to go!"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue