Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Create BaseCommand class #4

Closed
tobiasraabe opened this issue Jan 12, 2017 · 2 comments
Closed

Create BaseCommand class #4

tobiasraabe opened this issue Jan 12, 2017 · 2 comments

Comments

@tobiasraabe
Copy link
Owner

tobiasraabe commented Jan 12, 2017

  • oTree Ubuntu Server Manager version: 0.1.0
  • Python version: 3.6
  • Operating System: Ubuntu

Description

A much more sophisticate approach regarding commands would be to build class BaseCommand which could look like this:

# commands/base.py
"""The base command"""

class BaseCommand(object):
    """A base command."""
 
    def __init__(self, options, *args, **kwargs):
        self.options = options
        self.args = args
        self.kwargs = kwargs

   def requirements_check():
        pass
 
    def run(self):
        raise NotImplementedError('You must implement the run() method yourself!')

Additional ressources:

@tobiasraabe tobiasraabe added this to the Version 0.2.0 milestone Mar 12, 2017
@tobiasraabe tobiasraabe removed this from the Version 0.2.0 milestone Jul 16, 2017
@cataclysmic
Copy link
Collaborator

Do we still need this?

@tobiasraabe
Copy link
Owner Author

tobiasraabe commented Aug 3, 2017

No, this will be closed with a commit message when I merge #102 .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants