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

Package-ize core plugins #1291

Open
10 of 40 tasks
dgw opened this issue Mar 29, 2018 · 8 comments
Open
10 of 40 tasks

Package-ize core plugins #1291

dgw opened this issue Mar 29, 2018 · 8 comments
Labels
Long-term Planning Things that need to happen at some point in the future, but need to NOT happen soon. Tracking

Comments

@dgw
Copy link
Member

dgw commented Mar 29, 2018

Todo list, created for 8.x dev cycle based on 7.x core plugins:

Original issue text follows.


Assuming #1056 gets solved, it would be great to ship the core plugin set separately from Sopel itself. Doing so would make keeping plugins up to date simpler, since a broken plugin wouldn't then require an update to the whole Sopel package to fix it.

Again, this would require solving #1056 first so the core plugin reloading experience (reload.py and perhaps a couple other plugins would remain in core because they relate to administering the bot itself) remains usable. It's not acceptable to ship this before packaged plugins can be reloaded without duplicating their commands etc.

Optimistically slotted into the 7.0.0 milestone... Let's see what happens.

@dgw dgw added the Tracking label Mar 29, 2018
@dgw dgw added this to the 7.0.0 milestone Mar 29, 2018
@dgw dgw modified the milestones: 7.0.0, 8.0.0 Jan 6, 2019
@dgw dgw added Long-term Planning Things that need to happen at some point in the future, but need to NOT happen soon. and removed Tracking labels Jan 6, 2019
@dgw
Copy link
Member Author

dgw commented Jan 6, 2019

Version 7 is too soon. I was a little too optimistic about that…

Re-labeled as well. This is doable in version 8, but it might be a more gradual transition… Again, let's see what happens.

@Exirel
Copy link
Contributor

Exirel commented Jan 15, 2019

After reading issues like #1435, #700, #1037, or code like the .py command, I wonder what should be a built-in module.

Here are some reasons I know (both the ones I thought about and the ones I've heard about):

  • if they need configuration (like API key), they should be externals,
  • if they rely on an API that is shutdown, they should be externals, or replaced promptly,
  • the more complex they are, the more bug fix they might require,

Here are some advantages I can think of when doing that:

  • external module can tell which version of Sopel it is compatible with,
  • external module can be fixed and released without having to upgrade Sopel and all other modules,
  • external module can be uninstalled without having to uninstall or modify Sopel's code,
  • external module can be listed as Git Repository somewhere,
  • they can have their own documentation,

Here are some issues or needs we need to address, now or later, in a near or distant future:

  • "how to create a module" documentation,
  • even more documentation,
  • better test tools for developers of external modules,
  • some documentation, too,
  • a way to distribute and install single-file module without using pip install (even though pip install is the best option, not all users are able to use it properly),
  • you know what? documentation,

And many more.

Oh, and while I'm here, listing things, here is how I would do the transition from "all is built-in" to "nothing is built-in":

  • step 1: extract selected modules into their git repository, and their proper python package, that can be installed with a pip install sopel-module.<modname>
  • step 2: in release 7.0.0, put all these ex-core modules into the setup.py's requirements,
  • step 3: add a big warning message on the documentation
  • step 4: remove them from the requirements of release 8.0.0

As a conclusion, I want to mention again that (we need documentation shhhh) I discuss further the needs for that to happen, rather than the if it should happen. It'll happen, but how to make sure it's a success is the question I'm interested in at the moment.

PS: I can't remember if I talked or not about documentation, which is something I want to work on myself.

@dgw
Copy link
Member Author

dgw commented May 10, 2019

I'm glad to see that this is already in the 8.0.0 milestone, because that ties in with the bit of discussion we had just now on IRC. The tl;dr:

  • Sopel 8 will almost certainly drop Python 2 support, and that's the main thing holding us back from robust plugin reloading at this point (currently we still have some issues when things are removed, for example, or when modules exist in multiple files within a package)
  • That makes Sopel 8 a great time to start this transition, because we'll likely be able to solve most or all of those issues with reloading external modules once we only have to support Python 3.x

I like @Exirel's transition plan, though the version numbers are different in my head (make most core stuff into packages for 8.0 instead of 7.0, and remove them from requirements.txt in 9.0 instead of 8.0). Changes from #1585 might alter how we choose to package stuff, but that's not really a concern for this issue—more for the PR(s) implementing it, down the road, once we've figured out what fun and useful extra stuff we can do with entry points.

@Exirel
Copy link
Contributor

Exirel commented May 16, 2019

I like your proposal, I think we found a good middle ground. So that's cool!

However, I'd like to make an exception for the spellcheck plugin, that has been a real P.I.T.A. over the last few months. It requires system libraries: aspell, aspell-en, and libaspell-dev in order to work properly (at least in English), and it's the only one that requires that so far.

I'd like to drop it for the 7.0 release, with the proper warning in the documentation. Since the plugin system is now reliable and stable, and with options like #1585, I think it's not too of a burden on the user's end. I believe that, with the right documentation, it'll be OK.

For instance, we can suggest to follow the installation guide from the Python Aspell repository, and that the plugin itself could be installed with something close to pip install sopel-plugin-aspell.

I believe this plugin is a very peculiar one, and as such, may require an exception regarding backward compatibility.

@dgw dgw changed the title Package-ize core modules Package-ize core plugins Nov 9, 2019
@Exirel
Copy link
Contributor

Exirel commented Jun 25, 2021

Quick update, I'm working (or planning to work on):

  • help
  • remind
  • url

These are my first 3. sopel-help already exists and is usable out of the box, remind is close to have a first version published, and I haven't started on url yet, but it's clearly in my sight.

After that, I don't know yet.

@dgw dgw added the Tracking label Jun 26, 2021
@dgw
Copy link
Member Author

dgw commented Jun 26, 2021

I task-listed this in the OP so we can see the progress more easily. Task list behavior changes made it a bit more annoying than necessary (as outlined in community/community#4321 (comment)).

@dgw dgw removed this from the 8.0.0 milestone Jul 24, 2022
@dgw
Copy link
Member Author

dgw commented Jul 24, 2022

We've pretty clearly established that this isn't going to be an all-at-once task. Removing milestone to just let it be what the labels already say it is: A long-term planning/tracking list.

@SnoopJ
Copy link
Contributor

SnoopJ commented Oct 14, 2023

Since #2516 is stalled on aiohttp and it looks like they're going to be in pre-release for a while, I took it on myself to write a breakout package for the ip plugin, which is the source of the aiohttp dependency. If this looks good to y'all we can bring it into the org, get the package on PyPI, and drop it from the core. Edit: done

https://github.com/sopel-irc/sopel-iplookup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Long-term Planning Things that need to happen at some point in the future, but need to NOT happen soon. Tracking
Projects
None yet
Development

No branches or pull requests

3 participants