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
1k stars 35 forks source link

Allow filtering tach report output #204

Closed emdoyle closed 1 month ago

emdoyle commented 1 month ago

Fixes #187

This introduces several CLI options to tach report:

options:
...
  -d module_path,..., --dependencies module_path,...
                        Comma separated module list of dependencies to include [includes everything by default]
  --no-deps             Do not include dependencies in the report.
  -u module_path,..., --usages module_path,...
                        Comma separated module list of usages to include [includes everything by default]
  --no-usages           Do not include usages in the report.
...

Example: tach report python/tach/filesystem -u tach.sync --dependencies tach.core would filter any usages of the module to only those within tach.sync, and would filter dependencies to children of tach.core

while tach report python/tach/filesystem --no-usages would simply show dependencies of the module, skipping the report on its usages.