Skip to content

Guard clause against too old python version #1153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 18, 2025
Merged

Conversation

ArneTR
Copy link
Member

@ArneTR ArneTR commented Apr 18, 2025

Greptile Summary

Added Python version compatibility checks to ensure Green Metrics Tool requires Python 3.10 or higher, with consistent version checking implemented in both shell and Python environments.

  • Added check_python_version() function in /lib/install_shared.sh to validate Python version during installation
  • Modified /lib/venv_checker.py to include version check and standardize error codes from -1 to 1
  • Consider consolidating duplicate version checks into a single shared location
  • Consider using TerminalColors for version error message in venv_checker.py for consistency
  • Consider adding version requirement to documentation and README.md

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@ArneTR ArneTR linked an issue Apr 18, 2025 that may be closed by this pull request
Copy link

Eco CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Measurement #1 27.9373 2907.09 4.15 700.46
--- --- --- --- ---
Total Run 27.94 2907.09 4.15 700.46
--- --- --- --- ---
Additional overhead from Eco CI N/A 8.62 4.05 2.13

🌳 CO2 Data:
City: Boydton, Lat: 36.6676, Lon: -78.3875
IP: 20.161.77.252
CO₂ from energy is: 1.075623300 g
CO₂ from manufacturing (embodied carbon) is: 0.199850910 g
Carbon Intensity for this location: 370 gCO₂eq/kWh
SCI: 1.275474 gCO₂eq / pipeline run emitted


Total cost of whole PR so far:

@ArneTR ArneTR merged commit 5b56219 into main Apr 18, 2025
@ArneTR ArneTR deleted the python-version-guard-clause branch April 18, 2025 06:27
ArneTR added a commit that referenced this pull request Apr 20, 2025
* main: (22 commits)
  .github workflows yml typos
  Added removal of sudoers.d to uninstall script
  Division by zero protection for StdDev in charts
  Charts now display absolute StdDev [skip ci] (#1154)
  Added journalctl debug output
  Moving to undersampling debugging Eco CI for a while
  Guard clause against too old python version (#1153)
  Updated Cloud Energy
  Updated Cloud Energy
  Better error message in diff
  Frontend test fix
  mWh also in api helpers test
  Revert "Redirecting port 80 to SSL (#1141)"
  Update README.md
  Fixed tests for new mWh badge
  Moving to milli-watt hours (#1133)
  Runner now warns more prominently in dashboard when a run is marked as invalid
  Added note column to be sent to eco-ci (#1145)
  Set tabs to not active which were not active
  Adds the runner arguments as 'Switches' menu item to the stats.html (#1144)
  ...
ArneTR added a commit that referenced this pull request Apr 20, 2025
* main: (42 commits)
  .github workflows yml typos
  Added removal of sudoers.d to uninstall script
  Division by zero protection for StdDev in charts
  Charts now display absolute StdDev [skip ci] (#1154)
  Added journalctl debug output
  Moving to undersampling debugging Eco CI for a while
  Guard clause against too old python version (#1153)
  Updated Cloud Energy
  Updated Cloud Energy
  Better error message in diff
  Frontend test fix
  mWh also in api helpers test
  Revert "Redirecting port 80 to SSL (#1141)"
  Update README.md
  Fixed tests for new mWh badge
  Moving to milli-watt hours (#1133)
  Runner now warns more prominently in dashboard when a run is marked as invalid
  Added note column to be sent to eco-ci (#1145)
  Set tabs to not active which were not active
  Adds the runner arguments as 'Switches' menu item to the stats.html (#1144)
  ...
ArneTR added a commit that referenced this pull request Apr 21, 2025
* main: (43 commits)
  (fix/improvement): Time Travel mode was not correctly advancing step in error case; Reduced complexity of Time Travel code
  (fix): ee-branch must be string and checked as such
  Timeline badges rework (#1158)
  Adds the option to use --ee-branch as parameter. (#1123)
  Bump aiohttp from 3.11.14 to 3.11.16 (#1139)
  Machine names have now nice names in Dashboard and some QoL (#1142)
  Bump pydantic from 2.10.6 to 2.11.3 (#1143)
  Bump uvicorn[standard] from 0.34.0 to 0.34.1 (#1147)
  Fix invalid run markers (#1157)
  .github workflows yml typos
  Added removal of sudoers.d to uninstall script
  Division by zero protection for StdDev in charts
  Charts now display absolute StdDev [skip ci] (#1154)
  Added journalctl debug output
  Moving to undersampling debugging Eco CI for a while
  Guard clause against too old python version (#1153)
  Updated Cloud Energy
  Updated Cloud Energy
  Better error message in diff
  Frontend test fix
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On install check that python is > 3.10
1 participant