Skip to content
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

[multi-python] scripts to simplify the selection of python version #4102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amitsrivastava
Copy link
Collaborator

  1. tools/scripts/hue.sh is the wrapper script to call the hue script, that is currently in build/env/bin/hue but could be in various locations depending on python version in use.
  2. tools/scripts/python/python_helper.sh contains helper functions
  • find_latest_python returns the latest py version (3.11, 3.9, 3.8)
  • latest_venv_bin_path returns the path to the env/bin of the latest python, relative to the top-level hue directory.
  1. tools/scripts/python/hue_py_shebang.sh is a helper script that is supposed to be used in the shebang line of python scripts in Hue. I can direct the python script to the correct python to be used.
  2. HUE_PYTHON_VERSION environment variable can be set to override the automatic selection of latest available python.

What changes were proposed in this pull request?

  • (Please fill in changes proposed in this fix)

How was this patch tested?

  • (Please explain how this patch was tested. Ex: unit tests, manual tests)
  • (If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)

Please review Hue Contributing Guide before opening a pull request.

Copy link

github-actions bot commented Apr 9, 2025

⚠️ No test files modified. Please ensure that changes are properly tested. ⚠️

Copy link

github-actions bot commented Apr 9, 2025

Backend Codecov

Backend Code Coverage Report •
FileStmtsMissCoverMissing
TOTAL536032624151% 
report-only-changed-files is enabled. No files were changed during this commit :)

Pytest Report

Tests Skipped Failures Errors Time
1108 106 💤 0 ❌ 0 🔥 5m 54s ⏱️

@amitsrivastava amitsrivastava force-pushed the dev/amit/multi-python-selection-scripts branch 3 times, most recently from bcbf719 to df5aca8 Compare April 10, 2025 23:35
Copy link
Contributor

@ranade1 ranade1 left a comment

Choose a reason for hiding this comment

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

looks good.

1. `tools/scripts/hue.sh` is the wrapper script to call the hue script,
   that is currently in `build/env/bin/hue` but could be in various
   locations depending on python version in use.
2. `tools/scripts/python/python_helper.sh` contains helper functions
  - `find_latest_python` returns the latest py version (3.11, 3.9, 3.8)
  - `latest_venv_bin_path` returns the path to the env/bin of the latest
    python, relative to the top-level hue directory.
3. `tools/scripts/python/hue_py_shebang.sh` is a helper script that
   is supposed to be used in the shebang line of python scripts in Hue.
   I can direct the python script to the correct python to be used.
4. `HUE_PYTHON_VERSION` environment variable can be set to override the
   automatic selection of latest available python.
@amitsrivastava amitsrivastava force-pushed the dev/amit/multi-python-selection-scripts branch from df5aca8 to 7d04d78 Compare April 11, 2025 22:03
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.

3 participants