I think my `stevedore_extensions` plugin is fairly...
# plugins
p
I think my
stevedore_extensions
plugin is fairly generalizable, and could be useful for anyone that uses https://github.com/openstack/stevedore to load plugins at runtime. Stevedore uses the python entry points infrastructure to look up the available plugins. This PR has a detailed description of the plugin. Is this something that could move into pants backends and be distributed with pants? What changes might be needed to make it more palatable? https://github.com/StackStorm/st2/pull/5869
πŸ‘ 1
❀️ 2
c
fwiw, I could see a future where there’s a backend in Pants with support for stevedore_extensions.
p
Sweet
It is my most complex plugin, so it is taking awhile for StackStorm folks to learn enough about dependency inference (and probably about stevedore) to feel comfortable reviewing it.
@happy-kitchen-89482 or @witty-crayon-22786 What do you think of this plugin? Would you be okay with distributing it in pants?
w
yea, that seems like something that we could accept.
p
Sweet. Now let's see where it gets merged first, in StackStorm or in pants πŸ™‚? Now to create a PR. And, where should I put the backend? The other plugins are under
pants...python.<goal>.<tool>
, but that doesn't make much sense here because this is more about dep inference across a variety of goals. Eventually, I imagine there will be a django plugin. I imagine this would be a sibling of that plugin. So where do these framework-specific bits go?
pants.backend.[experimental.]python.frameworks.stevedore
pants.backend.[experimental.]python.frameworks.django
or
pants.backend.[experimental.]python.stevedore
pants.backend.[experimental.]python.django
And, should I go for
stevedore
(mirroring the library's name) or
stevedore_extensions
(which hints at the nature of the backend)?
@bitter-ability-32190 what do you think? Where should framework plugins like
django
and
stevedore
go?
b
Oh dont make me use my brain πŸ˜› Its all bikeshed shades anyways πŸ˜›
πŸ˜‚ 2
c
+1 for
[…].stevedore
without the
_extensions
bit, as that is the project name for it, right?
πŸ‘ 1
I kind of like the
pants.backend.[experimental.]python.frameworks.stevedore
style.. πŸ™‚
p
@happy-kitchen-89482 you said in a ticket that you wrote some django dep inferrence stuff. Where are you planning to put that plugin?
h
It's still in a branch in my fork, but the code will go in
src/python/pants/backend/python/framework/django
, and there will probably be a register.py in
src/python/pants/backend/python/framework/experimental/django
to signal that this is experimental
p
Cool. So you like the
framework
namespace?
I guess I had
frameworks
. I can switch to
framework
for my stevedore plugin.
h
I like
framework
yeah, could also do
frameworks
, I don't think I put much thought into singular vs plural. But I guess we do singular elsewhere, e.g.,
backend
vs
backends
,
lint
vs
linters
etc.
πŸ‘ 1
So might as well stick to that
πŸ‘ 1
p
I'm actively drafting the PR description, and then I'll fix frameworks -> framework. πŸ™‚ PR almost ready...
h
I'll go read up on stevedore
That's probably the best description of how it works
c
probably be a register.py in
src/python/pants/backend/python/framework/experimental/django
to signal that this is experimental
was this meant to be
src/python/pants/backend/experimental/python/framework/django
?