From d7afc216b81f390eea4416f5481d058469874789 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Mon, 26 Oct 2015 17:23:46 -0700 Subject: [PATCH] Update docstrings on entity type Describe the instance variables and there types with docstrings and comments and such, so that it is more known what this type is for. Also removes docstring saying this is only for jobs and jobboards since it is really a more generic entity class and has no direct tie to jobboards. Change-Id: I98adb161adcb4ce096c1ee0e6c3377eb71383a90 --- taskflow/types/entity.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/taskflow/types/entity.py b/taskflow/types/entity.py index d46927ce..a644277f 100644 --- a/taskflow/types/entity.py +++ b/taskflow/types/entity.py @@ -16,9 +16,19 @@ class Entity(object): - """Entity object(s) to be registered on jobboard. + """Entity object that identifies some resource/item/other. - Now only supports 'kind' of 'conductor'. + :ivar kind: **immutable** type/kind that identifies this + entity (typically unique to a library/application) + :type kind: string + :ivar name: **immutable** name that can be used to uniquely + identify this entity among many other entities + :type name: string + :ivar metadata: **immutable** dictionary of metadata that is + associated with this entity (and typically + has keys/values that further describe this + entity) + :type metadata: dict """ def __init__(self, kind, name, metadata): self.kind = kind