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

add ability to get versioning information #297

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

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

This comment has been minimized.

Show comment
Hide comment
@rcurtin

rcurtin Dec 30, 2014

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@rcurtin

rcurtin Dec 30, 2014

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@zoq

zoq Jan 8, 2015

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@rcurtin

rcurtin Mar 30, 2015

Member

Fixed in 15c5546.

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