Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude tests packages from distribution #646

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

shawnz
Copy link
Contributor

@shawnz shawnz commented Feb 21, 2024

Fixes #618

This change adds tests and tests.* to the exclude parameter of find_packages. Previously, installing guidance would also create an unexpected tests subdirectory in the user's site-packages directory, which can cause issues if the user has their own package also named tests.

I validated this change with the following:

python3 -m venv .venv
source .venv/bin/activate
pip install .[test]

and verified that .venv/lib/python3.10/site-packages did not contain a tests subdirectory. Furthermore, I verified that running pytest still works as expected after the change

@Harsha-Nori
Copy link
Collaborator

I think this seems totally reasonable. Thanks for digging into and patching this up @shawnz!

@Harsha-Nori Harsha-Nori merged commit 42bb710 into guidance-ai:main Feb 21, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests package installed with guidance
2 participants