Skip to content

#2484 tab completion for ide install python triggers uv installation - #2523

Open
JoelAdbu wants to merge 5 commits into
devonfw:mainfrom
JoelAdbu:fix/#2484-tab-comletion-for-ide-install-python-triggers-uv-installation
Open

JoelAdbu wants to merge 5 commits into
devonfw:mainfrom
JoelAdbu:fix/#2484-tab-comletion-for-ide-install-python-triggers-uv-installation

Conversation

@JoelAdbu

@JoelAdbu JoelAdbu commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2484

Implemented changes:

  • Method fetchUvpythonList() has been change to only run the command and does not trigger an installation bevor running the command if tool is not installed or update is available
  • auto completion tab function now just shows ide install python 3.*
  • added new override method completeRequest(ToolInstallationRequest request) to Python.java to ensure uv is installed bevor installing Python.

Note

Completion no longer installs uv implicitly. Since warnings are currently not surfaced reliably from the completion flow, no user-facing message is shown. Suggestions for a cleaner approach are welcome.


Testing instructions

Please add conscise, understandable instructions on how a reviewer can test/verify the functionality of your contribution here:

  1. Run mvn clean test in cli module.
  2. Run ./build-local-dev.sh.
  3. Verify in projects/<my-project>/software that uv and python is not installed, otherwise delete both.
  4. In cli type ide install python 3. and use tab for autocompletion.
  5. Verify that completion only suggests the wildcard patterns 3.* or 3.*!.
    6 Install python ide install python and verify uv is still preinstalled bevor python ist installed.
  6. In cli type ide install python 3. again and use tab for autocompletion now uv is installed and show all possible options.

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat and not feature/921 fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summaries what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

…ompletion

Version auto-completion ('ide install python 3.' + Tab) used to call the
auto-installing runTool variant in PythonRepository.fetchUvPythonList(),
which silently installed or upgraded uv in the background just to list the
available python versions.

* PythonRepository.fetchUvPythonList() now guards on uv.isInstalled(): if
  uv is missing it logs a warning and returns an empty list (no download).
* Python.completeRequest() ensures uv is installed on the install path
  before the python version is resolved (the version list comes exclusively
  from 'uv python list' and resolution happens before the uv dependency
  would normally be installed).
* Added testGetSortedVersionsIsEmptyWhenUvNotInstalled for the guard.
- shortend javadoc
@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Sep 21, 2026
@JoelAdbu JoelAdbu added install installation process of IDE + tools and install commandlet completion auto-completion in bash or build in CLI bugfix PR that fixes a bug issue python runtime for python language uv fast Python package and project manager labels Sep 21, 2026
@coveralls

coveralls commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 35612692096

Coverage decreased (-0.001%) to 74.245%

Details

  • Coverage decreased (-0.001%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 21 coverage regressions across 3 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

21 previously-covered lines in 3 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/python/Python.java 18 68.64%
com/devonfw/tools/ide/tool/python/PythonRepository.java 2 90.24%
com/devonfw/tools/ide/version/VersionSegment.java 1 91.08%

Coverage Stats

Coverage Status
Relevant Lines: 19107
Covered Lines: 14820
Line Coverage: 77.56%
Relevant Branches: 8554
Covered Branches: 5717
Branch Coverage: 66.83%
Branches in Coverage %: Yes
Coverage Strength: 3.32 hits per line

💛 - Coveralls

…b-comletion-for-ide-install-python-triggers-uv-installation
- add changelog entry
@JoelAdbu
JoelAdbu marked this pull request as ready for review September 21, 2026 14:31
@JoelAdbu JoelAdbu moved this from 🆕 New to Team Review in IDEasy board Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR that fixes a bug issue completion auto-completion in bash or build in CLI install installation process of IDE + tools and install commandlet python runtime for python language uv fast Python package and project manager

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Tab Completion for ide install python <version> triggers uv installation/update

3 participants