Skip to content

Add rtk python3 command with module routing and traceback filtering#429

Open
seungwoo-ji-03 wants to merge 5 commits intortk-ai:developfrom
seungwoo-ji-03:feat/python3-cmd
Open

Add rtk python3 command with module routing and traceback filtering#429
seungwoo-ji-03 wants to merge 5 commits intortk-ai:developfrom
seungwoo-ji-03:feat/python3-cmd

Conversation

@seungwoo-ji-03
Copy link
Copy Markdown

Summary

  • python3 was detected 75 times as unsupported in rtk discover --all
  • Add rtk python3 / rtk python commands that:
    • Route -m <module> to existing filters (pytest, mypy, ruff, pip)
    • Handle -m py_compile with compact ok ✓ output
    • Filter deep tracebacks to last frame + error line (60%+ savings)
  • Extend discover rules: python3 -m pytest/pip/ruff correctly classified to specific rtk commands

Before / After

Command Before After
rtk python3 -m pytest tests/ unsupported delegates to rtk pytest
rtk python3 -m pip list unsupported delegates to rtk pip
rtk python3 script.py (crash) unsupported traceback filtered (60%+ savings)
python3 -m ruff check . (discover) unclassified classified as rtk ruff (80%)

Test plan

  • 16 new unit tests, 725 total passed
  • cargo fmt + cargo clippy clean
  • Token savings ≥60% verified on deep traceback fixture

Fixes #285

@seungwoo-ji-03 seungwoo-ji-03 changed the base branch from master to develop March 9, 2026 12:17
@pszymkowiak pszymkowiak force-pushed the develop branch 4 times, most recently from dc20fc4 to cc93afc Compare March 10, 2026 19:59
@seungwoo-ji-03
Copy link
Copy Markdown
Author

@pszymkowiak Could you take a look when you get a chance? This addresses #285 by adding python3/python command routing and traceback filtering. Happy to walk through any part of the implementation.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 20, 2026

CLA assistant check
All committers have signed the CLA.

@aeppling
Copy link
Copy Markdown
Contributor

Hey

We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes src/ from a flat layout into subfolders.

No logic changes — only file moves and import path updates.

What you need to do

Rebase your branch on develop when receiving this comment:

git fetch origin && git rebase origin/develop

Git detects renames automatically. If you get import conflicts, update the paths:

use crate::git;        // now: use crate::cmds::git::git;
use crate::tracking;   // now: use crate::core::tracking;
use crate::config;     // now: use crate::core::config;
use crate::init;       // now: use crate::hooks::init;
use crate::gain;       // now: use crate::analytics::gain;

Need help rebasing? Tag @aeppling

…aceback filter

Signed-off-by: seungwoo-ji (jeus) <jiseungwoo0210@gmail.com>
…g modules

Signed-off-by: seungwoo-ji (jeus) <jiseungwoo0210@gmail.com>
Signed-off-by: seungwoo-ji (jeus) <jiseungwoo0210@gmail.com>
…3_cmd

Signed-off-by: seungwoo-ji (jeus) <jiseungwoo0210@gmail.com>
@seungwoo-ji-03
Copy link
Copy Markdown
Author

@aeppling Rebased on develop. All tests passing.

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.

Feature request: add rtk rewrite for python3

3 participants