-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathclasses.py
63 lines (49 loc) · 1.74 KB
/
classes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Stores information about a User(other than the one being crawled)
class otherUser(object):
def __init__(self,name=None,link=None):
self.name = name
self.link = link
self.followers = 0
self.own_repos = []
self.forked_repos = []
self.impact_value = 0
# Stores information about a repository
class ownRepository(object):
def __init__(self,name=None,link=None,repo_type=None,lang=None):
self.name = name
self.type = repo_type
self.lang = lang
self.link = link
self.forks = []
self.watchers = 0
self.own_commits = []
self.other_commits = []
self.activity = 0
self.ownLinesOfCode = 0
self.otherLinesOfCode = 0
# Stores information about a repository
class forkRepository(object):
def __init__(self,name=None,link=None,repo_type=None,lang=None,forked_from=None):
self.name = name
self.link = link
# name of the person whose repository is forked
self.owner = None
# link of original repo
self.forked_from = forked_from
self.type = repo_type
self.lang = lang
# if a forked repository is forked
# the fork is attributed to the original repo
# same is with watchers
self.forks = []
self.watchers = 0
# the commits here refer to pull requests that have been acceppted
# by the owner in his own repository
self.own_commits = []
self.other_commits = []
self.activity = 0
self.ownLinesOfCode = 0
self.otherLinesOfCode = 0
# the person may not give any pull requests and develope the
# repository natively
self.selfLinesOfCode = 0