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

better info on the graph: parent module #5

Open
chrishavlin opened this issue Jan 13, 2023 · 2 comments
Open

better info on the graph: parent module #5

chrishavlin opened this issue Jan 13, 2023 · 2 comments

Comments

@chrishavlin
Copy link
Collaborator

chrishavlin commented Jan 13, 2023

Improved pop-up tooltips with more than classnames would be cool. possible? maybe?

For the method being tracked, link to code lines?

@chrishavlin chrishavlin changed the title better labels on the graph (pop up tooltips?) better info on the graph? Jan 13, 2023
@chrishavlin
Copy link
Collaborator Author

Should definitely add some way to distinguish the parent package of any subclasses. The scope of traversals includes any packages imported in the current python session, so you can actually get graphs including classes from different packages. e.g., if you map defaultdict after importing yt you get all of yt's custom defaultdict children! Currently the graph does not distinguish parent packages though, so it's not immediately obvious.

@chrishavlin
Copy link
Collaborator Author

Illustrating the previous comment:

from inheritance_explorer import ClassGraphTree
from collections import defaultdict
cgt = ClassGraphTree(defaultdict)
cgt.show_graph()

results in

Screenshot from 2023-01-18 09-12-06

and re-mapping after importing yt:

import yt
cgt = ClassGraphTree(defaultdict)
cgt.show_graph()

you now get:

Screenshot from 2023-01-18 09-13-46

So adding info on where the classes come from would be super helpful here. And would also be easy to add a keyword argument to ClassGraphTree to pass in a whitelist of parent packages to include (or packages to exclude).

@chrishavlin chrishavlin changed the title better info on the graph? better info on the graph: parent module Jan 18, 2023
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

No branches or pull requests

1 participant