From 7943bb202983cb1ac850803a3c320ae65c391fe3 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sat, 15 Sep 2012 16:26:24 -0400 Subject: [PATCH] Add structure for tutorial Signed-off-by: Doug Hellmann --- .gitignore | 3 +++ docs/source/index.rst | 1 + docs/source/tutorial/calling.rst | 10 ++++++++++ docs/source/tutorial/design.rst | 7 +++++++ docs/source/tutorial/implementation.rst | 4 ++++ docs/source/tutorial/index.rst | 17 +++++++++++++++++ docs/source/tutorial/loading.rst | 8 ++++++++ docs/source/tutorial/registration.rst | 5 +++++ docs/source/tutorial/testing.rst | 5 +++++ 9 files changed, 60 insertions(+) create mode 100644 docs/source/tutorial/calling.rst create mode 100644 docs/source/tutorial/design.rst create mode 100644 docs/source/tutorial/implementation.rst create mode 100644 docs/source/tutorial/index.rst create mode 100644 docs/source/tutorial/loading.rst create mode 100644 docs/source/tutorial/registration.rst create mode 100644 docs/source/tutorial/testing.rst diff --git a/.gitignore b/.gitignore index f24cd99..c5e83ec 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,6 @@ pip-log.txt #Mr Developer .mr.developer.cfg + +# Editors +tags diff --git a/docs/source/index.rst b/docs/source/index.rst index 6c9f7f4..0f9362b 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -19,6 +19,7 @@ Contents: patterns_loading patterns_enabling + tutorial/index managers install essays/* diff --git a/docs/source/tutorial/calling.rst b/docs/source/tutorial/calling.rst new file mode 100644 index 0000000..b28a2f8 --- /dev/null +++ b/docs/source/tutorial/calling.rst @@ -0,0 +1,10 @@ +===================== + Calling the Plugins +===================== + +.. explain the args to map() + +.. explain why a separate callable is used to combine app & plugin (by + not passing Ext the callable directly the app use of stevedore does + not dictate the plugin API, and map() can do more than one thing + with a plugin diff --git a/docs/source/tutorial/design.rst b/docs/source/tutorial/design.rst new file mode 100644 index 0000000..6805784 --- /dev/null +++ b/docs/source/tutorial/design.rst @@ -0,0 +1,7 @@ +=========================== + Designing Your Plugin API +=========================== + +.. seealso:: + + :doc:`/essays/pycon2013` diff --git a/docs/source/tutorial/implementation.rst b/docs/source/tutorial/implementation.rst new file mode 100644 index 0000000..f7265f5 --- /dev/null +++ b/docs/source/tutorial/implementation.rst @@ -0,0 +1,4 @@ +======================= + Implementing a Plugin +======================= + diff --git a/docs/source/tutorial/index.rst b/docs/source/tutorial/index.rst new file mode 100644 index 0000000..f33af88 --- /dev/null +++ b/docs/source/tutorial/index.rst @@ -0,0 +1,17 @@ +===================================== + Using Stevedore in Your Application +===================================== + +This tutorial is a step-by-step walk-through demonstrating how to +define plugins and then use stevedore to load and use them in your +application. + +.. toctree:: + :maxdepth: 2 + + design + implementation + registration + loading + calling + testing diff --git a/docs/source/tutorial/loading.rst b/docs/source/tutorial/loading.rst new file mode 100644 index 0000000..f47501e --- /dev/null +++ b/docs/source/tutorial/loading.rst @@ -0,0 +1,8 @@ +===================== + Loading the Plugins +===================== + +.. talk about when to do this, and that it should be done as few times + as possible (on app startup, rather than on each event) + +.. explain invoke_on_load use case diff --git a/docs/source/tutorial/registration.rst b/docs/source/tutorial/registration.rst new file mode 100644 index 0000000..730e25f --- /dev/null +++ b/docs/source/tutorial/registration.rst @@ -0,0 +1,5 @@ +====================== + Registering a Plugin +====================== + +.. describe basics of defining plugins with setuptools and entry points diff --git a/docs/source/tutorial/testing.rst b/docs/source/tutorial/testing.rst new file mode 100644 index 0000000..9bc646b --- /dev/null +++ b/docs/source/tutorial/testing.rst @@ -0,0 +1,5 @@ +========= + Testing +========= + +.. describe using the TestManager for setting up application tests