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