source venv/bin/activate
python3 -m energy_dependency_inspector --debug# Install dependencies
pip install -r requirements.txt
# Run specific detectors for testing
python3 -m energy_dependency_inspector docker <container_name>
python3 -m energy_dependency_inspector host --skip-os-packages --skip-hash-collection
# Execute linting and formatting
pre-commit run --files $(git diff --name-only --diff-filter=ACMR HEAD)Python with venv, pip, and pytest (Unix-only)
Write self-documenting code:
- Use descriptive variable and function names
- Structure code to reveal intent
- Add comments only when code doesn't speak for itself (explain WHY, not WHAT)
Keep it simple:
- Choose the simplest solution that works
- Avoid abstractions until duplication becomes painful
- Minimize external dependencies
Be explicit:
- Use type annotations
- Validate inputs early
- Surface clear error messages
# Debug specific detector issues
python3 -m energy_dependency_inspector --debug
# Test individual detectors (modify main temporarily)
python3 -c "from energy_dependency_inspector.detectors.dpkg_detector import DpkgDetector; print(DpkgDetector().get_name())"- Follow PEP8
- Activate venv first:
source venv/bin/activateat the beginning of a new session - Lint after each task - always ensure good code quality
- Commit frequently
- Add tests for new functionality
- If you do measurements, persist the used scripts / commands - measurements should be repeatable
energy_dependency_inspector/detectors/- Package manager detection implementationsenergy_dependency_inspector/executors/- Environment execution adaptersenergy_dependency_inspector/core/- Base interfaces and orchestratortests/- Test suites organized by component (detectors, executors, integration, specialized)docs/guides/- User guides (quick start, troubleshooting)docs/usage/- Detailed usage documentation (CLI, API, output format)docs/technical/- Technical documentation including:docs/technical/architecture/adr/- Architecture decision recordsdocs/technical/detectors/- Individual detector documentationdocs/technical/architecture/- System architecture documentationdocs/technical/adding-new-detectors.md- Guide for implementing new package manager detectors
- README.md - Overview with links to detailed docs
- SPECIFICATION.md - Requirements and constraints