quantopian / alphalens

Performance analysis of predictive (alpha) stock factors
http://quantopian.github.io/alphalens
Apache License 2.0
3.18k stars 1.12k forks source link

Bad version labeling for released package #373

Open jsmidt opened 4 years ago

jsmidt commented 4 years ago

Problem Description

If I install the latest release of alphalens:

wget https://github.com/quantopian/alphalens/archive/0.4.0.tar.gz
tar -xf 0.4.0.tar.gz
cd alphalens-0.4.0
python setup.py build
sudo python setup.py install

Then look at the version number

python
import alphalens
print (alphalens.__version__)

I get: 0+unknown

Furthermore checking the actual install:

ls /usr/lib/python3.8/site-packages/alphalens-*

Gives: /usr/lib/python3.8/site-packages/alphalens-0+unknown-py3.8.egg

In both cases the version number shows "0+unknown" instead of "0.4.0". This will be a problem if for any reason a python package depends on version 0.4.0 or greater.

Versions

eigenfoo commented 4 years ago

Alphalens uses versioneer to pull release tags from git tags. Right now it's set up to expect a git tag v0.4.0, but the latest tag is just 0.4.0. Could that be it?

cc @richafrank @dmichalowicz

dmichalowicz commented 4 years ago

The missing v appeared to be the problem, I just pushed a new tag. @jsmidt mind trying it out again?

jsmidt commented 4 years ago

Yes, this resolved the problem:

ls /usr/lib/python3.8/site-packages/alphalens-*
/usr/lib/python3.8/site-packages/alphalens-0.4.0-py3.8.egg

Thanks!