mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
Major restructuring of the scripts/ directory with consistent output
formatting, improved organization, and stricter error handling.
Breaking Changes:
- Updated development environment to Home Assistant 2025.7+
- Removed Python 3.12 compatibility (HA 2025.7+ requires Python 3.13)
- Updated all HA core requirements from 2025.7 requirement files
- Added new dependencies: python-multipart, uv (for faster package management)
- Updated GitHub Actions workflows to use Python 3.13
Changes:
- Created centralized output library (scripts/.lib/output.sh)
- Unified color codes and Unicode symbols
- Consistent formatting functions (log_header, log_success, log_error, etc.)
- Support for embedded formatting codes (${BOLD}, ${GREEN}, etc.)
- Reorganized into logical subdirectories:
- scripts/setup/ - Setup and maintenance scripts
- bootstrap: Install/update dependencies (used in CI/CD)
- setup: Full DevContainer setup (pyright, copilot, HACS)
- reset: Reset config/ directory to fresh state (NEW)
- sync-hacs: Sync HACS integrations
- scripts/release/ - Release management scripts
- prepare: Version bump and tagging
- suggest-version: Semantic version suggestion
- generate-notes: Release notes generation
- check-if-released: Check release status
- hassfest: Local integration validation
- Updated all scripts with:
- set -euo pipefail for stricter error handling
- Consistent SCRIPT_DIR pattern for reliable sourcing
- Professional output with colors and emojis
- Unified styling across all 17 scripts
- Removed redundant scripts:
- scripts/update (was just wrapper around bootstrap)
- scripts/json_schemas/ (moved to schemas/json/)
- Enhanced clean script:
- Improved artifact cleanup
- Better handling of accidental package installations
- Hints for reset and deep clean options
- New reset script features:
- Standard mode: Keep configuration.yaml
- Full mode (--full): Reset configuration.yaml from git
- Automatic re-setup after reset
- Updated documentation:
- AGENTS.md: Updated script references and workflow guidance
- docs/development/: Updated all references to new script structure
Impact: Development environment now requires Python 3.13 and Home Assistant
2025.7+. Developers get consistent, professional script output with better
error handling and logical organization. Single source of truth for styling
makes future updates trivial.
127 lines
4.7 KiB
JSON
127 lines
4.7 KiB
JSON
{
|
|
"name": "jpawlowski/hass.tibber_prices",
|
|
"image": "mcr.microsoft.com/devcontainers/python:3.13",
|
|
"postCreateCommand": "scripts/setup/setup",
|
|
"postStartCommand": "scripts/motd",
|
|
"containerEnv": {
|
|
"PYTHONASYNCIODEBUG": "1"
|
|
},
|
|
"forwardPorts": [
|
|
8123
|
|
],
|
|
"portsAttributes": {
|
|
"8123": {
|
|
"label": "Home Assistant",
|
|
"onAutoForward": "notify"
|
|
}
|
|
},
|
|
"customizations": {
|
|
"vscode": {
|
|
"extensions": [
|
|
"charliermarsh.ruff",
|
|
"EditorConfig.EditorConfig",
|
|
"esbenp.prettier-vscode",
|
|
"github.copilot",
|
|
"github.vscode-pull-request-github",
|
|
"ms-python.python",
|
|
"ms-python.vscode-pylance",
|
|
"ms-vscode-remote.remote-containers",
|
|
"redhat.vscode-yaml",
|
|
"ryanluker.vscode-coverage-gutters"
|
|
],
|
|
"settings": {
|
|
"editor.tabSize": 4,
|
|
"editor.formatOnSave": true,
|
|
"editor.formatOnType": false,
|
|
"extensions.ignoreRecommendations": false,
|
|
"files.eol": "\n",
|
|
"files.trimTrailingWhitespace": true,
|
|
"python.analysis.typeCheckingMode": "basic",
|
|
"python.analysis.autoImportCompletions": true,
|
|
"python.analysis.diagnosticMode": "workspace",
|
|
"python.analysis.diagnosticSeverityOverrides": {
|
|
"reportUnusedImport": "none",
|
|
"reportUnusedVariable": "none",
|
|
"reportUnusedCoroutine": "none",
|
|
"reportMissingTypeStubs": "none"
|
|
},
|
|
"python.analysis.include": [
|
|
"custom_components/tibber_prices"
|
|
],
|
|
"python.analysis.exclude": [
|
|
"**/.venv/**",
|
|
"**/venv/**",
|
|
"**/__pycache__/**",
|
|
"**/.git/**",
|
|
"**/.github/**",
|
|
"**/docs/**",
|
|
"**/node_modules/**"
|
|
],
|
|
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
|
|
"python.analysis.extraPaths": [
|
|
"${workspaceFolder}/.venv/lib/python3.13/site-packages"
|
|
],
|
|
"python.terminal.activateEnvironment": true,
|
|
"python.terminal.activateEnvInCurrentTerminal": true,
|
|
"python.testing.pytestArgs": [
|
|
"--no-cov"
|
|
],
|
|
"[python]": {
|
|
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
"editor.formatOnSave": true,
|
|
"editor.codeActionsOnSave": {
|
|
"source.fixAll.ruff": "explicit",
|
|
"source.organizeImports.ruff": "explicit"
|
|
}
|
|
},
|
|
"[markdown]": {
|
|
"editor.wordWrap": "on"
|
|
},
|
|
"yaml.customTags": [
|
|
"!secret scalar",
|
|
"!include scalar",
|
|
"!include_dir_list scalar",
|
|
"!include_dir_merge_list scalar",
|
|
"!include_dir_named scalar",
|
|
"!include_dir_merge_named scalar",
|
|
"!input scalar"
|
|
],
|
|
"markdown.validate.enabled": false,
|
|
"markdown.validate.fileLinks.enabled": "ignore",
|
|
"markdown.validate.fragmentLinks.enabled": "ignore",
|
|
"json.schemas": [
|
|
{
|
|
"fileMatch": [
|
|
"homeassistant/components/*/manifest.json"
|
|
],
|
|
"url": "${containerWorkspaceFolder}/schemas/json/manifest_schema.json"
|
|
},
|
|
{
|
|
"fileMatch": [
|
|
"homeassistant/components/*/translations/*.json"
|
|
],
|
|
"url": "${containerWorkspaceFolder}/schemas/json/translation_schema.json"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"remoteUser": "vscode",
|
|
"features": {
|
|
"ghcr.io/devcontainers/features/github-cli:1": {},
|
|
"ghcr.io/devcontainers/features/node:1": {
|
|
"version": "22"
|
|
},
|
|
"ghcr.io/devcontainers/features/rust:1": {
|
|
"version": "latest",
|
|
"profile": "minimal"
|
|
},
|
|
"ghcr.io/devcontainers-extra/features/apt-packages:1": {
|
|
"packages": [
|
|
"ffmpeg",
|
|
"libturbojpeg0",
|
|
"libpcap-dev"
|
|
]
|
|
}
|
|
}
|
|
}
|