LLNL / scraper

Python library for getting metadata from source code hosting tools
MIT License
49 stars 23 forks source link

Generate LOC in code.json #42

Open ghost opened 5 years ago

ghost commented 5 years ago

Generate LOC in code.json. Note that this requires the code.gov metadata schema 2.0.0 to be updated to include a measurement field.

leebrian commented 5 years ago

I think this may be related to https://github.com/GSA/code-gov-data/issues/22

IanLee1521 commented 5 years ago

This will be trivial once a field is added.

Today we calculate the laborHours (which does have a field in the schema), which is done based on the number of lines of code: https://github.com/LLNL/scraper/blob/ca3736de0bcdfded43e4f52f7d8cbb37eea39b46/scraper/util.py#L200

So all we need to do is store that value in the correct place and we’re already done.