Public Member Functions | Public Attributes | List of all members
pkgdotter.Faker Class Reference
Inheritance diagram for pkgdotter.Faker:

Public Member Functions

def __init__ (self)
 
def register (self, typ, name, uselst)
 
def smplpkg (self, name, use='', test_use='', app_use='')
 
def dot (self, typ)
 

Public Attributes

 deps
 

Detailed Description

Definition at line 10 of file pkgdotter.py.

Constructor & Destructor Documentation

def pkgdotter.Faker.__init__ (   self)

Definition at line 11 of file pkgdotter.py.

11  def __init__(self):
12 
13  self.deps = dict()
14  for typ in 'lib app test'.split():
15  self.deps[typ] = defaultdict(set)
16 
def __init__(self)
Definition: pkgdotter.py:11
void split(std::string const &s, char c, OutIter dest)
Definition: split.h:35

Member Function Documentation

def pkgdotter.Faker.dot (   self,
  typ 
)

Definition at line 38 of file pkgdotter.py.

38  def dot(self, typ):
39  preamble=[
40  'node[shape=box];',
41  'label="Wire Cell Package Dependencies for view: %s";' % typ.upper(),
42  ]
43 
44  edges = list()
45  d = self.deps[typ]
46  exts = set()
47  for n,deps in d.items():
48  for dep in deps:
49  edges.append('%s -> %s;' % (n, dep))
50  if not dep.startswith("WireCell"):
51  exts.add(dep)
52 
53  exts = ','.join(list(exts))
54  preamble.append('{rank=same; %s}' % exts)
55 
56  preamble = '\n\t'.join(preamble)
57  body = '\n\t'.join(edges)
58  return 'digraph %s {\n\t%s\n\t%s\n}\n' % (typ, preamble, body)
59 
60 
Proc * join(Pipeline &pipeline, Proc *src, Proc *dst)
Definition: GenPipeline.h:218
def dot(self, typ)
Definition: pkgdotter.py:38
def pkgdotter.Faker.register (   self,
  typ,
  name,
  uselst 
)

Definition at line 17 of file pkgdotter.py.

17  def register(self, typ, name, uselst):
18  if type(uselst) == type(""):
19  uselst = uselst.split()
20  for one in uselst:
21  self.deps[typ][name].add(one)
22 
23 
Coord add(Coord c1, Coord c2)
Definition: restypedef.cpp:23
def register(self, typ, name, uselst)
Definition: pkgdotter.py:17
def pkgdotter.Faker.smplpkg (   self,
  name,
  use = '',
  test_use = '',
  app_use = '' 
)
Fake being the waf bld method of the same name.  The 'use'
args can be litteral lists or space separated strings and hold
names of packages on which the 'name' pacakge depends.

Definition at line 24 of file pkgdotter.py.

24  def smplpkg(self, name, use='', test_use='', app_use=''):
25  '''
26  Fake being the waf bld method of the same name. The 'use'
27  args can be litteral lists or space separated strings and hold
28  names of packages on which the 'name' pacakge depends.
29  '''
30  self.register('lib', name, use)
31 
32  self.register('app', name, use)
33  self.register('app', name, app_use)
34 
35  self.register('test', name, use)
36  self.register('test', name, test_use)
37 
def smplpkg(self, name, use='', test_use='', app_use='')
Definition: pkgdotter.py:24
def register(self, typ, name, uselst)
Definition: pkgdotter.py:17

Member Data Documentation

pkgdotter.Faker.deps

Definition at line 13 of file pkgdotter.py.


The documentation for this class was generated from the following file: