def get_qiime_library_version():
 qiime_dir = get_qiime_project_dir()
 qiime_version = qiime_library_version
 sha_cmd = ('git --git-dir %s/.git rev-parse HEAD' % qiime_dir)
 (sha_o, sha_e, sha_r) = qiime_system_call(sha_cmd)
 git_sha = sha_o.strip()
 branch_cmd = ('git --git-dir %s/.git rev-parse --abbrev-ref HEAD' % qiime_dir)
 (branch_o, branch_e, branch_r) = qiime_system_call(branch_cmd)
 git_branch = branch_o.strip()
 if (is_valid_git_refname(git_branch) and is_valid_git_sha1(git_sha)):
  return ('%s, %s@%s' % (__version__, git_branch, git_sha[0:7]))
 else:
  return ('%s' % __version__)

def get_qiime_library_version ( ) : qiime_dir = get_qiime_project_dir ( ) qiime_version = qiime_library_version sha_cmd = ( 'git --git-dir %s/.git rev-parse HEAD' % qiime_dir ) ( sha_o , sha_e , sha_r ) = qiime_system_call ( sha_cmd ) git_sha = sha_o . strip ( ) branch_cmd = ( 'git --git-dir %s/.git rev-parse --abbrev-ref HEAD' % qiime_dir ) ( branch_o , branch_e , branch_r ) = qiime_system_call ( branch_cmd ) git_branch = branch_o . strip ( ) if ( is_valid_git_refname ( git_branch ) and is_valid_git_sha1 ( git_sha ) ) : return ( '%s, %s@%s' % ( __version__ , git_branch , git_sha [ 0 : 7 ] ) ) else : return ( '%s' % __version__ )
get qiime version and the git sha + current branch .