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
integrate Versioneer #263
integrate Versioneer #263
Conversation
I only glanced over it but this looks... really complicated. Do we really need something like this to solve this problem? Are there no simpler solutions that satisfy our needs? |
I'd say: Does this problem that we're trying to solve here really exist? I'm totally fine with versions out of Git just having a ".dev" at the end. That's always worked fine for me. It's easy enough to ask people to run Btw, here's how I set |
@benanne there is a simpler alternative here https://github.com/clearclaw/pyver but it's GPL, not public domain. However, while this looks complicated since the source is embedded, the actual setup only took 10 minutes and I doubt it would ever need to be touched again. @dnouri given the number of users that don't even know if they're using nolearn or lasagne, I think anything that makes it simpler to get information is good. Many people's knowledge of git ends at Also, this makes one less thing to remember when creating a release. Somewhat OT, but do you really think people are going to mainly use release versions? It seems like Lasagne's intended audience will want the cutting edge. |
I think it's a bit iffy to copy and paste a bunch of code into the library like that though, updating it will be a mess. It adds a lot of complexity to the codebase for something I consider of fairly minor importance, hence my reservations. Of course you could argue that this is somewhat separate from the main code base, but it's still hundreds of lines of Python sitting in our repo :)
That is a good point. I think the situation will be somewhat similar to Theano, where most casual users probably use a release but the most active contingent of the user base will use master from git. |
The big files are autogenerated by the versioneer setup script, I would say it's more like adding something to You're right though, it does add a lot of lines for something pretty minor. I felt this was less work and less brittle than hacking something similar together ourselves, but like @dnouri says, this problem may not really need solving. |
Regarding @dnouri's comment from the original thread:
Nope, at runtime. I want to be able to write code that works on different versions of (bleeding-edge) Lasagne. That would also make it easier to keep bleeding-edge
That's exactly what versioneer solves. Quoting their README:
So I could add a check like Eben said:
:)
That's what I thought as well. We could try to "release early, release often", but we probably don't want to do that after every single feature we add. Sander said:
I don't think the |
They do, but it only works if you |
Another argument - if someone installs from git then deletes the source, or uses Most of the time the advice will be "install the latest github version", but if someone does encounter a real bug, it would be nice if we could determine what code they were running. |
Perhaps this would be more suitable? https://github.com/ioam/param/blob/master/param/version.py It requires manually updating the version string for each release, but it's a lot simpler and still provides revision information. |
Which they sell as as a feature. They check whether the declared version in
Even for git archives, it seems. Not sure if that would include all the We're getting closer... I'd still very much like a Oh, and by the way, another reason for having a descriptive |
The problem with doing a runtime check is that it's too late. At
The issue with keeping nolearn in sync with Lasagne is that the latter
It seems contradictory that on the one hand you're using "bleeding
Still a big -1 from me for any of this (IMO) overcomplicated versions |
Let's say I've got Lasagne installed with
You can also be compatible with multiple versions via a
Say what?! :) No, that's not what I was implying. It's enough that in our target audience, there will always be someone who wants the new feature we just added (say, some idea from a recent paper), so there will always be users that will use a version of Lasasgne between releases. And it wouldn't be bad to have
Yes, I've sensed that :) Soo... I don't feel that strongly about pep440-style versions, I just thought they'd be very nice to have. If the majority is against it, we can just have a fixed |
Plenty of other projects do something similar, including numpy, scipy and Theano. |
Oops, clicked close by accident. Anyway, I don't really get why this is considered complicated. It's developed by an active external project, was simple to configure and works as advertised. And if it does break, what real harm does it do? |
it adds a ton of code for a relatively minor feature, that's my main concern. Other than that I'm not really bothered by whatever versioning scheme we end up using. If it was only |
With something like this in place, nolearn could check on import that the user had a known good Lasagne commit and throw an exception or warning otherwise. Lasagne has gone from zero to a pretty featureful library without a single release, I just have a hard time imagining the schedule will change any time soon. Honestly I don't think the traditional release model is that useful for a project like this which is used more for experimenting than building production systems. |
I think most people who use it in combination with nolearn would prefer to stick with a released version though. They may not be the primary target audience but I still think putting out some releases now and then would be a good thing to do. As I mentioned before I see it a little bit like the Theano situation, where there are sporadic releases but the most active part of the user base uses master from git. |
But not the largest part. I was dumbfounded to see how many of my colleagues were using Theano 0.6.0 just because nobody had told them otherwise. We might want to encourage users to use the latest master in our installation instructions even after we have a release, or at least make it sound less scary than in the Theano instructions. |
Jan writes:
This is what Sander's team writes in their ndsb docs:
If they said "at least f445b71", their instructions would likely stop
pip freeze should help with writing the requirements file. It allows
And then in setup.py follow pep440, where proper release version Eben writes:
That's correct. Though it also means this user ignored the |
Yes, sorry, I meant using the local version identifier to include the number of commits and commit SHA1 for versions in between releases, as in the
Hmm, given that I should also record the version of Theano, probably that's the cleanest way. However, if I rely on Theano not changing in incompatible ways and
So we should change that in our current
👍
The world isn't perfect. Even with updated documentation, people will use whatever version they have installed, and report bugs. We should provide an easy way for them to let us know which version they have installed. So... until we can find a simpler "versioneer" variant (the one from |
Are we doing |
What about copying the revelant bits from Theano? It looks like basically the same thing used by numpy and scipy. |
That only sets the version to whatever you had when running
No, |
I guess we've decided not to do this for now? It's superseded by #272, right? Or did I misunderstand that? If it is I'll close it. |
This adds Versioneer to automatically set
lasagne.__version__
based on the git tag and commit.If merged, should also create a tag
git tag 0.1-dev
or similar.