feat(python): add support for rye project detection and execution#20
feat(python): add support for rye project detection and execution#20
Conversation
Added support for `rye`, a modern Python project management tool. The `run` CLI can now properly detect Rye projects (priority 5) via the `[tool.rye]` section in `pyproject.toml`. It correctly executes custom scripts defined in `[tool.rye.scripts]` via `rye run <task>` and runs native Rye built-in commands directly. Help texts and README.md were updated accordingly to reflect the addition. Co-authored-by: insign <1113045+insign@users.noreply.github.com>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f394d717bf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/detectors/mod.rs
Outdated
| "help", | ||
| ]; | ||
|
|
||
| const RYE_BUILTINS: &[&str] = &[ |
There was a problem hiding this comment.
Include all Rye top-level commands in built-in list
RYE_BUILTINS is missing documented top-level Rye commands such as toolchain and self, so build_command falls back to rye run <task> for them. In practice, commands like run toolchain -- list become rye run toolchain list, which tries to execute a script named toolchain instead of calling Rye's built-in command and will fail in projects without that script.
Useful? React with 👍 / 👎.
|
I don't think this is ready to merge yet. Two blocking issues:
If we want to support legacy Rye projects anyway, I'd want to see the command-resolution issue fixed first and the rationale narrowed to compatibility for existing repos rather than positioning Rye as an active tool to prioritize. |
Understood. Acknowledging that Rye is considered legacy and the command-resolution logic has a flaw where built-ins improperly take precedence over scripts with the same name. Given that Rye is sunset upstream in favor of |
Closing the PR without merging per feedback: Rye is sunset upstream in favor of uv (which is already supported). Adding new first-class support for a deprecated tool is not the right direction. Co-authored-by: insign <1113045+insign@users.noreply.github.com>
This PR introduces support for detecting and executing commands using
rye.Value added:
Rye is gaining popularity within the Python ecosystem as an all-in-one packaging tool. Supporting it natively in
rungreatly improves the developer experience for users managing their Python projects with Rye, allowing them to rely on the samerun <cmd>pattern they use for Node, Rust, and other tools.Changes include:
[tool.rye]inpyproject.tomlwith priority 5 (equal touv).rye sync) and custom scripts from[tool.rye.scripts].README.mdandsrc/cli.rs.PR created automatically by Jules for task 5886380061621291169 started by @insign