Returns a string with version information.

    You would call this function if you want a string giving detailed information
    on the version of ``phydms`` and the associated packages that it uses.
187350
def Versions():
    
    s = [\
            'Version information:',
            '\tTime and date: %s' % time.asctime(),
            '\tPlatform: %s' % platform.platform(),
            '\tPython version: %s' % sys.version.replace('\n', ' '),
            '\tphydms version: %s' % phydmslib.__version__,
            ]
    for modname in ['Bio', 'cython', 'numpy', 'scipy', 'matplotlib',
            'natsort', 'sympy', 'six', 'pandas', 'pyvolve', 'statsmodels',
            'weblogolib', 'PyPDF2']:
        try:
            v = importlib.import_module(modname).__version__
            s.append('\t%s version: %s' % (modname, v))
        except ImportError:
            s.append('\t%s cannot be imported into Python' % modname)
    return '\n'.join(s)
702259
def get_version():
    ""
    assert len(VERSION) == 5
    assert VERSION[3] in ('alpha', 'beta', 'rc', 'final')

    # Now build the two parts of the version number:
    # main = X.Y[.Z]
    # sub = .devN - for pre-alpha releases
    #     | {a|b|c}N - for alpha, beta and rc releases

    parts = 2 if VERSION[2] == 0 else 3
    main = '.'.join(str(x) for x in VERSION[:parts])

    sub = ''
    if VERSION[3] != 'final':
        mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
        sub = mapping[VERSION[3]] + str(VERSION[4])

    return str(main + sub)
1051750
def get_version():
    
    try:
        wk_version = _string_execute('-V')
    except Exception as e:
        # we catch all errors here to make sure we get a version no matter what
        wk_version = '%s: %s' % (e.__class__.__name__, e)
    return 'pydf version: %s\nwkhtmltopdf version: %s' % (VERSION, wk_version)
845005
def get_version(module_name_or_file=None):
    """"""

    if module_name_or_file is None:
        parts = base_module.split('.')
        module_name_or_file = parts[0] if len(parts) > 1 else \
            find_packages(exclude=['test', 'test.*'])[0]

    if os.path.isdir(module_name_or_file):
        module_name_or_file = os.path.join(module_name_or_file, '__init__.py')

    with open(module_name_or_file, 'r') as f:
        match = VERSION_PATTERN.search(f.read())
        return match.group(1)
761752
def show_version_info(self, version):
        

        if version in self.versions:
            stdout = self.repo.show(version, '--summary').stdout
            logger.info(stdout)
        else:
            logger.info('Version {0} not found'.format(version))
1056440
def get_pypi_package_data(package_name, version=None):
    
    pypi_url = 'https://pypi.org/pypi'

    if version:
        package_url = '%s/%s/%s/json' % (pypi_url, package_name, version, )
    else:
        package_url = '%s/%s/json' % (pypi_url, package_name, )

    try:
        response = requests.get(package_url)
    except requests.ConnectionError:
        raise RuntimeError('Connection error!')

    # Package not available on pypi
    if not response.ok:
        return None

    return response.json()
1223051
def get_version(release_level=True):
    
    vers = ["%(major)i.%(minor)i.%(micro)i" % __version_info__]
    if release_level and __version_info__['releaselevel'] != 'final':
        vers.append('%(releaselevel)s%(serial)i' % __version_info__)
    return ''.join(vers)
484005
def version(cls):  # noqa: N805  # pylint: disable=no-self-argument
        
        return cls._version_ or getattr(sys.modules.get(cls.__module__, None),
                                        '__version__', None)
277030
def collect_basic_info():
    

    s = sys.version_info
    _collect(json.dumps({'sys.version_info':tuple(s)}))
    _collect(sys.version)
    return sys.version
624146
def get_version():
    """"""

    path = os.path.join(os.path.dirname(__file__), 'backrefs')
    fp, pathname, desc = imp.find_module('__meta__', [path])
    try:
        vi = imp.load_module('__meta__', fp, pathname, desc).__version_info__
        return vi._get_canonical(), vi._get_dev_status()
    except Exception:
        print(traceback.format_exc())
    finally:
        fp.close()
1173325
def asVersion(self):
        
        return versions.Version(self.package, self.major, self.minor, self.micro)
658535
def _get_version():
    """"""
    with open(os.path.join(os.path.dirname(__file__), PACKAGE_NAME, 'VERSION'), 'rb') as f:
        version = f.read().decode('ascii').strip()
    return version
313961
def get_package_version():
    """"""
    base = os.path.abspath(os.path.dirname(__file__))
    with open(os.path.join(base, "firepit/__init__.py")) as pkg:
        for line in pkg:
            m = version.match(line.strip())
            if not m:
                continue
            return ".".join(m.groups()[0].split(", "))
467441
def get_version(package):
    
    init_py = readfile(os.path.join(package, '__init__.py'))
    return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
1276430
def get_version(self):
        
        version = '{major}.{minor}.{patch}'.format(**self.version_info)

        if self.pre_release:
            version = '{}-{label}.{pre}'.format(version, **self.version_info)
        return version
809758
def get_version(self):
        """"""
        return mgz.const.VERSIONS[self._header.version], str(self._header.sub_version)[:5]
1324035
def get_version():
    
    local_results = {}
    version_file_path = os.path.join('pytextql', 'version.py')

    # This is compatible with py3k which removed execfile.
    with open(version_file_path, 'rb') as fin:
        # Compiling instead of passing the text straight to exec
        # associates any errors with the correct file name.
        code = compile(fin.read(), version_file_path, 'exec')
        exec(code, {}, local_results)

    return local_results['__version__']