-
Notifications
You must be signed in to change notification settings - Fork 301
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
Use uv #504
Use uv #504
Conversation
Please correct the issue link in the description above - this is issue #501, not #57. It looks like the "uv pip install" command in
I'm not familiar with uv so I'm not sure exactly what this should be doing instead. |
As for hatchling versus poetry: a big difference is that hatchling includes the test suite and example data into the source distribution ( I'm not sure what to do. On the one hand, we probably ought to be including the test suite in the source distribution. On the other hand, the current test suite is vastly larger than it needs to be. Also, since hatchling will include all files from the working directory (except those ignored by |
Regarding hatchling, you don't have to change the behavior if you don't want to, it just has different defaults. However, you can manually exclude tests and whatever else you don't want (by default, it ignores everything in |
I agree that it would be best to exclude tests from the distribution. I haven't looked, but if doing this we should check where the examples in https://github.com/MIT-LCP/wfdb-python/blob/main/demo.ipynb are getting their data. e.g. is The package has - or at least used to have - odd behavior around downloading data. It would go off to the internet to download data without being explicitly asked to do so. |
Let's not include the tests (or sample data or demos) in the sdist, then. In my experience (having worked with a lot of different build systems, just not in Python) it is better to define what files should go into the package rather than what files shouldn't. I think it's probably best to do that by defining explicit "include" patterns in pyproject.toml. |
OK, so I had to bump Python to >= 3.8, because many packages are not available for 3.7 anymore. I suggest bumping to >= 3.9, because 3.8 is already EOL (https://devguide.python.org/versions/). Of course, support for 3.12 and 3.13 would be nice, but this requires NumPy >= 2, which will hopefully be supported soon. I excluded the I've also removed the need to sync the version in two different places; now it is only available in I still have to update the developers guide and will include the note on the importance of cleaning the repository before building. I also have to find out how to set up API tokens for PyPI with uv. |
This looks good to me.
@bemoody my preference would be to merge this pull request, then deal with includes in a later change. |
Fixes #501.
To do:
uv pip ...
, but I think this should be replaced withuv run ...