allData = {} # Check for and read existing data file allData = helpers.read_existing(datfilepath) # Read repo info data file (to use as repo list) dataObj = helpers.read_json("../github-data/labReposInfo.json") # Populate repo list repolist = [] print("Getting internal repos ...") repolist = sorted(dataObj["data"].keys()) print("Repo list complete. Found %d repos." % (len(repolist))) # Read pretty GraphQL query query_in = helpers.read_gql("../queries/repo-CreationDate.gql") # Rest endpoint query query_commits_in = "/repos/OWNNAME/REPONAME/commits?until=CREATETIME&per_page=100" query_commits_in2 = "/repos/OWNNAME/REPONAME/commits?per_page=100" # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through internal repos print("Gathering data across multiple paginated queries...") collective = {u'data': {}} tab = " " for repo in repolist:
import re datfilepath = "../github-data/labRepos_Topics.json" allData = {} # Read repo info data file (to use as repo list) dataObj = helpers.read_json("../github-data/labReposInfo.json") # Populate repo list repolist = [] print("Getting internal repos ...") repolist = sorted(dataObj["data"].keys()) print("Repo list complete. Found %d repos." % (len(repolist))) # Read pretty GraphQL query query_in = helpers.read_gql("../queries/repo-Topics.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through internal repos print("Gathering data across multiple paginated queries...") collective = {u'data': {}} tab = " " for repo in repolist: pageNum = 1 print("\n'%s'" % (repo)) print(tab + "page " + str(pageNum)) repoSplit = repo.split("/")
import helpers import json import re datfilepath = "../github-data/labUsers.json" allData = {} # Only looking at LLNL org members orglist = ["llnl"] # Read pretty GraphQL query query_in = helpers.read_gql("../queries/org-Members.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through orgs of interest print("Gathering data across multiple paginated queries...") collective = {u'data': {}} tab = " " for org in orglist: pageNum = 1 print("\n'%s'" % (org)) print(tab + "page %d" % (pageNum)) print(tab + "Modifying query...") newqueryOrg = re.sub('ORGNAME', org, query_in) newquery = re.sub(' PGCURS', '', newqueryOrg) gitquery = json.dumps({'query': newquery}) print(tab + "Query ready!")
import re datfilepath = "../github-data/labRepos_Licenses.json" allData = {} # Read repo info data file (to use as repo list) dataObj = helpers.read_json("../github-data/labReposInfo.json") # Populate repo list repolist = [] print("Getting internal repos ...") repolist = sorted(dataObj["data"].keys()) print("Repo list complete. Found %d repos." % (len(repolist))) # Read pretty GraphQL query query_in = helpers.read_gql("../queries/repo-Licenses.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through internal repos print("Gathering data across multiple queries...") collective = {u'data': {}} tab = " " for repo in repolist: print("\n'%s'" % (repo)) repoSplit = repo.split("/") print(tab + "Modifying query...")
import helpers import json import re datfilepath = "../github-data/labReposInfo.json" allData = {} # Read input lists of organizations and independent repos of interest inputLists = helpers.read_json("../input_lists.json") orglist = inputLists["orgs"] repolist = inputLists["repos"] # Read pretty GraphQL queries # Org repos query_in = helpers.read_gql("../queries/org-Repos-Info.gql") # Solo repos query_solo_in = helpers.read_gql("../queries/repo-Info.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through orgs of interest print("Gathering data across multiple paginated queries...") collective = {u'data': {}} tab = " " for org in orglist: pageNum = 1 print("\n'%s'" % (org)) print(tab + "page %d" % (pageNum))
import re datfilepath = "../github-data/labRepos_Languages.json" allData = {} # Read repo info data file (to use as repo list) dataObj = helpers.read_json("../github-data/labReposInfo.json") # Populate repo list repolist = [] print("Getting internal repos ...") repolist = sorted(dataObj["data"].keys()) print("Repo list complete. Found %d repos." % (len(repolist))) # Read pretty GraphQL query query_in = helpers.read_gql("../queries/repo-Languages.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through internal repos print("Gathering data across multiple paginated queries...") collective = {u'data': {}} tab = " " for repo in repolist: pageNum = 1 print("\n'%s'" % (repo)) print(tab + "page %d" % (pageNum)) repoSplit = repo.split("/")
import helpers import json import re datfilepath = "../github-data/labUsers.json" allData = {} # Only looking at LLNL org members orglist = ["llnl"] # Read pretty GraphQL query query_in = helpers.read_gql("../queries/org-Members.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through orgs of interest print("Gathering data across multiple paginated queries...") collective = {u'data': {}} tab = " " for org in orglist: pageNum = 1 print("\n'%s'" % (org)) print(tab + "page %d" % (pageNum)) print(tab + "Modifying query...") newqueryOrg = re.sub('ORGNAME', org, query_in) newquery = re.sub(' PGCURS', '', newqueryOrg) gitquery = json.dumps({'query': newquery}) print(tab + "Query ready!")
import helpers import json import re datfilepath = "../github-data/labReposInfo.json" allData = {} # Read input lists of organizations and independent repos of interest inputLists = helpers.read_json("../input_lists.json") orglist = inputLists["orgs"] repolist = inputLists["repos"] # Read pretty GraphQL queries # Org repos query_in = helpers.read_gql("../queries/org-Repos-Info.gql") # Solo repos query_solo_in = helpers.read_gql("../queries/repo-Info.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through orgs of interest print("Gathering data across multiple paginated queries...") collective = {u'data': {}} tab = " " for org in orglist: pageNum = 1 print("\n'%s'" % (org)) print(tab + "page %d" % (pageNum))
print("Getting internal repos ...") repolist = sorted(dataObj["data"].keys()) print("Repo list complete. Found %d repos." % (len(repolist))) # Read lab user data file (to use as member list) dataObj = helpers.read_json("../github-data/labUsers.json") collectiveInt = dataObj # Populate member list memberlist = [] print("Getting LLNL members ...") memberlist = sorted(dataObj["data"].keys()) print("Member list complete. Found %d users." % (len(memberlist))) # Read pretty GraphQL query query_in = helpers.read_gql("../queries/repo-Users.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through internal repos print("Gathering data across multiple paginated queries...") collectiveExt = {u'data': {}} tab = " " for repo in repolist: pageNum = 1 print("\n'%s'" % (repo)) print(tab + "page %d" % (pageNum)) repoSplit = repo.split("/")
import re datfilepath = "../github-data/labRepos_PullsIssues.json" allData = {} # Read repo info data file (to use as repo list) dataObj = helpers.read_json("../github-data/labReposInfo.json") # Populate repo list repolist = [] print("Getting internal repos ...") repolist = sorted(dataObj["data"].keys()) print("Repo list complete. Found %d repos." % (len(repolist))) # Read pretty GraphQL query query_in = helpers.read_gql("../queries/repo-PullsIssues.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through internal repos print("Gathering data across multiple queries...") collective = {u'data': {}} tab = " " for repo in repolist: print("\n'%s'" % (repo)) repoSplit = repo.split("/") print(tab + "Modifying query...")
print("Getting internal repos ...") repolist = sorted(dataObj["data"].keys()) print("Repo list complete. Found %d repos." % (len(repolist))) # Read lab user data file (to use as member list) dataObj = helpers.read_json("../github-data/labUsers.json") collectiveInt = dataObj # Populate member list memberlist = [] print("Getting LLNL members ...") memberlist = sorted(dataObj["data"].keys()) print("Member list complete. Found %d users." % (len(memberlist))) # Read pretty GraphQL query query_in = helpers.read_gql("../queries/repo-Users.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through internal repos print("Gathering data across multiple paginated queries...") collectiveExt = {u'data': {}} tab = " " for repo in repolist: pageNum = 1 print("\n'%s'" % (repo)) print(tab + "page %d" % (pageNum)) repoSplit = repo.split("/")
memberlist = [] print("Getting LLNL members ...") memberlist = sorted(dataObj["data"].keys()) print("Member list complete. Found %d users." % (len(memberlist))) # Read repo info data file (to use as repo list) dataObj = helpers.read_json("../github-data/labReposInfo.json") # Populate repo list repolist = [] print("Getting internal repos ...") repolist = sorted(dataObj["data"].keys()) print("Repo list complete. Found %d repos." % (len(repolist))) # Read pretty GraphQL query query_in = helpers.read_gql("../queries/user-Repos.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through lab members print("Gathering data across multiple paginated queries...") collective = {u'data': {}} tab = " " for usr in memberlist: pageNum = 1 print("\n'%s'" % (usr)) print(tab + "page %d" % (pageNum)) print(tab + "Modifying query...")
import re datfilepath = "../github-data/labRepos_Languages.json" allData = {} # Read repo info data file (to use as repo list) dataObj = helpers.read_json("../github-data/labReposInfo.json") # Populate repo list repolist = [] print("Getting internal repos ...") repolist = sorted(dataObj["data"].keys()) print("Repo list complete. Found %d repos." % (len(repolist))) # Read pretty GraphQL query query_in = helpers.read_gql("../queries/repo-Languages.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through internal repos print("Gathering data across multiple paginated queries...") collective = {u'data': {}} tab = " " for repo in repolist: pageNum = 1 print("\n'%s'" % (repo)) print(tab + "page %d" % (pageNum)) repoSplit = repo.split("/")
import re datfilepath = "../github-data/labRepos_Licenses.json" allData = {} # Read repo info data file (to use as repo list) dataObj = helpers.read_json("../github-data/labReposInfo.json") # Populate repo list repolist = [] print("Getting internal repos ...") repolist = sorted(dataObj["data"].keys()) print("Repo list complete. Found %d repos." % (len(repolist))) # Read pretty GraphQL query query_in = helpers.read_gql("../queries/repo-Licenses.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through internal repos print("Gathering data across multiple queries...") collective = {u'data': {}} tab = " " for repo in repolist: print("\n'%s'" % (repo)) repoSplit = repo.split("/") print(tab + "Modifying query...")
import re datfilepath = "../github-data/labRepos_Topics.json" allData = {} # Read repo info data file (to use as repo list) dataObj = helpers.read_json("../github-data/labReposInfo.json") # Populate repo list repolist = [] print("Getting internal repos ...") repolist = sorted(dataObj["data"].keys()) print("Repo list complete. Found %d repos." % (len(repolist))) # Read pretty GraphQL query query_in = helpers.read_gql("../queries/repo-Topics.gql") # Retrieve authorization token authhead = helpers.get_gitauth() # Iterate through internal repos print("Gathering data across multiple paginated queries...") collective = {u'data': {}} tab = " " for repo in repolist: pageNum = 1 print("\n'%s'" % (repo)) print(tab + "page " + str(pageNum)) repoSplit = repo.split("/")