-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Initial PoC for code autogeneration #4284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Looks very interesting! I never fail to be amazed of what people have buid for Python and what you can do with it :) Let me play the devils advocate as usual 😈 My guess is that this approach will provide us with a best-effort starting point at best. Full, correct & stable automation will be extremely hard to reach for all of ptbs convenience functionality (and that's actually the point of tdlib/telegram-bot-api#41 (comment) 😅 ) That's why I would personally view this kind of tool more like https://github.com/python-telegram-bot/ptb-changelog-helper/:
I'm therefore hesitant to add this to the main repository. I would instead propose to create a standalone repository for it in the ptb organization. The dependency on the scraper functionality from What do you think? |
The fact that we need some tool like this at all is kinda sad, since >80% of any Bot API update is just boilerplate changes.
yes, it's intended to shorten developer time, not eliminate it - that's the goal of an AI tool
agreed, that's why I already isolated it from everything else. I only added it here for now because its easier to access
interesting.. that could make I also did identify other functions inside |
👍
👍
I would expect that a config file can largely circumvent that :)
Good points! It we go that way, those functions should then also be part of the external repos interface. To summarize the dicsussion in the dev chat a bit:
3rd party tools that I've found in 20min search:
Pydantic types projects:
|
I vote to close this since we have AI agents now. While it would be a fun thing to code this up, maintaining this itself would be like adjusting test official for every api update. I haven't used AI agents yet, but this would be the kind of thing you would just tell it to copy and patch. The new VSCode Copilot agent sounds pretty promising, we should probably give it a shot and see how it does. |
I agree on closing. AI tools do help with the updates, though I personally still see customized tooling for specific repeating tasks as valid. You usually want deterministic output for that, which is not as easy with AI :D |
Closes #4277
Using
libcst
, it is possible to modify the source code programmatically. This is better than regex since that can be very error prone.For now will support only simple operations such as adding a new parameter to method.
Will also need its own tests.
Progress:
Core:
Refactoring: