-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from LuuMing/dev
analy 功能的标准模块实现
- Loading branch information
Showing
5 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from grank import analy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .core import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
__all__ = ['get_analy'] | ||
|
||
def get_analy(token=None,start=None,stop=None,owner=None,repo=None): | ||
from ..script.crawler import fetch_repo_data | ||
from ..libs.helpers import get_config_instance | ||
from ..script.activity import analyse_repo | ||
from ..script.social import analyse_repo as analyse_social | ||
if owner is None: | ||
raise ValueError('owner invalid!') | ||
if repo is None: | ||
raise ValueError('repo invalid!') | ||
config = get_config_instance(token=token,start=start,stop=stop) | ||
data = fetch_repo_data(owner,repo,config) | ||
activity = analyse_repo(owner, repo, data, config, ret_score = True) | ||
social = analyse_social(owner, repo, data, config, ret_score = True) | ||
return {'activity': activity, 'social':social} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters