adversarial-robustness-toolbox icon indicating copy to clipboard operation
adversarial-robustness-toolbox copied to clipboard

Package installs 'tests' module into site-packages causing namespace pollution

Open Adam-D-Lewis opened this issue 6 months ago • 2 comments

Hi, I noticed your package is currently installing its tests directory into site-packages, which creates a global 'tests' module that can be imported from anywhere. This is considered a packaging antipattern as it can cause namespace collisions.

Steps to reproduce:

  1. Install your package
  2. Run Python interpreter
  3. import tests works and points to your package's tests

Could you modify your package configuration to exclude the tests directory from installation? In your setup.py this can be done with

packages = find_packages(exclude=["tests", "tests.*"])

Adam-D-Lewis avatar Apr 03 '25 22:04 Adam-D-Lewis