def get_version(package):
    init_py = open(os.path.join(package, '__init__.py')).read()
    return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
Test docname_to_docid()/docid_to_docname() using known data
dataset/ETHPy150Open adamchainz/patchy/setup.py/get_version--crossover with--dataset/ETHPy150Open taherh/pysimsearch/pysimsearch/test/sim_index_test.py/SimIndexTest.test_docname_docid_translation