Skip to content
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

split CardinalBot.py into classes #15

Closed
4 tasks done
johnmaguire opened this issue Aug 8, 2013 · 6 comments
Closed
4 tasks done

split CardinalBot.py into classes #15

johnmaguire opened this issue Aug 8, 2013 · 6 comments

Comments

@johnmaguire
Copy link
Owner

CardinalBot.py contains all the main bot logic.

It would be much easier and nicer to read if it was split into pieces. I would like to start using proper logging, with the Python logging library, and a separate class for plugin logic at the very least.

This would also be a good time to start making things PEP-8 compatible.

  • Use Python's logging for console output
  • Create a config system for Cardinal in JSON
  • Implement config in plugins
  • Re-implement events
@johnmaguire
Copy link
Owner Author

This is really going to be quite a rewrite of the core, and as such is blocking #6, #8 and I'll probably complete #17 at the same time.

@johnmaguire
Copy link
Owner Author

Config system completed by 094952d. #33 should still be completed to be considered fully feature-complete.

@johnmaguire johnmaguire added this to the Crimson (2.0) milestone Aug 20, 2014
@johnmaguire
Copy link
Owner Author

Logging has been converted, but I still need to get it so it has different names depending on where in the project it is. Additionally, I've been using the string formatting operator % when I could have just been passing extra arguments to the logger, so I'd like to convert that soon. I will create another bug for this.

Secondly, moving the plugins into PluginManager is nearly done, the rest relies on extending the config system to plugins (currently config is broken), as well as re-implementing events (with the possibility of moving to Twisted's irc_NICK events, for example, rather than userRenamed as we get more data this way.)

@johnmaguire
Copy link
Owner Author

Not going to be using the config module I made for plugins. The whole idea of a spec, with defaults, a config file, and command-line options is overkill. It'll likely just end up being moved to a JSON / YML config file, rather than a module inside of each plugin.

@johnmaguire
Copy link
Owner Author

Config system for plugins has been completed, and is part of PluginManager. Plugins still need to be ported over to the new config system.

@johnmaguire
Copy link
Owner Author

Plugins have all been ported over to the new config system. Also updated logging (no more print's! Anywhere!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant