Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/metadata_dictionary/__init__.py
# Copyright (C) 2017-2022 The Software Heritage developers | # Copyright (C) 2017-2022 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import collections | import collections | ||||
from typing import Dict, Type | from typing import Dict, Type | ||||
import click | import click | ||||
from . import cff, codemeta, composer, dart, github, maven, npm, python, ruby | from . import cff, codemeta, composer, dart, github, maven, npm, nuget, python, ruby | ||||
from .base import BaseExtrinsicMapping, BaseIntrinsicMapping, BaseMapping | from .base import BaseExtrinsicMapping, BaseIntrinsicMapping, BaseMapping | ||||
INTRINSIC_MAPPINGS: Dict[str, Type[BaseIntrinsicMapping]] = { | INTRINSIC_MAPPINGS: Dict[str, Type[BaseIntrinsicMapping]] = { | ||||
"CffMapping": cff.CffMapping, | "CffMapping": cff.CffMapping, | ||||
"CodemetaMapping": codemeta.CodemetaMapping, | "CodemetaMapping": codemeta.CodemetaMapping, | ||||
"GemspecMapping": ruby.GemspecMapping, | "GemspecMapping": ruby.GemspecMapping, | ||||
"MavenMapping": maven.MavenMapping, | "MavenMapping": maven.MavenMapping, | ||||
"NpmMapping": npm.NpmMapping, | "NpmMapping": npm.NpmMapping, | ||||
"PubMapping": dart.PubspecMapping, | "PubMapping": dart.PubspecMapping, | ||||
"PythonPkginfoMapping": python.PythonPkginfoMapping, | "PythonPkginfoMapping": python.PythonPkginfoMapping, | ||||
"ComposerMapping": composer.ComposerMapping, | "ComposerMapping": composer.ComposerMapping, | ||||
"NuGetMapping": nuget.NuGetMapping, | |||||
} | } | ||||
EXTRINSIC_MAPPINGS: Dict[str, Type[BaseExtrinsicMapping]] = { | EXTRINSIC_MAPPINGS: Dict[str, Type[BaseExtrinsicMapping]] = { | ||||
"GitHubMapping": github.GitHubMapping, | "GitHubMapping": github.GitHubMapping, | ||||
} | } | ||||
MAPPINGS: Dict[str, Type[BaseMapping]] = {**INTRINSIC_MAPPINGS, **EXTRINSIC_MAPPINGS} | MAPPINGS: Dict[str, Type[BaseMapping]] = {**INTRINSIC_MAPPINGS, **EXTRINSIC_MAPPINGS} | ||||
Show All 26 Lines |