-
Notifications
You must be signed in to change notification settings - Fork 919
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
Update mermaid entrypoint diagrams with current state #4339
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
dd53319
Update mermaid entrypoint diagrams with current state
merelcht 9efaf70
Update diagram kedro with project
merelcht 3f713bc
Update diagram kedro run
merelcht 54aa08d
Update diagram kedro-plugin
merelcht f6287e4
Update kedro-ipython diagram
merelcht 602bc26
Merge branch 'main' into update-diagrams
merelcht 3b68b9c
Remove unused component
merelcht 41ec71d
Update docs/diagrams/installed-kedro-project.md
merelcht File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
```mermaid | ||
sequenceDiagram | ||
title "Installed Kedro project" | ||
title Installed Kedro project | ||
|
||
participant script as "third-party Python script" | ||
participant curr_dir as "Directory with Kedro conf/ in it" | ||
participant session as "KedroSession" | ||
participant script as Third-party Python script | ||
participant curr_dir as Directory with Kedro conf/ in it | ||
participant session as KedroSession | ||
|
||
script->>script: run third-party script | ||
script->>curr_dir: get path to the project config | ||
script->>session: create a session with Kedro project name and project config dir | ||
session->>run: run a pipeline and/or nodes | ||
script->>session: create a session with Kedro project config dir | ||
session->>session: run a pipeline and/or nodes | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,25 @@ | ||
```mermaid | ||
sequenceDiagram | ||
title "$ kedro ipython" | ||
title $ kedro ipython | ||
|
||
participant cli as "$ kedro ipython" | ||
participant env as "Environment variables" | ||
participant ipython as "IPython" | ||
participant entrypoint as "00-kedro-init.py\nreload_kedro" | ||
participant hook_manager as "Hook manager" | ||
participant project as "Kedro project directory" | ||
participant session as "KedroSession" | ||
participant context as "KedroContext" | ||
participant cli as $ kedro ipython | ||
participant env as Environment variables | ||
participant ipython as IPython | ||
participant entrypoint as ipython/__init__.py <br> reload_kedro | ||
participant project as Kedro project directory | ||
participant session as KedroSession | ||
participant context as KedroContext | ||
|
||
cli->>cli: Check if IPython is importable | ||
cli->>env: Set IPYTHONDIR to metadata.project_path / ".ipython" | ||
cli->>env: Set KEDRO_ENV to the chosen Kedro environment | ||
cli->>cli: Print an info message | ||
cli->>ipython: Start ipython | ||
ipython->>entrypoint: load startup script | ||
entrypoint->>entrypoint: import Kedro | ||
entrypoint->>hook_manager: clear the hook manager | ||
ipython->>entrypoint: load ipython extension | ||
entrypoint->>project: find Kedro project | ||
entrypoint->>project: bootstrap the project | ||
entrypoint->>entrypoint: remove imported project package modules | ||
entrypoint->>session: create a KedroSession | ||
entrypoint->>session: activate the session | ||
entrypoint->>session: load KedroContext | ||
entrypoint->>context: get the data catalog | ||
entrypoint->>entrypoint: expose session, context and catalog variables | ||
entrypoint->>entrypoint: expose session, context, catalog and pipelines variables | ||
entrypoint->>entrypoint: register reload_kedro line magic | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
```mermaid | ||
sequenceDiagram | ||
title "$ kedro plugin" | ||
title $ kedro plugin | ||
|
||
participant cli as "$ kedro plugin" | ||
participant prelude as "See kedro-with-project.puml for details" | ||
participant project_plugin as "Kedro Plugin\nentry_point = kedro.project_commands" | ||
participant click as "Click context" | ||
participant session as "KedroSession" | ||
participant cli as $ kedro plugin | ||
participant prelude as See kedro-with-project.md for details | ||
participant project_plugins as Kedro Plugins <br> [project.entry-points."kedro.project_commands"] | ||
participant session as KedroSession | ||
participant kedro_cli as KedroCLI | ||
|
||
cli->>prelude: prepare click commands as prelude to this | ||
prelude->>project_plugin: execute plugin click command | ||
project_plugin->>click: get ProjectMetadata from the click context | ||
project_plugin->>kedro_cli: get ProjectMetadata from the KedroCLI command collection group | ||
project_plugin->>project_plugin: plugin code | ||
project_plugin->>session: need to create KedroSession for all runtime config and info | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
```mermaid | ||
sequenceDiagram | ||
title "$ <project>\n$ python -m <project>.run" | ||
title python -m {project}.run | ||
|
||
participant cli as "$ <project>\n$ python -m <project>" | ||
participant entrypoint as "setup.py\n<project> = <project>.__main__" | ||
participant session as "KedroSession" | ||
participant cli as $ <project> <br> $ python -m <project> | ||
participant entrypoint as pyproject.toml <br> <project> = <project>.__main__:main | ||
participant find_run as find_run_command() | ||
participant session as KedroSession | ||
|
||
cli->>entrypoint: Python calls the entrypoint | ||
entrypoint->>session: create session | ||
entrypoint->>find_run: Find run command | ||
find_run->>session: create session (for default run) | ||
session->>session: run | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a valid entrypoint? I was trying to find info on it but I couldn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took me a while to figure this out as well. It's part of the entrypoint groups:
It's used to initialise plugins: https://github.com/kedro-org/kedro/blob/main/kedro/framework/cli/cli.py#L121 which is called when
kedro.framework.cli:main
is used as entrypoint.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh TIL! Thanks!