Mercurial > hg > WSGraph
comparison wsgraph/model.py @ 28:4bed1424bb3f
more notes to self
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 12 Dec 2012 18:58:08 -0800 |
parents | d1a8c1436ded |
children | 5f14a4183bf2 |
comparison
equal
deleted
inserted
replaced
27:9e173648d848 | 28:4bed1424bb3f |
---|---|
1 | |
2 import sys | |
1 from abc import abstractmethod | 3 from abc import abstractmethod |
2 from copy import deepcopy | 4 from copy import deepcopy |
3 from utils import isiterable | 5 from utils import isiterable |
4 | 6 |
5 class Graph(object): | 7 class Graph(object): |
8 """ | |
9 abstract base class for WSGraph model of a graph | |
10 | |
11 WSGraph is interacted with by implementing | |
12 wsgraph.model.Graph object for a desired interface | |
13 """ | |
6 | 14 |
7 @abstractmethod | 15 @abstractmethod |
8 def node(self, name, **values): | 16 def node(self, name, **values): |
9 """ | 17 """ |
10 get or set a node | 18 get or set a node |
107 def __init__(self, filename): | 115 def __init__(self, filename): |
108 self.filename = filename | 116 self.filename = filename |
109 raise NotImplementedError | 117 raise NotImplementedError |
110 | 118 |
111 # TODO: CLI entry point to convert from one model to another | 119 # TODO: CLI entry point to convert from one model to another |
112 # def main() | 120 # def main(args=sys.argv[1:]): |