hermes.commands.curate.base
Classes
Generic curation settings. |
|
Base class for curation plugins. |
|
Curate the processed metadata before deposition. |
Module Contents
- class hermes.commands.curate.base._CurateSettings(/, **data: Any)
Bases:
pydantic.BaseModelGeneric curation settings.
- class hermes.commands.curate.base.BaseCuratePlugin(command, ctx)
Bases:
hermes.commands.base.HermesPluginBase class for curation plugins.
- __call__(command: hermes.commands.base.HermesCommand) None
Entry point of the callable.
This method runs the main logic of the plugin. It calls the other methods of the object in the correct order. Depending on the result of
is_publication_approvedthe correspondingprocess_decision_*()method is called, based on the curation decision.
- prepare()
Prepare the plugin.
This method may be used to perform preparatory tasks such as configuration checks, token permission checks, loading of resources, etc.
- validate()
Validate the metadata.
This method performs the validation of the metadata from the data model.
- create_report()
Create a curation report.
This method is responsible for creating any number of reports about the curation process. These reports may be machine-readable, human-readable, or both.
- abstractmethod is_publication_approved() bool
Return the publication decision made through the curation process.
If publication is allowed, this method must return
True, otherwiseFalse.
- class hermes.commands.curate.base.HermesCurateCommand(parser: argparse.ArgumentParser)
Bases:
hermes.commands.base.HermesCommandCurate the processed metadata before deposition.
- init_command_parser(command_parser: argparse.ArgumentParser) None
Initialize the command line arguments available for this specific HERMES sub-commands.
You should override this method to add your custom arguments to the command line parser of the respective sub-command.
- Parameters:
command_parser – The command line sub-parser responsible for the HERMES sub-command.