Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/metadata_dictionary/__init__.py
import collections | import collections | ||||
import click | import click | ||||
from . import cff, codemeta, maven, npm, python, ruby | from . import R, cff, codemeta, maven, npm, python, ruby | ||||
MAPPINGS = { | MAPPINGS = { | ||||
"CodemetaMapping": codemeta.CodemetaMapping, | "CodemetaMapping": codemeta.CodemetaMapping, | ||||
"MavenMapping": maven.MavenMapping, | "MavenMapping": maven.MavenMapping, | ||||
"NpmMapping": npm.NpmMapping, | "NpmMapping": npm.NpmMapping, | ||||
"PythonPkginfoMapping": python.PythonPkginfoMapping, | "PythonPkginfoMapping": python.PythonPkginfoMapping, | ||||
"GemspecMapping": ruby.GemspecMapping, | "GemspecMapping": ruby.GemspecMapping, | ||||
"CffMapping": cff.CffMapping, | "CffMapping": cff.CffMapping, | ||||
"RDescriptionMapping": R.RDescriptionMapping, | |||||
} | } | ||||
def list_terms(): | def list_terms(): | ||||
"""Returns a dictionary with all supported CodeMeta terms as keys, | """Returns a dictionary with all supported CodeMeta terms as keys, | ||||
and the mappings that support each of them as values.""" | and the mappings that support each of them as values.""" | ||||
d = collections.defaultdict(set) | d = collections.defaultdict(set) | ||||
for mapping in MAPPINGS.values(): | for mapping in MAPPINGS.values(): | ||||
Show All 19 Lines |