Skip to content
TheChatArchiveThe Chat Archive
Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)Hugging Face OpenAssistant Conversations (oasst2)

I have a codebase in Python. There are many classes and complex hierarchies. I need a…

In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
  1. User

    I have a codebase in Python. There are many classes and complex hierarchies. I need a tool that can automatically generate a dependency graph for me. For example, it should generate an image that shows using arrows what classes are connected via composition or inheritance. Could you please recommend a few tools for that?

  2. Assistant

    You can use the command pyreverse which is included with the pylint package:

    $ pip install pylint
    $ pyreverse [options] <packages>
    

    For example, this command will output a pdf class diagram called classes.pdf for a python package called example:

    $ pyreverse -o pdf example
    

    More documentation on pyreverse can be found here: https://pylint.readthedocs.io/en/latest/pyreverse.html

  3. User

    Besides pyreverse, what other tools does the pylint package contain?

  4. Assistant

    The other package that pylint contains is symilar, which is a duplicate code finder.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.