add ability to get versioning information #297

Closed
rcurtin opened this Issue Dec 29, 2014 · 4 comments

Projects

None yet

2 participants

@rcurtin
Member
rcurtin commented Dec 29, 2014

Reported by rcurtin on 2 Aug 43865191 17:46 UTC

On Mon, Nov 11, 2013 at 12:31:10PM +0100, Giampaolo Bellini wrote:
> Dear all
> 
>   I'm using latest mlpack on linux for neighbor search
> 
>   I wonder if there is a way to retrieve the library version in order to
> show it in the about box of my application...
> 
>      thanks a lot
> 
>              Giampaolo

There are two things we should do here.

  • add a --version option to each mlpack executable (in cli.hpp or similar)
  • add a C++ function that will return a string containing the version of mlpack

There's a bit more, though; a subversion post-commit hook will need to be added to update the definition of the version string, so that it will look something like 'r15886' instead of just 'trunk' if trunk is being used.

@rcurtin rcurtin self-assigned this Dec 29, 2014
@rcurtin rcurtin added this to the mlpack 1.0.8 milestone Dec 29, 2014
@rcurtin rcurtin closed this Dec 29, 2014
@rcurtin
Member
rcurtin commented Dec 30, 2014

Commented by rcurtin on 4 Jun 43995151 03:04 UTC
--version option and C++ function mlpack::util::GetVersion() added in r16090. A post-commit hook is not the right way to update that, though; a better idea is to use CMake+svn at build time to see if the source directory is a repository, and if so, update what GetVersion() returns.

@rcurtin
Member
rcurtin commented Dec 30, 2014

Commented by rcurtin on 15 Jan 44010475 23:04 UTC
Fixed as of r16105. Maybe we should use svnversion instead of svn info though.

@zoq
Member
zoq commented Jan 8, 2015

Since we switched from svn to git (github) the GetVersion() function doesn't work anymore.

The following files are used to get the version that need to be updated:

  • mlpack/CMakeLists.txt
  • mlpack/src/mlpack/core/util/version.cpp
  • mlpack/CMake/CreateSVNVersionHeader.cmake

For now, Ryan implemented a temporary workaround to fix the problem in 61a1064 which creates the version string 1.x.x.

@zoq zoq reopened this Jan 8, 2015
@rcurtin rcurtin removed their assignment Jan 9, 2015
@rcurtin
Member
rcurtin commented Mar 30, 2015

Fixed in 15c5546.

@rcurtin rcurtin closed this Mar 30, 2015
@rcurtin rcurtin added the R: fixed label Mar 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment