Closed noklam closed 9 months ago
This would be great to have. Just to say that it might be better to do this as two diagrams:
Or maybe it's better to colour code (if possible in mermaid) or label somehow each hook with its plugin entry point.
Basically don't feel like you just need to reproduce the diagram exactly as it is in the Miro board. Change things to whatever is clearest and most useful in the docs.
Potentially useful: how Hooks themselves are run.
Gave it a quick go, just to see if it has potential:
flowchart LR PluginManager -.- pm.hook --> HookRelay HookRelay -- foo_hook --> HookCaller --> HookSpec HookRelay -- foo_hook2 --> HookCaller -- plugin1 --> HookImpl1 HookCaller -- plugin2 --> HookImpl2
Originally posted in https://github.com/pytest-dev/pluggy/issues/341#issuecomment-1063980216
It's almost a happy 1 year birthday for this ticket 🍰
Here is a ticket that I think forms the parent of this one: https://github.com/kedro-org/kedro/issues/1940
Let's ship #1940 to get this going since this has a "low" priority and that smaller ticket has a "high" one. This one would be an useful document even it's just for ourselves internally.
Description
Document the
kedro run
lifecycle with hooks execution orderThis is the latest chart we have (~2 months ago, omitted the
after_context_created
andafter_command_run
hooks but we should have that in place too)I think this should be included in the hooks documentation page
Bonus: Add more examples in the
Common Use Cases
section. i.e. If you need to use the context,after_context_created
is probably the way to go.Double bonus: embed links in the diagram to link to the relevant API docs for the hooks. Maybe like this
Context
This PR enables using Mermaid to draw flow charts in our doc, so we can finally have something that is easier to version control and update.
This is an Mermaid example for our deployment charts