ikabot
ikabot copied to clipboard
8.0.0 Changes
Ikabot Version 8.0.0 Codebase Changes
Hello Ikabot Contributors,
We have decided that the Ikabot codebase is due for a rework. This means that after this update, Ikabot should be more stable and work better on different platforms. It will also mean, unfortunately, that many breaking changes will be necessary. Your forked repositories will probably need a refactor as well, and you might have to log into Ikabot again after a long time of not logging in. It also means that you will have to set up your Telegram bots with Ikabot again.
Key Points
-
Codebase-wide support for static type checking: Starting from this version of Ikabot onwards, the codebase will support static type checks (to some extent). This means that it will be easier for you to write your own custom Ikabot code and modules and it will also make it easier to write code for the members of the Ikabot-Collective. Static type checks will allow your IDE (VS Code, PyCharm etc..) to infer function return types and provide appropriate auto-complete suggestions.
-
Logging rework: The logging module has been redesigned before with very bad practical results. For this reason we will redesign it again to be significantly more simple. Ikabot will from this version onwards use
logging
module from python's standard library. -
Session data rework: After this version of Ikabot, session data will no longer be stored in encrypted lines within the .ikabot file. Instead, the .ikabot file will be plaintext and it will contain data in a JSON format. This will allow Ikabot tasks to talk to each other, even if they are running on different accounts. Whether the cookies will be stored encrypted within this file or in plaintext is a decision we are still in the process of making. THIS WILL MEAN THAT YOU WILL HAVE TO LOG INTO IKABOT AGAIN AND GENERATE NEW COOKIES AND TELEGRAM TOKENS. THIS IS A BREAKING CHANGE!
-
Ikabot function module structure: Every Ikabot function module will from now on have two significant components:
- The configurator function, which will be called by the scheduler process (Main Menu process), that will ask the user for input and return a dictionary containing the keyword arguments that will be passed to the task function for execution.
- The task function, which will run concurrently in the background along other tasks either on the Main Menu process or on a separate executor process.
This will open the door for saving task configurations and re-scheduling them again later at the user's command.
-
Mode of module execution: Ikabot will now no longer run every module in a separate process. Instead, Ikabot will have two modes of execution:
- Background-Executor: Where new Ikabot tasks will be scheduled for execution (configured) by the "Main Menu" process (the one that is run by the user when they run Ikabot initially) and actually executed by a "Background Worker" process in a concurrent fashion with other tasks.
- Main-Menu-Executor: Where the target module will be both scheduled (configured) and executed on the Main Menu process. This will usually be the case on systems where spawning a background process is impossible.
We have yet to decide on whether to use the
asyncio
package from the python standard library or to usethreading
for concurrent task execution. -
Command line arguments: Predetermined input will no longer be the only command line argument option. It is far too buggy and unreliable. From now on, predetermined input will be one of multiple different command line options. Ikabot tasks will also be configurable using command line arguments. THIS MEANS YOUR PREVIOUSLY SAVED PREDETERMINED INPUT COMMANDS WILL HAVE TO BE MODIFIED.
Action Items for Contributors
- [ ] Add support for static type checking codebase-wide
- [ ] #264
- [ ] Decide on whether or not to use encryption at all for the .ikabot file
- [ ] Rework the session data system to use plaintext JSON in the .ikabot file
- [ ] Bring structure to every Ikabot function module, separate configurator function from task function
- [x] Decide whether to use
asyncio
orthreading
for concurrent task execution- [ ] Implement two new modes of execution: "Background-Executor" and "Main-Menu-Executor"
- [ ] Implement task configuration via command line arguments.
Final Notes
We encourage all contributors to actively participate in this exciting phase of Ikabot's development. Your insights and assistance are invaluable, and we look forward to collaborating on version 8.0.0.
Share Your Feedback: If you have any thoughts, suggestions, or concerns, please feel free to share them in the comments. Your feedback is crucial in making Ikabot even better.
Thank you for your continued support and contributions!