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

Bring back .puml diagrams that show entrypoint flows as mermaid diagrams #4013

Merged
merged 4 commits into from
Jul 17, 2024

Conversation

merelcht
Copy link
Member

@merelcht merelcht commented Jul 16, 2024

Description

Undo #2563

Important

This PR only brings the diagrams back. I'll follow up with PRs to make the diagrams up to date with the current entrypoint flows.

Original motivation for adding these diagrams by @idanov (copied from private-kedro)

Description

This PR adds a number of simplified (informal) sequence diagrams to help with the visibility on what is happening for all Kedro project entrypoints. For now the usage is internal only, but when we iron out Kedro's architecture and polish the diagrams, we might consider adding them to the official Kedro documentation to aid plugin developers in their understanding of Kedro internals.

Development notes

There are 7 .puml files documenting the sequence of actions triggered by each of the following Kedro entrypoints:

  • kedro in a folder without a Kedro project
  • kedro in a folder with Kedro project
  • kedro ipython
  • kedro run
  • <package> and python -m <package>
  • kedro plugin
  • Running installed Kedro project from another Python script

From these diagrams we can already see some inefficiencies how they are kickstarted, e.g. running Kedro as a package does not allow for any command arguments and it is different than kedro run. In the future we should aim to fix that and make both flows go through the same sequence of actions.

These diagrams can serve as a good map for redesigning and simplifying Kedro's plugin system as needed by https://github.com/quantumblacklabs/private-kedro/issues/884.

PS: For those unfamiliar with .puml, this is the format used by PlantUML which is an open-source tool for diagraming. There is a PlantUML PyCharm plugin and possibly one for VSCode as well.

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
@merelcht merelcht marked this pull request as ready for review July 16, 2024 12:32
@merelcht merelcht self-assigned this Jul 16, 2024
@merelcht merelcht requested review from idanov and noklam and removed request for yetudada July 16, 2024 12:32
@astrojuanlu
Copy link
Member

My first attempt was not very promising 😅

image

Can't we convert them to Mermaid and put them in our wiki, where the rest of our dev docs live? I tried an AI-powered assistant and it seemingly got it right the first time:

image

@merelcht
Copy link
Member Author

@astrojuanlu That's a shame.. it works fine in PyCharm:

Screenshot 2024-07-16 at 16 12 00

I'm fine changing the format, but I think the benefit of having them in the repo is that they can be reviewed.

merelcht added 2 commits July 16, 2024 16:27
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
@datajoely datajoely mentioned this pull request Jul 16, 2024
3 tasks
@merelcht
Copy link
Member Author

@astrojuanlu I've converted all .puml diagrams to mermaid ones. If you're happy with how it looks, I'll remove the .puml diagrams and will work on bringing these all up to date in subsequent PRs.

@astrojuanlu
Copy link
Member

I gave it a quick try and it works beautifully ✨ And the good thing is that now these could be easily embedded in our docs, wiki if needed. Go ahead!

Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
@merelcht merelcht changed the title Bring back .puml diagrams that show entrypoint flows Bring back .puml diagrams that show entrypoint flows Jul 17, 2024
@merelcht merelcht changed the title Bring back .puml diagrams that show entrypoint flows Bring back .puml diagrams that show entrypoint flows as mermaid diagrams Jul 17, 2024
@merelcht merelcht enabled auto-merge (squash) July 17, 2024 14:38
@merelcht merelcht merged commit e21e036 into main Jul 17, 2024
10 checks passed
@merelcht merelcht deleted the bring-back-puml-diagrams branch July 17, 2024 14:40
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

Successfully merging this pull request may close these issues.

3 participants