Welcome! This guide keeps contributions consistent, reviewable, and compliant with the MEWEnergy ELO2 capstone requirements.
- Clone and enter the repo (SSH/HTTPS as you prefer).
- Create a venv:
python -m venv .venv && source .venv/bin/activate. - Install deps:
pip install -r scripts/requirements.txt. - Copy
.env.exampleto.envand setNREL_API_KEY+SECRET_KEYfor local runs. - Run
python scripts/app.pyto sanity check the Flask prototype.
- Python 3.10+ with
black,ruff, andpytest(already inscripts/requirements.txt). - Flask prototype and helpers under
scripts/; tests live intests/. - Git + GitHub project board for task tracking; main is protected.
- Open PRs from feature branches (
feature/<topic>,bugfix/<topic>,docs/<topic>). Keep them small. - Rebase on
mainbefore opening a PR; avoid merge commits. - Use short, imperative commits (e.g.,
Add pvwatts client,Fix rate parser tests). - Tag each milestone from the approved
maincommit (M0βM5) per syllabus.
- Use the PR template
.github/pull_request_template.md. - Requirements for approval:
black .,ruff check ., andpytest -qall pass.- Docs updated when behavior, interfaces, data paths, or commands change.
- Secrets are kept out of git; data policy respected.
- At least one reviewer signs off; address or justify all comments.
- Style: 4-space indent, max line length 88; snake_case for functions/files, CamelCase for classes, UPPER_SNAKE for constants.
- Tests: run
pytest -qfrom repo root; add/adjust tests intests/with your changes. - Keep modules small and single-purpose; shared logic lives in
scripts/.
- Data home:
2_data_collection/data/.- Raw pulls in
raw/stay local (git-ignored) except small curated samples already present. - Processed CSV:
processed/solar_analysis_dataset.csv(8 sample locations). Regenerate via the M2 pipeline; commit only updated, compact versions needed for milestones.
- Raw pulls in
- Never commit API keys or secrets. Use
.env; update.env.examplewhen new vars are required. - Document regeneration steps in the relevant README when data changes.
- Keep milestone READMEs current: deliverables, artifacts/visuals, survey status, tags, and retrospectives.
- Update root
README.mdwhen structure, commands, or artifact locations change. - If schemas or pipeline steps change, update
2_data_collection/data/README.mdand note downstream impacts in3_data_analysis/README.md.
- Run:
black .,ruff check ., andpytest -qbefore pushing. - Include or update tests with code changes; prefer fast, deterministic checks.
- Call out known limitations or uncertainties in docs and PR notes.