-
Notifications
You must be signed in to change notification settings - Fork 85
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
Versioning fails when 'CI' is 'true' #42
Comments
In your install:
- pip install numpy numpy-quaternion Try changing that to install:
- pip install numpy
- CI=false pip install numpy-quaternion That sort of thing would work in bash by just changing the value of Unfortunately, |
Thanks for a very speedy response, at least. Actually in my .travis.yml file I have a pip install . which installs my own module and its dependencies from setup.py. I could no doubt break out the dependency separately as you suggest but as you note it is not super elegant, as it removes the automatic installation that pip otherwise provides. From my point of view the obvious question is whether it is necessary to error out on CI if the git command fails. I guess that you put that in to make sure that it was working early on, but I don't see why that is a useful feature now. Not suggesting that it needs to be changed though, I can work around it as you suggest. I will close the issue for now. |
This is a legitimate problem, so I'll leave it open in case other people come looking for a way to solve it.
My answer is yes. The problem is that the CI process doesn't just test, but also uploads pip and conda packages, and those packages get their versions from this git information. Some times git does indeed fail, even now when things are generally working — usually due to subtle errors or changes in travis-ci. These particular version numbers fulfill a few requirements, including solving conda dependencies, and ensuring that data produced from my code (in which I include the version numbers of any packages I use) can be easily traced back to its origins down to the commit level. So I definitely don't want the packages going out if they can't get their version numbers. There's probably a better way to set the versions using git hooks, but it won't be easy for me to change at this point. |
reference to moble/quaternion#42
This should be fixed since b732124, which simplified the version number so that it no longer uses |
Should this work now then? |
This is still an issue @moble |
Alright, sorry that I commented on this issue. Seems like it's the same as #99 in that case. |
I have written a package and would like to use quaternion as a dependency. On my local machine I installed it fine using pip and got everything working the way I wanted to and the tests passing. Then I pushed the new code to GitHub and started a TravisCI build, which failed with errors something like this:
I am not sure but I think this might be because the auto_version assumes that if it is being installed on CI then it is being tested itself and so must be a git repo, whereas it is actually only a dependency without a repo of its own.
The text was updated successfully, but these errors were encountered: