Skip to content

[pyreverse] Filtering out specific classes from diagrams #9052

Open
@LouisDesdoigts

Description

@LouisDesdoigts

Question

Hey there, firstly pyreverse is awesome so thanks!

I just wanted some clarification on how to customise the output UML diagram from pyreverse. Essentially I'm automatically generating a UML diagram for each class in my software to be hosted in the docs. There are a few things that I would like to remove from the diagrams.

Here is an example diagram from my software, generating by running pyreverse -c dLux.layers.optical_layers.Tilt -o html --colorized dLux
Screenshot 2023-09-19 at 8 24 04 pm

I have a few things that I would like to change about this.

  1. How can I remove the 'has a' that adds the 'Array' class to the diagram. This is just not useful information for my purposes. Is there a way in general to only show parent classes and not other classes that are held by it?
  2. Some classes have their attributes doubled. In this example the 'angles' attribute is displayed twice. What would be the reason for this, and how can I avoid this?
  3. Every class in my software inherits from a class called Base in an external package. Is there a way to only display class inheritance inside of my software?

I've had a look through the options and had a play with different arguments but can't seem to make any headway. Any help is greatly appreciated!

Documentation for future user

Inside the main pyreverse docs page.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions