-
Notifications
You must be signed in to change notification settings - Fork 344
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
Remove tests from package #1611
Conversation
I am regretting trying out hatch. Too many things to take care of. Once you have the template, it's all the same, but still... |
(I see the wheel package size of 172kiB for 2024.3.1 and 316kiB for 2024.5.0, where does "11x" come from?) |
Indeed wheel sizes are the ones you mention. I was referring to the size the package takes in The main contributors are two test cassettes inside the implementations directory. example |
I'm not sure we care about installed size, but I'm happy to hear otherwise. However, it does seem reasonable to keep the same behaviour as pre-hatch. I'll leave this open a couple of days to see if there are more opinions. |
I agree, the size shouldn't be an issue nowadays. I just mentioned it because it was what triggered me into looking more closely to this new release, wondering what could be going on to justify such a difference. |
While I don't mind removing them from wheels/installed files, Linux distributions would really appreciate tests back in sdist, since we actually run them. |
Some seem to test them anyway: #1572 Actually, the trend seems to have been to move tests out of the source directory altogether. How would one include tests in one release type and not the other? |
I suppose the simplest way would be to move tests out of package directory, e.g. into the top-level |
Note that in this PR I ended up not removing all test files, I just applied the exclusions that were in place before migrating to hatch.
Here, I applied the same rule to both [tool.hatch.build.targets.wheel]
...
[tool.hatch.build.targets.sdist]
... This way is possible to exclude all test related files from the |
OK, well I'd be happy to see further changes to satisfy package consumers, but I have no firm stance on any of this. |
Once installed, the package got ~11x bigger with the release of
2024.5.0
.I see that you are now shipping files under
tests
folders that were not included before. Going through the latest commits, I couldn't tell if this was on purpose or just overlooked with the transition to the hatch build system.In this PR I set an
exclude
rule to mimic the state of the distributed packages as they were in version2024.3.1
.I am available to discuss this further or make any adjustments.