Skip to content

Commit

Permalink
Add stub for abstract methods
Browse files Browse the repository at this point in the history
  • Loading branch information
led02 committed Feb 27, 2024
1 parent 5c8e703 commit e523df8
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hermes/commands/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import pathlib
from importlib import metadata
from typing import Type

from pydantic import BaseModel

Expand All @@ -14,7 +15,7 @@ class HermesCommand(abc.ABC):
"""

command_name: str = ""
settings_class: type = BaseModel
settings_class: Type = BaseModel

def __init__(self, parser: argparse.ArgumentParser):
""" Initialize a new instance of any HERMES command.
Expand Down Expand Up @@ -82,6 +83,7 @@ def init_command_parser(self, command_parser: argparse.ArgumentParser) -> None:

pass

@abc.abstractmethod
def __call__(self, args: argparse.Namespace):
""" Execute the HERMES sub-command.
Expand Down
5 changes: 5 additions & 0 deletions src/hermes/commands/curate/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import argparse

from hermes.commands.base import HermesCommand


class HermesCurateCommand(HermesCommand):
""" Curate the unified metadata before deposition. """

command_name = "curate"

def __call__(self, args: argparse.Namespace) -> None:
pass
4 changes: 4 additions & 0 deletions src/hermes/commands/deposit/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# SPDX-FileContributor: Michael Meinel

import abc
import argparse

import click

Expand Down Expand Up @@ -96,3 +97,6 @@ class HermesDepositCommand(HermesCommand):

command_name = "deposit"
settings_class = DepositSettings

def __call__(self, args: argparse.Namespace) -> None:
pass
5 changes: 5 additions & 0 deletions src/hermes/commands/harvest/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# SPDX-FileContributor: Michael Meinel

import argparse

from hermes.commands.base import HermesCommand
from hermes.settings import HarvestSettings

Expand All @@ -13,3 +15,6 @@ class HermesHarvestCommand(HermesCommand):

command_name = "harvest"
settings_class = HarvestSettings

def __call__(self, args: argparse.Namespace) -> None:
pass
5 changes: 5 additions & 0 deletions src/hermes/commands/postprocess/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# SPDX-FileContributor: Michael Meinel

import argparse

from hermes.commands.base import HermesCommand
from hermes.settings import PostprocessSettings

Expand All @@ -13,3 +15,6 @@ class HermesPostprocessCommand(HermesCommand):

command_name = "postprocess"
settings_class = PostprocessSettings

def __call__(self, args: argparse.Namespace) -> None:
pass
5 changes: 5 additions & 0 deletions src/hermes/commands/process/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@

# SPDX-FileContributor: Michael Meinel

import argparse

from hermes.commands.base import HermesCommand


class HermesProcessCommand(HermesCommand):
""" Process the collected metadata into a common dataset. """

command_name = "process"

def __call__(self, args: argparse.Namespace) -> None:
pass

0 comments on commit e523df8

Please sign in to comment.