gauge-sh / tach

A Python tool to enforce dependencies, using modular architecture 🌎 Open source 🐍 Installable via pip πŸ”§ Able to be adopted incrementally - ⚑ Implemented with no runtime impact ♾️ Interoperable with your existing systems πŸ¦€ Written in rust
https://gauge.sh
MIT License
1.09k stars 35 forks source link

Add filter options to tach show #322

Closed nip3o closed 1 month ago

nip3o commented 1 month ago

For large projects with loads of cross-dependencies, the dependency graph generated with tach show might be too large and complicated to be readable. It would be useful to filter the graph to only include certain modules in the same way as you can do with tach report.

emdoyle commented 1 month ago

This makes sense, I think the most straightforward implementation might be an --include flag which takes multiple module paths. Accepting filesystem paths like tach report might be a bit less intuitive as a user, since the resulting graph wouldn't necessarily have a node that corresponds to the path (if it contains multiple modules defined in tach.toml for example). Would that work for you?

tach show --web -i tach.core -i tach.errors

-- OR --

tach show --web --include tach.core,tach.errors
nip3o commented 1 month ago

Yes, I think that makes sense!

emdoyle commented 1 month ago

@nip3o I ended up going with an interface much more similar to tach report, like you initially described. Let me know if it works as expected!