JetBrains-Research / JetBrains-Research/Python-Solution-Preference

[005] Energy Auditing Field App (MVP)

未关闭
#5 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
没有语言数据
星标
2
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

## Overview

Application for energy auditors to conduct field inspections and verify New York 2020 ECCCNYS compliance through blower door and duct leakage testing.

Build this as a Python backend service with no UI; expose the functionality below through an HTTP API.

- Single inspector role (no admin/team features)
- Reference data from `assets/mvp-seed-data.json`
- Timezone: UTC (use UTC for everything, notwithstanding NY)

---

## User Account

Standard registration (name, email, password) and login. Successful registration auto-logs in the user. User can log out to end session.

---

## Job Management

**Create Job** — Required fields:
- Address (street, city, state, ZIP)
- Builder name
- Scheduled date
- House volume (cubic feet)
- Conditioned floor area (square feet)

Optional: Number of stories, Surface area.

New jobs start with status "Pending."

**Job List** — Returns all jobs for the logged-in user in reverse chronological order (most recent first). Each entry shows address, builder, scheduled date, and status.

**Job States**:
- **Pending**: No inspection data saved
- **In Progress**: Some inspection data saved (checklist or test)
- **Completed**: All three required sections complete (checklist + blower door + duct leakage)

---

## Inspection Workflow

**Job Details** returns job info and four sections: Checklist, Blower Door Test, Duct Leakage Test, and Photos.

### Checklist

10 items loaded from seed data. Each item has status: Not Started (default) / Passed / Failed / N/A.

**Summary**: "X/Y Passed (Z%)" where Y = applicable items (not N/A).
- Pass rate = (Passed / Applicable) × 100, rounded to nearest whole number (0.5 rounds up)
- If all items are N/A, pass rate = 0%

**Complete when**: All 10 items have status other than "Not Started."

### Blower Door Test

Calculates ACH50 (air changes per hour at 50 Pa) for compliance verification.

**Data Entry**:
- Ring configuration (Open, Ring A–D) for all points
- Multi-point pressure data (5–7 points): house pressures 50, 45, 40, 35, 30, 25, 20 Pa with corresponding fan pressures

**Calculations** (on calculate):
- CFM = C × (fanPressure)^n — using `blowerDoorCalibration` constants from seed data
- Log-log regression on (house pressure, CFM) yields: CFM50, n-factor, R²
- ACH50 = (CFM50 × 60) / house_volume

**Results**: CFM50, ACH50, n-factor, R², and compliance result.

**Compliance**: Pass if ACH50 ≤ 3.0

**R² Warning**: If R² < 0.98, return a warning that correlation is low. Warning does NOT block completion.

**Complete when**: ≥5 valid points entered and calculation performed.

### Duct Leakage Test

User selects: TDL only, DLO only, or Both.

**TDL (Total Duct Leakage)**:
- Enter: ring configuration, fan pressure
- CFM25 = C × (fanPressure)^0.5 — using `ductBlasterCalibration` from seed data
- CFM25/100 sq ft = (CFM25 × 100) / conditioned_area
- Compliance: Pass if ≤ 4.0 CFM25/100 sq ft

**DLO (Duct Leakage to Outside)**:
- Enter: house pressure, ring configuration, fan pressure
- Same CFM25 calculation
- Compliance: Pass if ≤ 3.0 CFM25/100 sq ft
- **House pressure warning**: If outside -23 to -27 Pa range, return a warning. Warning does NOT block completion.

**Overall compliance**: Pass only if all selected tests pass.

**Complete when**: At least one test (TDL or DLO) calculated.

### Photos

- Upload images (JPEG, PNG, WebP only)
- Maximum 10 photos per job
- Photos can be retrieved and deleted
- **Photos are optional** — not required for job completion

---

## Job Completion

Job automatically transitions to "Completed" when:
1. Checklist: all 10 items have status ≠ "Not Started"
2. Blower Door: ≥5 points entered and calculated
3. Duct Leakage: at least one test (TDL or DLO) calculated

Warnings (low R², house pressure outside range) and failing compliance results do NOT prevent completion.

---
**Provided starting files:** see [`005-energy-audit/assets/`](https://github.com/JetBrains-Research/Python-Solution-Preference/tree/main/005-energy-audit/assets) — these were in the agent's working directory when it solved the task.

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start by inspecting the provided files in 005-energy-audit/assets/, especially assets/mvp-seed-data.json, then map the required HTTP API resources and workflow states from the issue. Done means the backend supports authentication, job and inspection workflows, calculations, photo handling, and automatic completion according to all listed validation and compliance rules.

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
backend-api-design
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。