ribolands/syswraps.py
def check_version(program, rv):
    """ Check if the version of an installed program meets minimum requirements.

    Args:
        program (str): executable
        rv (str): requested version number

    Raises:
        VersionError: if version is less than the requested version.

    Returns:
        None: If everything is ok.
    """
    if which(program) is None:
        if 'treekin' in program:
            raise ExecError(program, "treekin", 
                            'https://www.tbi.univie.ac.at/RNA/Treekin')
        elif 'barries' in program:
            raise ExecError(program, "barriers",
                            'https://www.tbi.univie.ac.at/RNA/Barriers')
        elif 'RNAsubopt' in program:
            raise ExecError(program, "RNAsubopt",
                            'https://www.tbi.univie.ac.at/RNA')
        elif 'Kinfold' in program:
            raise ExecError(program, "Kinfold",
                            'https://www.tbi.univie.ac.at/RNA')
        else:
            raise ExecError(program)
    p, pv = sub.check_output([program, '--version']).split()
    pv = pv.decode()
    if version.parse(pv) < version.parse(rv):
        raise VersionError(program, pv, rv)
    return None
 Check if the version of an installed program meets minimum requirements.

    Args:
        program (str): executable
        rv (str): requested version number

    Raises:
        VersionError: if version is less than the requested version.

    Returns:
        None: If everything is ok.
    
Check if the version of an installed program meets minimum requirements.
Check if the version of an installed program meets minimum requirements .
def check_version(program, rv):
    if which(program) is None:
        if 'treekin' in program:
            raise ExecError(program, "treekin", 
                            'https://www.tbi.univie.ac.at/RNA/Treekin')
        elif 'barries' in program:
            raise ExecError(program, "barriers",
                            'https://www.tbi.univie.ac.at/RNA/Barriers')
        elif 'RNAsubopt' in program:
            raise ExecError(program, "RNAsubopt",
                            'https://www.tbi.univie.ac.at/RNA')
        elif 'Kinfold' in program:
            raise ExecError(program, "Kinfold",
                            'https://www.tbi.univie.ac.at/RNA')
        else:
            raise ExecError(program)
    p, pv = sub.check_output([program, '--version']).split()
    pv = pv.decode()
    if version.parse(pv) < version.parse(rv):
        raise VersionError(program, pv, rv)
    return None
def check_version ( program , rv ) : if which ( program ) is None : if 'treekin' in program : raise ExecError ( program , "treekin" , 'https://www.tbi.univie.ac.at/RNA/Treekin' ) elif 'barries' in program : raise ExecError ( program , "barriers" , 'https://www.tbi.univie.ac.at/RNA/Barriers' ) elif 'RNAsubopt' in program : raise ExecError ( program , "RNAsubopt" , 'https://www.tbi.univie.ac.at/RNA' ) elif 'Kinfold' in program : raise ExecError ( program , "Kinfold" , 'https://www.tbi.univie.ac.at/RNA' ) else : raise ExecError ( program ) p , pv = sub . check_output ( [ program , '--version' ] ) . split ( ) pv = pv . decode ( ) if version . parse ( pv ) < version . parse ( rv ) : raise VersionError ( program , pv , rv ) return None
Check if the version of an installed program meets minimum requirements.
Check if the version of an installed program meets minimum requirements .
""" Check if the version of an installed program meets minimum requirements.

    Args:
        program (str): executable
        rv (str): requested version number

    Raises:
        VersionError: if version is less than the requested version.

    Returns:
        None: If everything is ok.
    """
If everything is ok.
If everything is ok .
None
if version is less than the requested version.
if version is less than the requested version .
VersionError
program
None
rv
requested version number
requested version number