Add Powerwall to leaderboard + 3-way category filter

- Synthesised one hybrid entry (Tesla Powerwall 3, installed price €9500)
  appended to the catalog. Tagged installation: hybrid; LP runs with
  allows_export=True for those.
- Replaced single 'plug-in only' checkbox with three category filters:
  ≤0.8 kW plug-in, ≤2.5 kW plug-in, Hybrid/DC-coupled. Default: all on.
  Filter selection persists in localStorage.
- API now tags every row with a category so the JS can filter without
  re-fetching. SSR rows carry data-category for first-paint filtering.
- Store quote left blank for hybrids since thuisbatterijgids.net only
  models plug-in arithmetic.
This commit is contained in:
Michiel Berger 2026-04-30 15:30:55 +02:00
parent 1878b0a383
commit 386a758517
5 changed files with 127 additions and 47 deletions

View file

@ -4,18 +4,25 @@ ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1 \
PORT=8080
PYTHONPATH=/app/src
WORKDIR /app
COPY pyproject.toml uv.lock README.md ./
COPY src ./src
# Install dependencies only (not the package itself), so the source tree at
# /app stays the runtime layout the app expects: web.py uses
# Path(__file__).resolve().parents[2] / "data" / "raw" to find CSVs, which
# only resolves correctly when the package is imported from /app/src.
COPY pyproject.toml uv.lock ./
RUN pip install --no-cache-dir uv \
&& uv pip install --system --no-cache .
&& uv pip install --system --no-cache \
"pandas>=2.2" "scipy>=1.13" "numpy>=2.0" "flask>=3.0" "gunicorn>=21.0"
COPY src ./src
COPY data ./data
EXPOSE 8080
CMD ["sh", "-c", "gunicorn pluginbattery.web:app --bind 0.0.0.0:${PORT:-8080} --workers 1 --timeout 120"]
CMD ["gunicorn", "pluginbattery.web:app", \
"--bind", "0.0.0.0:8080", \
"--workers", "1", \
"--timeout", "120"]