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

high level overview #14

Closed
techtonik opened this issue Oct 22, 2015 · 20 comments
Closed

high level overview #14

techtonik opened this issue Oct 22, 2015 · 20 comments

Comments

@techtonik
Copy link
Contributor

The description "as used by py.test" is not very helpful. To be able to compare with other known plugin systems like Trac, SCons , Roundup or Spyder I need to answer the questions:

  1. how plugin discovery is made
  2. how plugin loading happens
  3. when plugin initialization occurs
@RonnyPfannschmidt
Copy link
Member

1/2) both setuptools entrypoints and custom loading are upported
3) all added plugins are constructed instances or modules,
the typical method to do global initialization is to create a historic configuration hook that
gets called on each added plugin (like pytest_configure)

@techtonik
Copy link
Contributor Author

1/2) both setuptools entrypoints and custom loading are upported

This explanation is no better than "as used by py.test". =)

  1. what is "global" initialization and what is "normal" initialiation in this case?

@RonnyPfannschmidt
Copy link
Member

there is no "normal"

you'd just have a hook thats called on all plugins that get registered in all variants it was called with

there is a reason why i strongly referred to pytest internal usages,
we are rather short on time atm
n

@nicoddemus
Copy link
Member

@techtonik one of the milestones for a pluggy 1.0 release is complete docs, which as @RonnyPfannschmidt said probably won't be available in the short term.

We should use this issue to remember ourselves of the need for better documentation on pluggy.

@techtonik
Copy link
Contributor Author

I see.

you'd just have a hook thats called on all plugins that get registered in all variants it was called with

Before a hook is called on a plugin, you need to find and import that plugin. Is that "hook" is just a function that should be implemented by a module as a part of plugin interface?

@RonnyPfannschmidt
Copy link
Member

Yes, the pytest_configure hook in pytest is one such example

@techtonik
Copy link
Contributor Author

Ok. hooks == plugin api == plugin callbacks. Thanks for the explanations.

@Nick0001
Copy link

Hello, I'm in the process of implementing plugins using pluggy in our own application. Is there a more elaborate description of how to use pluggy? When can pluggy 1.0 be expected? When can pytest 3 be expected?

@nicoddemus
Copy link
Member

When can pluggy 1.0 be expected?

Not sure, @hpk42 could comment on that.

When can pytest 3 be expected?

I would say sometime after our sprint, which will end on June 25th.

@goodboy
Copy link
Contributor

goodboy commented Aug 27, 2016

@nicoddemus @RonnyPfannschmidt @hpk42 I'd be willing to take a stab at this.

I've now used pluggy in another small project and also have pretty decent experience with pytest at this point. I also have combed the pluggy source code multiple times and am pretty sure I have a decent grasp of the internals. I've been trying to use pluggy as a means to learn pytest from the bottom up for some time now but I need some deadlines to move it along.

I'd be willing to submit a PR for sphinx docs within the next few weeks. My only request is that eventually this project is moved to the pytest-dev org and maintained more prominently there.

@RonnyPfannschmidt
Copy link
Member

I did send @hpk42 a mail about that
He will react after returning from his current travel

@nicoddemus
Copy link
Member

My personal opinion is that I certainly would love to have some docs for the project! I would also like to move it to pytest-dev, but let's see what @hpk42 has to say about that.

@goodboy
Copy link
Contributor

goodboy commented Sep 13, 2016

@RonnyPfannschmidt @nicoddemus well it looks like we got our wish!

Are you guys cool with sphinx + the alabaster theme to start?

@nicoddemus
Copy link
Member

Hey @tgoodlet! 😁

I think Sphinx is fine, but if you don't mind I would rather publish to readthedocs with the default readthedocs theme. What do you think?

@goodboy
Copy link
Contributor

goodboy commented Sep 13, 2016

@nicoddemus sure works for me. I'll get something cobbled together in the next week or so and link you guys.

@nicoddemus
Copy link
Member

Nice, sounds good! Thanks a lot for your interest, it is really appreciated by the team! 👍

Btw, already created the project on readthedocs. 😁

@hpk42
Copy link
Contributor

hpk42 commented Nov 11, 2016

I'd be very happy with a sphinx project even by just having nice API online documentation. @tgoodlet if you go for this we could eventually go for pluggy-1.0 i think 👍

@goodboy
Copy link
Contributor

goodboy commented Nov 11, 2016

@hpk42 yeah I know I kinda dropped the ball on this...been busy.

It's Pycon Canada this weekend in Toronto so I'll try to jam something out at the very least during the sprints Mon-Tues.

@RonnyPfannschmidt
Copy link
Member

actually, let me just do a quick and dirty initial setup with only api docs

@goodboy
Copy link
Contributor

goodboy commented Nov 12, 2016

@RonnyPfannschmidt so are you going to push up just a sphinx autodoc draft?

I'm a fan of you getting the rtd build up and running since I don't have access currently ;)

RonnyPfannschmidt added a commit to RonnyPfannschmidt/pluggy that referenced this issue Nov 14, 2016
starting point for pytest-dev#14 as well
goodboy pushed a commit to goodboy/pluggy that referenced this issue Jan 31, 2017
Covers everything in the original pluggy.py module's doc string in much
more detail with links to external resources as seemed fit.

Resolves pytest-dev#14
goodboy pushed a commit to goodboy/pluggy that referenced this issue Jan 31, 2017
We now have full sphinx docs as per pytest-dev#14.
pluggy.py is the entire project and it doesn't make much sense to
describe that module's contents other then saying "this is it folks".
@goodboy goodboy mentioned this issue Jan 31, 2017
goodboy pushed a commit to goodboy/pluggy that referenced this issue Feb 5, 2017
Covers everything in the original pluggy.py module's doc string in much
more detail with links to external resources as seemed fit.

Resolves pytest-dev#14
goodboy pushed a commit to goodboy/pluggy that referenced this issue Feb 5, 2017
We now have full sphinx docs as per pytest-dev#14.
pluggy.py is the entire project and it doesn't make much sense to
describe that module's contents other then saying "this is it folks".
goodboy pushed a commit to goodboy/pluggy that referenced this issue Feb 5, 2017
We now have full sphinx docs as per pytest-dev#14.
pluggy.py is the entire project and it doesn't make much sense to
describe that module's contents other then saying "this is it folks".
@hpk42 hpk42 closed this as completed in e98b20c Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants