Skip to content
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

Including version information in the database. This file reads the config.yaml file and returns a dictionary which contains library as the key and version as the value. #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions return_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import yaml

class VERSION_INFO(object):

def ret_version_info():

stream = open("config.yaml", "r")
docs = yaml.load_all(stream)
count=1
ans = {}
for doc in docs:
if count==1:
ans = doc
else:
break
count+=1
versions = ans['settings']['version']
libraries = ans['settings']['libraries']
lib_ver = {}
for i in range(len(versions)):
lib_ver[libraries[i]] = versions[i]
return lib_ver