Skip to content

Commit

Permalink
refactor names for Container pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
ceteri committed Jan 17, 2014
1 parent b110e47 commit 81bb97d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/skl.py → src/contain.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
## class definitions

class Container (object):
"""Container for a scikit-learn UnitOfWork"""
"""Container for a distrib Py UnitOfWork"""

def __init__ (self):
"""constructor"""
Expand All @@ -39,21 +39,21 @@ def run_calc (self, params):
return self.Result(93, 11)


class SklearnFactory (UnitOfWorkFactory):
"""UnitOfWorkFactory definition for scikit-learn jobs"""
class ContainerUOWFactory (UnitOfWorkFactory):
"""UnitOfWorkFactory definition for distrib Py jobs"""

def __init__ (self):
#super(UnitOfWorkFactory, self).__init__()
pass

def instantiate_uow (self, uow_name, prefix):
return Sklearn(uow_name, prefix, Container())
return ContainerUOW(uow_name, prefix, Container())


class Sklearn (UnitOfWork):
"""UnitOfWork definition for scikit-learn jobs"""
class ContainerUOW (UnitOfWork):
"""UnitOfWork definition for distrib Py jobs"""
def __init__ (self, uow_name, prefix, container):
super(Sklearn, self).__init__(uow_name, prefix)
super(ContainerUOW, self).__init__(uow_name, prefix)
self._shard = {}

self._container = container
Expand Down

0 comments on commit 81bb97d

Please sign in to comment.