Skip to content

[run] feat: add support for Python rye package manager#22

Closed
insign wants to merge 1 commit into
mainfrom
feat/python-rye-support-7857737699206065630
Closed

[run] feat: add support for Python rye package manager#22
insign wants to merge 1 commit into
mainfrom
feat/python-rye-support-7857737699206065630

Conversation

@insign
Copy link
Copy Markdown
Contributor

@insign insign commented May 5, 2026

O PR adiciona suporte ao gerenciador de pacotes Python rye. Isso é realmente útil porque permite que o run detecte projetos gerenciados pelo rye lendo o arquivo pyproject.toml, extraia e valide os scripts customizados declarados na seção [tool.rye.scripts], e direcione a execução para o ambiente correto do Rye. A ausência do suporte ao Rye forçaria o usuário a usar comandos manuais, perdendo o benefício da ferramenta universal.

Arquivos alterados:

  • src/detectors/python.rs: Lógica principal para detecção ([tool.rye]) e validação ([tool.rye.scripts]) junto com os respectivos testes.
  • src/detectors/mod.rs: Roteamento e mapeamento dos comandos padrão/scripts com suporte a rye e seus testes.
  • README.md: O README foi modificado pontualmente para refletir rye na listagem de ferramentas suportadas para a linguagem Python com sua correta prioridade (antes de uv), pois de outra forma estaria incompleto e enganoso sobre as reais capacidades da ferramenta.

Foram adicionados apenas testes relevantes para o próprio detector do Rye (funcionamento, validação e scripts customizados/padrão) e não houve correções cegas. Não há arquivos temporários, nem expansão de escopo. Todos os demais arquivos mantiveram-se inalterados.


PR created automatically by Jules for task 7857737699206065630 started by @insign

This PR adds support for detecting and running commands using the Rye package manager for Python projects. This provides concrete value by extending the tool to support a modern, highly requested package manager, which ensures that Rye-based projects can seamlessly enjoy zero-configuration universal task running.

The implementation reads `pyproject.toml` to detect Rye (`[tool.rye]`), correctly evaluates the `[tool.rye.scripts]` block for command validation, and updates the command routing in the main detector module. Tests for detection, validation, and command building were implemented, and the documentation (`README.md`) was updated to reflect the new feature support and its detection priority.

Co-authored-by: insign <1113045+insign@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b9807c4e1

ℹ️ 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".

Comment thread src/detectors/mod.rs
"run", "test", "update", "upgrade", "x",
];

const RYE_BUILTINS: &[&str] = &[
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Include all Rye top-level commands in builtin list

The new RYE_BUILTINS table is incomplete, so build_command falls back to rye run <task> for valid Rye CLI commands that are not listed. In practice, commands like config, tools, and self (documented as top-level Rye commands) will be routed as scripts (rye run config) and fail unless a script with that name exists, which breaks normal run <rye-command> usage in Rye projects.

Useful? React with 👍 / 👎.

@insign insign closed this May 13, 2026
@insign insign deleted the feat/python-rye-support-7857737699206065630 branch May 13, 2026 07:23
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.

1 participant