eFEL icon indicating copy to clipboard operation
eFEL copied to clipboard

please include tests in pypi source tars

Open sanjayankur31 opened this issue 5 years ago • 2 comments

Hello,

Would it please be possible to include the tests in the pypi tars so that downstream users (like us Linux distributions) can run the tests too?

Because versioneer is used here, a few issues crop up:

  • it is non-trivial to match pypi releases to untagged github commits,
  • if one does manage to locate the matching commit, versioneer cannot generate version information from github generated archives (see https://github.com/warner/python-versioneer/issues/140#issuecomment-292746426)

So, including the tests in the pypi tars will simplify things quite a bit for those of us who rely on the pypi tar.

Cheers,

sanjayankur31 avatar Aug 28 '20 18:08 sanjayankur31

Until now I've been fairly reluctant to add the test to the package, since the tests contain sample traces, which can be come fairly big. At the moment the test directory is 95% of the size of the repo. If I include them the package will become something like 15 MB big.

About matching the version with git commits. Can you use python to get this info? Because the exact commit hash is actually store in efel/_version.py of the tarball, and can be retrieved using python.

wvangeit avatar Aug 31 '20 07:08 wvangeit

Yes, I understand that---it's quite a common setup. It's just that versioneer doesn't work well with non-tag releases.

To download the corresponding commit tar from Github for a pypi release (that is not made from a corresponding git release) one has to:

  • first download the pypi tar
  • untar it, get hash from the version file
  • clone the github repo,
  • checkout that commit
  • generate a tar using git archive.

that's doable, but you can see how it's a lot of extra work for something as simple as getting a corresponding source tar to a released version of code. Otherwise, if one simply downloads from Github, there's no version information. It'll say "unknown+0". Lots of folks are seeing similar issues but no real progress has been made on a workaround/fix:

https://github.com/warner/python-versioneer/issues/199

I brought this up on the fedora-devel list to see what other folks were doing here. One of the Fedora Python maintainers replied. In short:

  • versioneer is no longer being maintained (the most recent commit was from 2017)
  • if possible, folks should consider using setuptools_scm instead: https://github.com/pypa/setuptools_scm/

For the time being, I'll go through all the steps to generate a github tar and in the future we'll stick to git tagged releases only. That'll mean users don't always get the latest fixes that each patch release includes, but given that each git commit results in a pypi patch release, I don't think that'll be an issue.

sanjayankur31 avatar Sep 01 '20 10:09 sanjayankur31