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

Let users select nodes to exclude from the generated graph #39

Open
glocq opened this issue Sep 25, 2024 · 2 comments
Open

Let users select nodes to exclude from the generated graph #39

glocq opened this issue Sep 25, 2024 · 2 comments

Comments

@glocq
Copy link

glocq commented Sep 25, 2024

  • The option --exclude lets me exclude modules
  • The options --forward-root and --reverse-root let me selectively include nodes and their direct/reverse dependencies.

As far as I know, there is no option that would allow me to selectively exclude nodes, i.e. display all nodes but those I manually excluded. Am I right? If so, could such an option be added?

My use case: I am trying to make sense of a messy module. The module features a couple of utility functions used a lot, which clutter the graph with arrows that come from everywhere, and whose role I understand well anyway.

Using --exports-only would hide those, but also a number of functions which are not exported, but are still part of the meat of the module, i.e. they are more than just utility functions and I need Calligraphy's help to understand their exact role.

@jonascarpay
Copy link
Owner

This is currently not supported, but adding a name-based filter to the NodeFilter phase should only take a few lines. PR's welcome.

As a potentially better solution I'm imagining changing the dependency filtering to have rsync-style chained forward/backward include/exclude rules, but that would be a much more significant change.

@glocq
Copy link
Author

glocq commented Sep 26, 2024

Ok, thank you for pointing me to the relevant lines, I'll look into it when I have some time.

I am not familiar with rsync, so I don't understand what you have in mind for the more significant change, though I understand the benefits that a more flexible system would bring.

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

2 participants