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 test suite from source distribution #212

Closed
hakonanes opened this issue May 7, 2024 · 4 comments
Closed

Exclude test suite from source distribution #212

hakonanes opened this issue May 7, 2024 · 4 comments
Labels

Comments

@hakonanes
Copy link
Member

Currently, tests are included in the source distribution on PyPI (https://pypi.org/project/diffsims/#files). This way, users can run the test suite by doing

> pip install diffsims pytest
> pytest --pyargs diffsims

We may introduce a 125 kB NumPy array file in #205. This will take the distribution size from 946 kB -> 1071 kB.

I don't know, but I doubt there are many people running diffsims' test suite this way. I suggest to exclude the test suite from the source distribution. Interested to hear other's thoughts.

@hakonanes hakonanes added the dev label May 7, 2024
@hakonanes hakonanes mentioned this issue May 7, 2024
7 tasks
@CSSFrancis
Copy link
Member

+1

@hakonanes
Copy link
Member Author

I've taken a U-turn and now suggest to leave the tests in the source distribution. Even though the distribution size increases. Are you still fine with that, @CSSFrancis?

Whether this is a good idea or not is an open question. The general consensus among CPython core developers (https://discuss.python.org/t/should-sdists-include-docs-and-tests/14578/25, top hit on my internet search) seems to be that being able to run tests from the source distribution is a good idea.

@hakonanes
Copy link
Member Author

For future reference, this is one way of excluding tests from the sdist:

  • Add a line prune diffsims/tests to our MANIFEST.in file
  • Add a line diffsims/tests/** to known_excludes in our setup.cfg file to make manifix happy

@CSSFrancis
Copy link
Member

@hakonanes yea, that works for me!

@hakonanes hakonanes closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants