Skip to content

Class customization missing from manifest schema #430

@shuchenliu

Description

@shuchenliu

Currently, value under class key in manifest's dumper section is accessed by the loader.py module to decide if a customized dumper class should be used, as shown below

# biothings/hub/dataplugin/loaders/loader.py

klass = dumper_section.get("class")
dumper_configuration = getattr(self, "_dict_for_%s" % scheme)(dumper_urls)

# Add disabled flag to dumper configuration with default value False
dumper_configuration["DISABLED"] = dumper_section.get("disabled", False)

if klass:
    dumper_class = get_class_from_classpath(klass)
    dumper_configuration["BASE_CLASSES"] = klass
else:
    dumper_class = self.dumper_registry.get(scheme)
    dumper_configuration["BASE_CLASSES"] = "biothings.hub.dataload.dumper.%s" % dumper_class.__name__

This extensibility is not reflected in the current schema for manifest.json file, which would cause validation error if class key is present in its dumper section

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions