HomeSoftware Heritage

First draft of the metadata content indexer for npm (package.json)

Description

First draft of the metadata content indexer for npm (package.json)

Summary:
for indexing content in content_metadata we want to use metadata tools
to extract metadata from manifest files and keep in same format(syntax) and with same terms(semantic)

temp solution:
in Metadata_Dictionary class dispatch the content for parsing and translation
using hard coded mapping (should be extracted from storage) to translate package.json files
to codemeta terms

testing:
in test_metadata 3 running tests for the compute_metadata function with and without content
and for the metadata indexer (the storage part of it isn't implemented) with local npm mapping

Differential Revision: https://forge.softwareheritage.org/D215

Refactor metadata dictionary with a class for each mapping

change to compute_metadata without a MetaDict class
added a tools mapping to help with dispatch
added convert function to decode content

note: delete compare function that returns a wrong result

Details

Provenance
moraneggAuthored on Jun 16 2017, 5:20 PM
moraneggPushed on Jun 29 2017, 10:02 AM
Differential Revision
D215: First draft of the metadata content indexer for npm (package.json) T715
Parents
rDCIDXd7d57350ee65: Added tests for language indexer (T722)
Branches
Unknown
Tags
Unknown

Event Timeline

Morane Otilia Gruenpeter <morane.gg@gmail.com> committed rDCIDX53eccf57491a: First draft of the metadata content indexer for npm (package.json) (authored by Morane Otilia Gruenpeter <morane.gg@gmail.com>).Jun 28 2017, 2:22 PM