ecu-tests/docs/DEVELOPER_COMMIT_GUIDE.md
Hosam-Eldin Mostafa 032866bba0 refactor(config): convert config.py to package + detailed loader docs
- Replace ecu_framework/config.py with ecu_framework/config/ package
  (loader.py + __init__.py re-exports). Public surface unchanged — every
  call site already uses 'from ecu_framework.config import ...' which
  works identically for a module and a package. Brings config into the
  same shape as lin/, power/, flashing/.
- Enrich loader.py with module-level design notes (pipeline diagram,
  precedence rationale, "known wart" callout) and inline "why" comments:
  the EcuTestConfig forward-reference quirk, the int(k, 0) hex-key trick,
  _deep_update's mutate-in-place semantics, and the reason the in-memory
  overrides are applied last despite being precedence #1.
- Add docs/23_config_loader_internals.md covering the merge semantics,
  type-coercion philosophy, dataclass ordering quirks, PSU side-channel,
  and the test-surface checklist (four places to touch when adding a
  new config field).
- Fix the now-stale ecu_framework/config.py path in 01_run_sequence.md
  and DEVELOPER_COMMIT_GUIDE.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 19:42:35 +02:00

72 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Developer Commit Guide
This guide explains exactly what to commit to source control for this repository, and what to keep out. It also includes a suggested commit message and safe commands to stage changes.
## Commit these files
### Core framework (source)
- `ecu_framework/config/` (`__init__.py`, `loader.py`)
- `ecu_framework/lin/base.py`
- `ecu_framework/lin/mock.py`
- `ecu_framework/lin/babylin.py` (deprecated, retained for backward compatibility)
- `ecu_framework/flashing/hex_flasher.py`
### Pytest plugin and config
- `conftest_plugin.py`
Generates HTML columns, requirements coverage JSON, and CI summary
- `pytest.ini`
- `requirements.txt`
### Tests and fixtures
- `tests/conftest.py`
- `tests/test_smoke_mock.py`
- `tests/test_babylin_hardware_smoke.py` (if present; deprecated BabyLIN path)
- `tests/test_hardware_placeholder.py` (if present)
### Documentation
- `README.md`
- `TESTING_FRAMEWORK_GUIDE.md`
- `docs/README.md`
- `docs/01_run_sequence.md`
- `docs/02_configuration_resolution.md`
- `docs/03_reporting_and_metadata.md`
- `docs/04_lin_interface_call_flow.md`
- `docs/05_architecture_overview.md`
- `docs/06_requirement_traceability.md`
- `docs/07_flash_sequence.md`
- `docs/08_babylin_internals.md` (deprecated)
### Vendor guidance (no binaries)
- `vendor/README.md`
- Any headers in `vendor/` (if added per SDK)
### Housekeeping
- `.gitignore`
Ignores reports and vendor binaries
- `reports/.gitkeep`
Retains folder structure without committing artifacts
## Do NOT commit (ignored or should be excluded)
- Virtual environments: `.venv/`, `venv/`, etc.
- Generated test artifacts:
`reports/report.html`, `reports/junit.xml`, `reports/summary.md`, `reports/requirements_coverage.json`
<!-- - Vendor binaries: anything under `vendor/**` with `.dll`, `.lib`, `.pdb` keep them for now -->
- Python caches: `__pycache__/`, `.pytest_cache/`
- Local env files: `.env`
## Safe commit commands (PowerShell)
```powershell
# Stage everything except what .gitignore already excludes
git add -A
# Commit with a helpful message
git commit -m "ECU framework: docs, reporting plugin (HTML metadata + requirements JSON + CI summary), .gitignore updates"
```
## Notes
<!-- - Do not commit BabyLin DLLs or proprietary binaries. Keep only the placement/readme and headers. Keep them for now -->
- The plugin writes CI-friendly artifacts into `reports/`; theyre ignored by default but published in CI.