# Path: src/artifactcli/operation/baseoperation.py
# class BaseOperation(CaseClass):
#     __metaclass__ = ABCMeta
# 
#     def __init__(self, group_id=None, args=None, optional_params=None):
#         optional_params = optional_params or {}
#         super(BaseOperation, self).__init__(['group_id', 'args'] + list(optional_params.keys()))
# 
#         self.group_id = group_id
#         self.args = args
# 
#         for k in optional_params:
#             setattr(self, k, optional_params[k])
# 
#     def _get_arg(self, index, name):
#         try:
#             return self.args[index]
#         except IndexError:
#             logging.error('Argument <%s> is required.' % name)
#             raise AssertionError
# 
#     @abstractmethod
#     def run(self, repo):
#         """abstract method"""


from .baseoperation import BaseOperation
from artifactcli.artifact import BasicInfo


class UploadOperation(BaseOperation):
    def __init__(self, group_id, args, force, print_only):
        super(UploadOperation, self).__init__(group_id, args, {'force': force, 'print_only': print_only})
        self.local_path = self._get_arg(0, 'LOCAL_PATH')


# Path: src/artifactcli/operation/baseoperation.py
# class BaseOperation(CaseClass):
#     __metaclass__ = ABCMeta
# 
#     def __init__(self, group_id=None, args=None, optional_params=None):
#         optional_params = optional_params or {}
#         super(BaseOperation, self).__init__(['group_id', 'args'] + list(optional_params.keys()))
# 
#         self.group_id = group_id
#         self.args = args
# 
#         for k in optional_params:
#             setattr(self, k, optional_params[k])
# 
#     def _get_arg(self, index, name):
#         try:
#             return self.args[index]
#         except IndexError:
#             logging.error('Argument <%s> is required.' % name)
#             raise AssertionError
# 
#     @abstractmethod
#     def run(self, repo):
#         """abstract method"""


# Path: src/artifactcli/operation/upload.py
from .baseoperation import BaseOperation
from artifactcli.artifact import BasicInfo



class UploadOperation(BaseOperation):
    def __init__(self, group_id, args, force, print_only):
        super(UploadOperation, self).__init__(group_id, args, {'force': force, 'print_only': print_only})
        self.local_path = self._get_arg(0, 'LOCAL_PATH')


    def run(self, repo):