Skip to content
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

Merged
merged 16 commits into from
Mar 23, 2018
Merged

Cloc cocomo #5

merged 16 commits into from
Mar 23, 2018

Conversation

IanLee1521
Copy link
Member

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!

@IanLee1521
Copy link
Member Author

@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))

@IanLee1521
Copy link
Member Author

Apparently I had just not pushed the code I'd wrote... see: e7d877e

@IanLee1521 IanLee1521 changed the title WIP: Cloc cocomo Cloc cocomo Mar 23, 2018
@IanLee1521
Copy link
Member Author

@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

@IanLee1521 IanLee1521 merged commit e8f2152 into master Mar 23, 2018
@IanLee1521 IanLee1521 deleted the cloc-cocomo branch March 23, 2018 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant