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

Improve core plugins maintainability #429

Closed
hsoft opened this Issue Jun 23, 2015 · 2 comments

Comments

Projects
None yet
1 participant
@hsoft
Owner

hsoft commented Jun 23, 2015

Big plugin overhauls like those planned in #401 are out of scope for moneyGuru 2.9, but there's some changed that are needed for #415 (which is planned for v2.9) to work well, that is, making sure that "core" plugins (plugins that ship with moneyGuru) work well.

Context

With #401, the idea is to "pluginify" more parts of moneyGuru, or, as we call it, "eat our own dog food". #415 is a good opportunity to do so: we'll implement all core currency fetchers as plugins.

Currently, plugins work this way:

  1. At startup, check if the "plugins folder" (the one that is opened with "Open Plugin Folder") exists.
  2. If it doesn't, create it and copy the internal "plugins" folder in it.
  3. If it does, do nothing.

The goal there was to give easy examples to play with to the user, to foster plugin creation. It's easy, they're right there in your plugin folder! She could then directly toy with these plugins and see the result.

The problem with this is that plugins aren't updated with new moneyGuru versions. For toy plugins (what core plugins are until 2.9), it's no big deal if they get outdated and stop working, but for plugins essential to moneyGuru's workflow (currency fetching), that doesn't cut it.

The plan

I first thought of implementing a full feature version detection system that replace outdated plugins, but it might be too soon. I'm not ready to step in that. Plus, we'd have to verify if it doesn't affect startup time too negatively, and that's an analysis I'd like to postpone.

My immediate plan would be simple: load plugins from two sources, core and user. So we start by loading plugins directly from the "plugins" folder shipped with moneyGuru, and then we load plugins from the user folder (with duplicate detection. we would ignore the second plugin with the same name). Simple, effective, good enough for now (I think).

@hsoft hsoft added the feature label Jun 23, 2015

@hsoft hsoft self-assigned this Jun 23, 2015

hsoft added a commit that referenced this issue Jun 23, 2015

Create the concept of "core plugins"
Core plugins, which live in `core.plugins` are always loaded first and
contain plugins that moneyGuru needs in order to work properly (as well
as a few toy example plugins).

This replaces the old mechanism where we would copy `plugin_examples` in
the user's plugin folder.

ref #429
@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 23, 2015

With the last commit referenced above (which moves @brownnrl's new import plugins into their own plugin unit), we're getting closer to starting a "core features as plugins" movement.

hsoft added a commit that referenced this issue Jun 23, 2015

@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 23, 2015

With this last commit. the issue is pretty much fixed.

@hsoft hsoft closed this Jun 23, 2015

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