Skip to content

Commit

Permalink
Fix api docs, tests?
Browse files Browse the repository at this point in the history
  • Loading branch information
howderek committed Jun 5, 2018
1 parent 1b42e4e commit 7a55279
Show file tree
Hide file tree
Showing 13 changed files with 858 additions and 326 deletions.
3 changes: 2 additions & 1 deletion augur/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self, config_file='augur.config.json', no_config_file=0, descriptio
self.__config_bad = False
self.__config_file_path = os.path.abspath(os.getenv('AUGUR_CONFIG_FILE', config_file))
self.__config_location = os.path.dirname(self.__config_file_path)
self.__export_env = os.getenv('AUGUR_ENV_EXPORT', '0') == '1'
if os.getenv('AUGUR_ENV_ONLY', '0') != '1' and no_config_file == 0:
try:
self.__config_file = open(self.__config_file_path, 'r+')
Expand All @@ -52,7 +53,7 @@ def __init__(self, config_file='augur.config.json', no_config_file=0, descriptio
self.__config_file = open(self.__config_file_path, 'w+')
self.__config_bad = True
# Options to export the loaded configuration as environment variables for Docker
self.__export_env = os.getenv('AUGUR_ENV_EXPORT', '0') == '1'

if self.__export_env:
export_filename = os.getenv('AUGUR_ENV_EXPORT_FILE', 'augur.cfg.sh')
self.__export_file = open(export_filename, 'w+')
Expand Down
29 changes: 11 additions & 18 deletions augur/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,12 +892,11 @@ def ghtorrent_range():
#######################

"""
@api {get} /:owner/:repo/bus_factor Bus Factor
@apiName BusFactor
@apiDescription Metric Undefined
@apiDescription Returns an integer that is the number of developers that have a summed percentage of contributions higher than the threshold
@api {get} /git/repos Git Repos
@apiName Git Repos
@apiDescription Shows downloaded Git repos
@apiName GitHub
@apiGroup Risk
@apiGroup Utility
@apiParam {String} owner Username of the owner of the GitHub repository
@apiParam {String} repo Name of the GitHub repository
Expand Down Expand Up @@ -946,9 +945,9 @@ def downloaded_repos():
self.addGitMetric(git.lines_changed_minus_whitespace, 'lines_changed')

"""
@api {get} /git/lines_changed/:git_repo_url Lines Changed
@apiName Lines Changed (no whitespace)
@apiDescription Shows detailed information about each file changed by each commit
@api {get} /git/changes_by_author/:git_repo_url Changes by Author
@apiName Changes by Author
@apiDescription Shows total changes by author
@apiGroup Uncategorized
@apiParam {String} owner Username of the owner of the GitHub repository
Expand All @@ -957,16 +956,10 @@ def downloaded_repos():
@apiSuccessExample {json} Success-Response:
[
{
"additions":2,
"author_date":"2018-05-14 10:09:57 -0500",
"author_email":"s@goggins.com",
"author_name":"Sean P. Goggins",
"commit_date":"2018-05-16 10:12:22 -0500",
"committer_email":"derek@howderek.com",
"committer_name":"Derek Howard",
"deletions":0,"hash":"77e603a",
"message":"merge dev",
"parents":"b8ec0ed"
"additions":32142,
"deletions":34232,
"author_email":"derek@howderek.com",
"author_name":"Derek Howard",
}
]
"""
Expand Down
2 changes: 1 addition & 1 deletion docs/api/api_data.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/api/api_data.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/api/api_project.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/api/api_project.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "name": "", "version": "0.0.0", "description": "", "sampleUrl": false, "defaultVersion": "0.0.0", "apidoc": "0.3.0", "generator": { "name": "apidoc", "time": "2018-05-18T14:43:11.357Z", "url": "http://apidocjs.com", "version": "0.17.6" }}
{ "name": "", "version": "0.0.0", "description": "", "sampleUrl": false, "defaultVersion": "0.0.0", "apidoc": "0.3.0", "generator": { "name": "apidoc", "time": "2018-06-05T16:56:12.002Z", "url": "http://apidocjs.com", "version": "0.17.6" }}
Expand Down
Binary file modified docs/python/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/python/build/doctrees/index.doctree
Binary file not shown.
Loading

0 comments on commit 7a55279

Please sign in to comment.