-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
It looks like your package distribution currently includes modules that should not be part of the public release, such as tests, assets, frontend,...
For example, in a Colab notebook you can directly import and run tests:
- Open a Colab notebook
- Execute:
In [1]: from tests import conversion_test
In [2]: conversion_test.__doc__
Out[2]: 'This module tests the conversion file in `spanner_graph/conversion.py`\n'
In [3]: !ls /usr/local/lib/python3.12/dist-packages/tests
Out[3]:
cloud_database_test.py magics_test.py server_test.py
conversion_test.py node_expansion_test.py test_notebook.json
graph_entities_test.py __pycache__ tox-plugin
graph_server_test.py sample_notebook_test.py
__init__.py schema_manager_test.py
In [4]: !ls /usr/local/lib/python3.12/dist-packages/assets
Out[4]:
authentication.png full_viz.png load_ext.png
colab_usage.gif jupyter.gif sample_jupyter.png
In [5]: !ls /usr/local/lib/python3.12/dist-packages/frontend
Out[5]:
babel.config.js jest-puppeteer.config.js README.md static tsconfig.json
jest.config.js package.json src testsThis indicates that those directories (like tests) are being packaged and distributed, which is not intended behavior.
Why this is problematic
- Package bloat: Unnecessary files increase the size of the distribution.
- Namespace conflicts: For example, using a top-level
testspackage can shadow or conflict with users’ owntestsmodules. - Exposure of internal code: Test modules are meant for development and CI, not for end users.
- Maintenance risks: Users might rely on internal test utilities that are not part of the public API and may change or be removed without notice.
Suggested fix
Update the packaging configuration to explicitly exclude development-only files and directories (like tests/) from the distribution.
Metadata
Metadata
Assignees
Labels
No labels