thegreenwebfoundation / admin-portal

The member portal and platform powering The Green Web Foundation
Apache License 2.0
24 stars 11 forks source link

Put the carbon-txt-preview route behind a flag #624

Closed mrchrisadams closed 1 week ago

mrchrisadams commented 1 week ago

This pull request introduces the use of feature flags to control access to the CarbonTxt preview functionality. It adds the WaffleFlagMixin to the CarbonTxtCheckView class and includes tests to ensure the feature flag works as expected.

Feature flag implementation:

Testing enhancements:

Minor cleanup:

github-actions[bot] commented 1 week ago
Old Energy Estimation Eco-CI Output: |Label|🖥 avg. CPU utilization [%]|🔋 Total Energy [Joules]|🔌 avg. Power [Watts]|Duration [Seconds]| |---|---|---|---|---| |Total Run (incl. overhead)|14.8396|697.994|3.07|227| |checkout|7.44|3.54273|1.77|2| |pip install uv wheel|7.54|3.54348|3.54|1| |pip install requirements|64.332|31.4507|5.24|6| |pytest|13.5638|659.457|3.07|215| 🌳 CO2 Data: City: San Jose, Lat: 37.1835, Lon: -121.7714 IP: 52.157.3.100 CO₂ from energy is: 0.231036014 g CO₂ from manufacturing (embodied carbon) is: 0.064766234 g Carbon Intensity for this location: 331 gCO₂eq/kWh SCI: 0.295802 gCO₂eq / pipeline run emitted
github-actions[bot] commented 1 week ago
Old Energy Estimation Eco-CI Output: |Label|🖥 avg. CPU utilization [%]|🔋 Total Energy [Joules]|🔌 avg. Power [Watts]|Duration [Seconds]| |---|---|---|---|---| |Total Run (incl. overhead)|14.0944|757.796|3.04|249| |checkout|6.59|3.5169|3.52|1| |pip install uv wheel|20.015|7.88134|3.94|2| |pip install requirements|64.462|31.8832|5.31|6| |pytest|12.9197|714.514|3.01|237| 🌳 CO2 Data: City: Chicago, Lat: 41.8874, Lon: -87.6318 IP: 172.183.122.97 CO₂ from energy is: 0.261439620 g CO₂ from manufacturing (embodied carbon) is: 0.071043138 g Carbon Intensity for this location: 345 gCO₂eq/kWh SCI: 0.332483 gCO₂eq / pipeline run emitted
github-actions[bot] commented 1 week ago
Old Energy Estimation Eco-CI Output: |Label|🖥 avg. CPU utilization [%]|🔋 Total Energy [Joules]|🔌 avg. Power [Watts]|Duration [Seconds]| |---|---|---|---|---| |Total Run (incl. overhead)|15.9558|712.799|3.17|225| |checkout|12.37|3.71462|1.86|2| |pip install uv wheel|23.7333|12.1664|4.06|3| |pip install requirements|66.442|32.1486|5.36|6| |pytest|14.5074|664.77|3.15|211| 🌳 CO2 Data: City: Boydton, Lat: 36.6676, Lon: -78.3875 IP: 20.55.214.246 CO₂ from energy is: 0.248766851 g CO₂ from manufacturing (embodied carbon) is: 0.064195607 g Carbon Intensity for this location: 349 gCO₂eq/kWh SCI: 0.312962 gCO₂eq / pipeline run emitted
github-actions[bot] commented 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