This command-line module has been developed for the automated and reproducible calculation of CO2 emissions (GreenOps) and resource costs (FinOps). The tool is built with a strong focus on auditability, traceability and compliance, suitable for high-security and regulated enterprise/government environments.
To ensure the integrity of the host system, the Immutable Infrastructure principle is used
- Host OS: Fedora Silverblue (Container-first, read-only root).
- Runtime: Insulation via Toolbx containers.
- Dependencies: Strict separation via Python Virtual Environments (
venv). - Validation: 100% Test-Driven Development (TDD) via
pytest.
Follow these steps for an isolated execution:
- Activate the environment:
source venv/bin/activate - Run the unit tests:
pytest test_greenops.py-v
Incident: TDD-001 (Syntax & Parsing Error in Test Phase)
Symptom: Test module could not be initialized (collected 0 items).
Root Cause: Manual interaction with a graphical text editor () led to corrupt filenames and unauthorized Bash syntax ( << EOF`) within the Python runtime.
Resolution & Prevention: Human interaction minimized. Implementation of direct CLI-based file injection (Infrastructure as Code principles) to prevent future syntax corruption.