-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve pyreverse documentation #10063
Merged
DanielNoord
merged 7 commits into
pylint-dev:main
from
Julfried:restructure-documentation
Nov 11, 2024
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
49be51e
restructure pyreverse documentation
Julfried 5a8aec3
Merge remote-tracking branch 'origin/main' into restructure-documentaβ¦
Pierre-Sassoulas 124e72d
[doc pyreverse] Add a level for creating a class diagram
Pierre-Sassoulas 52a263a
[doc] Reoganization/clarification of the pyreverse doc
Pierre-Sassoulas 18ee1c3
work in progress more depth
Pierre-Sassoulas 7ea4d45
different solution for depth issue
Julfried 9891da4
also beautify pyreverse main page
Julfried 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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Example Output | ||
############## | ||
|
||
Example diagrams generated with the ``.puml`` output format are shown below. | ||
|
||
Package Diagram | ||
............... | ||
|
||
.. image:: ../../media/pyreverse_example_packages.png | ||
:width: 344 | ||
:height: 177 | ||
:alt: Package diagram generated by pyreverse | ||
:align: center | ||
|
||
Class Diagram | ||
............. | ||
|
||
.. image:: ../../media/pyreverse_example_classes.png | ||
:width: 625 | ||
:height: 589 | ||
:alt: Class diagram generated by pyreverse | ||
:align: center | ||
|
||
Creating Class Diagrams for Specific Classes | ||
'''''''''''''''''''''''''''''''''''''''''''' | ||
|
||
In many cases creating a single diagram depicting all classes in the project yields a rather unwieldy, giant diagram. | ||
While limiting the input path to a single package or module can already help greatly to narrow down the scope, the ``-c`` option | ||
provides another way to create a class diagram focusing on a single class and its collaborators. | ||
For example, running:: | ||
|
||
pyreverse -ASmy -c pylint.checkers.classes.ClassChecker pylint | ||
|
||
will generate the full class and package diagrams for ``pylint``, but will additionally generate a file ``pylint.checkers.classes.ClassChecker.dot``: | ||
|
||
.. image:: ../../media/ClassChecker_diagram.png | ||
:width: 757 | ||
:height: 1452 | ||
:alt: Package diagram generated by pyreverse | ||
:align: center |
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
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.
Shouldn't we tweak this?
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'm trying to currently, we managed to do it for the dev guide so I should be able to.
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.
This is surprisingly hard. Might have to change the headings underline again.
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 have a possible solution that fixes both the heading hierarchy and improves the documentation readability. Would you like me to create a commit with these changes?
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.
Sure @Julfried, thank you for proposing (I tried to increase maxdepth without success)
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.
Here is my idea. One thing I noticed: this table of contents collapses when the window is narrow on smaller screens. Maybe this could be fixed in the theme settings. What do you think?