Closed mrchrisadams closed 1 week ago
Eco-CI Output: | Label | 🖥 avg. CPU utilization [%] | 🔋 Total Energy [Joules] | 🔌 avg. Power [Watts] | Duration [Seconds] |
---|---|---|---|---|---|
Total Run (incl. overhead) | 15.9014 | 698.158 | 3.14 | 222 | |
checkout | 14.64 | 7.58254 | 3.79 | 2 | |
pip install uv wheel | 14.62 | 3.79157 | 1.90 | 2 | |
pip install requirements | 63.0567 | 36.8203 | 5.26 | 7 | |
pytest | 14.2199 | 649.964 | 3.12 | 208 |
🌳 CO2 Data: City: Phoenix, Lat: 33.4475, Lon: -112.0866 IP: 20.172.5.210 CO₂ from energy is: 0.237373720 g CO₂ from manufacturing (embodied carbon) is: 0.063339665 g Carbon Intensity for this location: 340 gCO₂eq/kWh SCI: 0.300713 gCO₂eq / pipeline run emitted
This pull request introduces the use of feature flags to control access to the CarbonTxt preview functionality. It adds the
WaffleFlagMixin
to theCarbonTxtCheckView
class and includes tests to ensure the feature flag works as expected.Feature flag implementation:
apps/accounts/admin_site.py
: AddedWaffleFlagMixin
toCarbonTxtCheckView
and setwaffle_flag
to "carbon-txt-preview". [1] [2]Testing enhancements:
apps/greencheck/tests/views/test_api_carbon_txt.py
: Addedoverride_flag
import and a new test methodtest_carbon_txt_preview_behind_flag
to verify the behavior of the CarbonTxt preview behind the feature flag. [1] [2]Minor cleanup:
apps/accounts/admin_site.py
: Removed unnecessary whitespace inget_app_list
method.