def test_1(): g = Gitana(CONFIG) g.delete_previous_logs() g.init_db("bootstrap_db_test") g.create_project("bootstrap_db_test", "bootstrap") g.import_slack_data("bootstrap_db_test", "bootstrap", "slack_bootstrap", SLACK_TOKENS, before_date="2016-08-12", channels=["random", "metascience", "softwareanalysis"])
def _get_data(db_name, project_name, repo_name, issue_tracker_name, repo_path, github_name): g = Gitana(CONFIG, None) g.delete_previous_logs() g.init_db(db_name) g.create_project(db_name, project_name) print "import git data" g.import_git_data( db_name, project_name, repo_name, repo_path, references=["origin/master"] ) #, "v1.0.0", "v1.1.0", "v1.2.0", "v1.3.0", "v1.4.0", "v2.0.0", "v2.1.0", "v2.2.0", "v2.3.0", "v.3.0.0", "v.3.1.0", "v.3.2.0", "v.3.3.0"]) print "import issue tracker" g.import_github_issue_data(db_name, project_name, repo_name, issue_tracker_name, github_name, GH_TOKENS) g.import_github_pull_request_data(db_name, project_name, repo_name, issue_tracker_name, github_name, GH_TOKENS) g.match_vcs_and_github_users(db_name, project_name, repo_name, github_name, GH_TOKENS) print "import fun data" g.import_code_data(db_name, project_name, repo_name, repo_path, references=["origin/master"], processes=5)
def _papyrus(): g = Gitana(CONFIG, None) g.delete_previous_logs() g.init_db("db_papyrus") g.create_project("db_papyrus", "papyrus") print("import git data") g.import_git_data( "db_papyrus", "papyrus", "papyrus_repo", "C:\\Users\\atlanmod\\Desktop\\eclipse-git-projects\\papyrus", references=["0.7.0", "0.8.0", "0.9.0", "0.10.0", "1.0.0", "2.0.0"], import_type=2, processes=20) print("import bugzilla data") g.import_bugzilla_issue_data("db_papyrus", "papyrus", "papyrus_repo", "bugzilla-papyrus", "https://bugs.eclipse.org/bugs/xmlrpc.cgi", "papyrus", processes=10) print("import eclipse forum data") g.import_eclipse_forum_data( "db_papyrus", "papyrus", "papyrus-eclipse", "https://www.eclipse.org/forums/index.php/f/121/", processes=2) print("import stackoverflow data") g.import_stackoverflow_data("db_papyrus", "papyrus", "papyrus-stackoverflow", "papyrus", SO_TOKENS)
def _papyrus(): g = Gitana(CONFIG, None) g.delete_previous_logs() g.init_db("db_papyrus") g.create_project("db_papyrus", "papyrus") #print "import git data" #g.import_git_data("db_papyrus", "papyrus", "papyrus_repo", "C:\\Users\\atlanmod\\Desktop\\eclipse-git-projects\\papyrus", processes=20) print "import bugzilla data" g.import_bugzilla_issue_data("_papyrus_db", "papyrus", "papyrus_repo", "bugzilla-papyrus", "https://bugs.eclipse.org/bugs/xmlrpc.cgi", "papyrus", processes=10) print "import eclipse forum data" g.import_eclipse_forum_data( "_papyrus_db", "papyrus", "papyrus-eclipse", "https://www.eclipse.org/forums/index.php/f/121/", processes=4) print "import stackoverflow data" g.import_stackoverflow_data("_papyrus_db", "papyrus", "papyrus-stackoverflow", "papyrus", ['IFco1Gh5EJ*U)ZY5)16ZKQ(('])
def test_1(): #test simple g = Gitana(CONFIG) g.delete_previous_logs() g.init_db("so_db_test") g.create_project("so_db_test", "papyrus") g.import_stackoverflow_data("so_db_test", "papyrus", "papyrus-stackoverflow", "papyrus", SO_TOKENS, before_date="2014-09-01")
def test_create_db_parts(): g = Gitana(CONFIG) g.init_db("dbschema_test", init_forum=False, init_instant_messaging=False, init_issue_tracker=False) g.add_issue_tracker_tables("dbschema_test") g.add_forum_tables("dbschema_test") g.add_instant_messaging_tables("dbschema_test") g.init_db("dbschema_test", init_forum=False, init_instant_messaging=False, init_issue_tracker=False)
def test_1(): print("test import type 1") g = Gitana(CONFIG) g.delete_previous_logs() g.init_db("vcs1_db_test") g.create_project("vcs1_db_test", "2048") # test import type 1 g.import_git_data("vcs1_db_test", "2048", "2048_repo", "C:\\Users\\atlanmod\\Desktop\\2048", import_type=1, processes=5)
def test_4(): print("test import references") g = Gitana(CONFIG) g.delete_previous_logs() g.init_db("vcs4_db_test") g.create_project("vcs4_db_test", "2048") # import references g.import_git_data("vcs4_db_test", "2048", "2048_repo", "C:\\Users\\atlanmod\\Desktop\\2048", import_type=3, references=REFERENCES, processes=5)
def main(): g = Gitana(CONFIG) g.delete_previous_logs() g.init_db("bugzilla_db_test") g.create_project("bugzilla_db_test", "papyrus") g.create_repository("bugzilla_db_test", "papyrus", "papyrus_repo") print "starting 1.." test_1(g) print "starting 2.." test_2(g) print "starting 3.." test_3(g)
def test_1(): g = Gitana(CONFIG, None) g.delete_previous_logs() g.init_db("db_2048") g.create_project("db_2048", "2048") print "import git data" g.import_git_data( "db_2048", "2048", "repo_2048", "C:\\Users\\atlanmod\\Desktop\\oss\\ants-work\\github-repos\\2048") print "import code function data" g.import_function_data( "db_2048", "2048", "repo_2048", "C:\\Users\\atlanmod\\Desktop\\oss\\ants-work\\github-repos\\2048")
def test_5(): print("test update") g = Gitana(CONFIG) g.delete_previous_logs() g.init_db("vcs5_db_test") g.create_project("vcs5_db_test", "2048") # import references g.import_git_data("vcs5_db_test", "2048", "2048_repo", "C:\\Users\\atlanmod\\Desktop\\2048", before_date="2015-10-10", import_type=2, references=REFERENCES, processes=5) # test update g.update_git_data("vcs5_db_test", "2048", "2048_repo", "C:\\Users\\atlanmod\\Desktop\\2048")
def main(): g = Gitana(CONFIG) g.delete_previous_logs() g.init_db("papyrus_db_test") g.create_project("papyrus_db_test", "papyrus") print "starting 1.." test_1(g) print "starting 2.." test_2(g) print "starting 3.." test_3(g) print "starting 4.." test_4(g)
def _2048(): g = Gitana(CONFIG, None) g.delete_previous_logs() g.init_db("db_2048") g.create_project("db_2048", "2048") print "import git data" g.import_git_data( "db_2048", "2048", "repo_2048", "C:\\Users\\atlanmod\\Desktop\\oss\\ants-work\\github-repos\\2048", import_type=2) print "import github data" g.import_github_issue_data("db_2048", "2048", "repo_2048", "2048_it", "gabrielecirulli/2048", GH_TOKENS)
def test_3(): print "test import type 3" g = Gitana(CONFIG) g.delete_previous_logs() g.init_db("db_2048") g.create_project("db_2048", "2048") #test import type 2 g.import_git_data("db_2048", "2048", "2048_repo", "C:\\Users\\atlanmod\\Desktop\\2048", import_type=3, processes=5)
def main(): g = Gitana(CONFIG) g.delete_previous_logs() g.init_db("vcf_audit_db") g.create_project("vcf_audit_db", "vcf_audit") g.extract_dependency_relations( "vcf_audit_db", "vcf_audit", "vcf_audit_repo", "C:\\mmopuru\\vcf-audit", extra_paths=[ "C:\\mmopuru\\vcf-audit\\vcf-audit-compliance\\src\\main\\java", "C:\\mmopuru\\vcf-audit\\vcf-common-operations\\src\\main\\java", "C:\\mmopuru\\vcf-audit\\support\\gobuild" ])
def _decidim(): g = Gitana(CONFIG, None) g.delete_previous_logs() g.init_db("db_decidim") g.create_project("db_decidim", "decidim") print "import git data" g.import_git_data( "db_decidim", "decidim", "repo_decidim", "C:\\Users\\atlanmod\\Desktop\\decidim-analysis\\decidim", references=["origin/master"]) g.match_vcs_and_github_users("db_decidim", "decidim", "repo_decidim", "decidim/decidim", GH_TOKENS) g.export_json("db_decidim", "repo_decidim", "./decidim-master.json", references=["origin/master"])
def main(): g = Gitana(CONFIG) g.delete_previous_logs() g.init_db("papyrus_db_testx") g.create_project("papyrus_db_testx", "papyrus") g.import_git_data( "papyrus_db_testx", "papyrus", "papyrus_repo", "C:\\Users\\atlanmod\\Desktop\\eclipse-git-projects\\papyrus", references=REFERENCES, processes=20) print("starting 1..") test_1(g) print("starting 2..") test_2(g) print("starting 3..") test_3(g)
def test_create_db(): g = Gitana(CONFIG) g.init_db("dbschema_test")