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

[FEATURE] Autogenerate class/module diagrams for Python #695

Open
7 tasks
mgovers opened this issue Aug 16, 2024 · 3 comments
Open
7 tasks

[FEATURE] Autogenerate class/module diagrams for Python #695

mgovers opened this issue Aug 16, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation good first issue Indicates a good issue for first-time contributors

Comments

@mgovers
Copy link
Member

mgovers commented Aug 16, 2024

Use pyreverse (distributed together with pylint by default) to create module graph and class diagram

Relates to #749 and #525

@mgovers mgovers added documentation Improvements or additions to documentation good first issue Indicates a good issue for first-time contributors labels Aug 16, 2024
@emabre
Copy link

emabre commented Nov 29, 2024

Hi, I would like to begin contributing to this project and this issue seems to be a good candidate to start with. Is this issue still needed and up to date?

If it's needed, a couple of questions on the diagrams:

  • I noticed that the diagram of the classes that gets generated by pyreverse is very crowded. Should I prune it or hide some details somehow? See the images that I attached (I know there are some things to fix in those diagrams, it's just to give an idea).
  • What format should be used for the diagrams, I guess SVG, right?

Classes diagram:
classes

Module diagram
packages

Thanks

@mgovers
Copy link
Member Author

mgovers commented Nov 29, 2024

Hi @emabre ,

Great to hear you are willing to pick this up!

Is this issue still needed and up to date?

The issue still seems to be up-to-date, indeed. I will make some decisions on where in the docs to add the graph and update the description.

I noticed that the diagram of the classes that gets generated by pyreverse is very crowded. Should I prune it or hide some details somehow? See the images that I attached (I know there are some things to fix in those diagrams, it's just to give an idea).

I think pruning is a good idea. There are multiple ways to do that (e.g., splitting up into smaller diagrams, removing details, ...). Any improvement is already a huge one, so I will leave that up to you. If you prefer, you can also send an email to martijn.govers@alliander.com, and we can briefly talk about the options)

What format should be used for the diagrams, I guess SVG, right?

I also think that SVG is indeed the way to go, but I am not an expert on this. Note that we already have some graphs embedded into the docs using mermaid (see, e.g., https://power-grid-model.readthedocs.io/en/stable/advanced_documentation/core-design.html#calculation-logic-and-data-flow), but those are not auto-generated. Using SVG, you can embed the graph as an image, but if you have a better way of doing that, we are also open to input.

Hope that helps! If you have any other questions, feel free to ask them here, on a draft PR, or otherwise contact me directly via martijn.govers@alliander.com

Martijn

@emabre
Copy link

emabre commented Nov 30, 2024

@mgovers thank you very much for your reply. I'll reach out in case I have further questions.
Thanks,
Ema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Indicates a good issue for first-time contributors
Projects
Status: No status
Development

No branches or pull requests

2 participants