fix(ci): Stabilize nox sessions#27
Conversation
…ython
The `nox` sessions were failing in CI because `uv sync` was not installing dependencies into the correct session-specific virtual environments. This was caused by `uv` ignoring the `VIRTUAL_ENV` set by `nox` and defaulting to a different environment.
This commit resolves the issue by:
1. Adding `--python str(session.python)` to all `uv sync` calls in `noxfile.py`. This explicitly tells `uv` which python executable to use, forcing it to install dependencies into the correct isolated virtual environment for each session.
2. Removing all `external=True` flags from the `uv sync` calls, as they are no longer needed and were part of the problem.
3. Removing a redundant `session.install("pydoclint")` call, as the dependency is already handled by `uv sync`.
These changes ensure that `tests` and `mypy` sessions run reliably. The `pre-commit` session is now configured correctly, although it may still face issues in certain CI environments with unusual PATH configurations.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
This commit stabilizes the
noxsessions to ensure they run reliably in CI environments.The key issue was that
uv, the package installer, was ignoring the isolated virtual environments created bynoxfor each session. This caused dependencies to be installed in the wrong location, leading to "module not found" errors.This commit fixes the problem by modifying all
uv synccalls innoxfile.pyto explicitly use the session's Python interpreter via the--python str(session.python)flag. This forcesuvto install dependencies into the correct session-specific environment.Additionally, all
external=Trueflags have been removed from these calls, as they are no longer necessary and were contributing to the issue.While this change fixes the
testsandmypysessions, thepre-commitsession may still exhibit issues in some CI environments due to deeper configuration problems. However, this commit significantly improves the stability and correctness of thenoxsetup.PR created automatically by Jules for task 1351672480625428708 started by @bosd