-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloc cocomo #5
Cloc cocomo #5
Conversation
Uses the COCOMO II model available at: http://csse.usc.edu/tools/cocomoii.php
@dinatale2 -- this was the sample script I mentioned that I was using to run the calculation to test before I have finished the full integration: import json
import requests
from scraper import code_gov
code_gov_json = json.loads(requests.get('https://energy.gov/code.json').text)
releases = code_gov_json['releases']
for r in releases:
if r.get('vcs', '') == 'git':
url = r['repositoryURL']
# print(url)
sloc = code_gov.git_repo_to_sloc(url)
# print(sloc)
hours = code_gov.compute_labor_hours(sloc)
print('-- url=%s, sloc=%d, hours=%d' % (url, sloc, hours)) |
Apparently I had just not pushed the code I'd wrote... see: e7d877e |
@jcastle + @RicardoAReyes -- I'm going to go ahead and merge this functionality, since it is working. We can update it as needed when we have the chance to review the accuracy of this approach. /cc @dinatale2 |
Work to integrate cloc + cocomo II into Scraper. This should be considered work in progress, though it is approximately 90% complete.
This is in response to: GSA/code-gov-web#416
cc/ @jcastle + @DanielJDufour + @dinatale2 for any feedback you might have!