hermes.commands.deposit.base
Module Contents
Classes
Base class that implements the generic deposition workflow. |
|
Generic deposition settings. |
|
Deposit the curated metadata to repositories. |
- class hermes.commands.deposit.base.BaseDepositPlugin(command, ctx)
Bases:
hermes.commands.base.HermesPlugin
Base class that implements the generic deposition workflow.
TODO: describe workflow… needs refactoring to be less stateful!
- __call__(command: hermes.commands.base.HermesCommand) None
Initiate the deposition process.
This calls a list of additional methods on the class, none of which need to be implemented.
- prepare() None
Prepare the deposition.
This method may be implemented to check whether config and context match some initial conditions.
If no exceptions are raised, execution continues.
- abstract map_metadata() None
Map the given metadata to the target schema of the deposition platform.
- is_initial_publication() bool
Decide whether to do an initial publication or publish a new version.
Returning
True
indicates that publication of an initial version will be executed, resulting in a call ofcreate_initial_version()
.False
indicates a new version of an existing publication, leading to a call ofcreate_new_version()
.By default, this returns
True
.
- class hermes.commands.deposit.base.DepositSettings(/, **data: Any)
Bases:
pydantic.BaseModel
Generic deposition settings.
- class hermes.commands.deposit.base.HermesDepositCommand(parser: argparse.ArgumentParser)
Bases:
hermes.commands.base.HermesCommand
Deposit the curated metadata to repositories.
- 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.