SciLifeLab / bcbb

Useful bioinformatics code, primarily in Python and R
http://bcbio.wordpress.com
10 stars 11 forks source link

Pipeline versioning #264

Closed guillermo-carrasco closed 11 years ago

guillermo-carrasco commented 11 years ago

Use of git describeto version the pipeline. I've created the first 1.0 tag.

brainstorm commented 11 years ago

Thanks much @guillermo-carrasco, that's a very nice practice to have for our software :)

@chapmanb, @roryk, that's maybe something you guys would like to use?

chapmanb commented 11 years ago

Roman and Guillermo; Nice idea, I'd love to add git hashes into the version information. The only issue I see is that requires setup.py is run inside a git repository, which won't be true if using pip or other install mechanisms. It would also be cool to have this available for import inside an installed library so programs can query the installed version. What I'd like to do is fill in a variable using a git hook every time we commit. I looked at this a bit, but couldn't figure out the magic to make it happen yet.

guillermo-carrasco commented 11 years ago

Hi @chapmanb ,

What you say is true. Maybe you're looking for something like this? Here they use a script to create a file RELEASE-VERSION. This file can be automatically updated with git describe, like we do in setup.py, and pushed together with the rest of the code. The pipeline could check this file to know the version and, as it will be included in the python package, it will work with pip or other mechanisms.

What do you think?

chapmanb commented 11 years ago

Guillermo; That sounds great. Ideally we could create a version file when setup.py is run, using a hand edited version in bcbio/pipeline/version and the git hash if it's installed from a git repository. Then you could install this with the egg and import and query it from external programs. Practically I've been solving this by pushing regular releases (https://github.com/chapmanb/bcbio-nextgen/tags) and not expecting folks to work from the development repository so often.

brainstorm commented 11 years ago

Gotcha @chapmanb, this commit brings our worlds together:

https://github.com/SciLifeLab/bcbb/commit/85dc083e84706b2

Hope that helps!

brainstorm commented 11 years ago

@chapmanb, @guillermo-carrasco now fixed in https://github.com/brainstorm/bcbb/commit/930cfca5bb53651c