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.15k stars 36 forks source link

tach check-external module names to distribution mapping fails #414

Open nischnei opened 5 days ago

nischnei commented 5 days ago

Hi,

I'd like to use tach to check if my pyproject.toml is complete and does not have unused dependencies. However, the check-external fails for the following packages which have differing distribution and module names:

pillow
python-opencv
nuscenes-devkit
scikit_learn

It might be the issue of the packages not haveing the metadata properly defined, but then it would be nice to have an option to manually add a mapping. I want to use the check in a CI so it needs to succeed.

emdoyle commented 3 days ago

Hi @nischnei ! Could you tell me the version of Python you are using, and whether these packages are installed into the environment in which tach is running? Hopefully a quick fix is to install them so that the metadata is found, but if the metadata is not being processed correctly I'll need to take a closer look.

And I think adding config for a manual mapping makes sense, I will add a task for this and ping back here when it is ready.

nischnei commented 1 day ago

I am using Python 3.11, all packages are available in my conda environment where also tach is installed.