Last change
on this file since 6860 was
6115,
checked in by ole, 16 years ago
|
Customised dependency graphs for ANUGA. This more or less addresses ticket:84.
Now the task is to act on these graphs and restructure ANUGA accordingly.
|
File size:
791 bytes
|
Rev | Line | |
---|
[6115] | 1 | """Run ANUGA dependencies |
---|
| 2 | |
---|
| 3 | Usage |
---|
| 4 | |
---|
| 5 | python run_anuga_dependencies <anuga script> |
---|
| 6 | |
---|
| 7 | E.g: |
---|
| 8 | |
---|
| 9 | python run_anuga_dependencies.py /home/work/sandpit/anuga/anuga_validation/automated_validation_tests/okushiri_tank_validation/run_okushiri.py |
---|
| 10 | |
---|
| 11 | """ |
---|
| 12 | |
---|
| 13 | import os, sys |
---|
| 14 | if __name__ == '__main__': |
---|
| 15 | |
---|
| 16 | if len(sys.argv) != 2: |
---|
| 17 | print 'Usage:\n python %s <anuga script>' % sys.argv[0] |
---|
| 18 | else: |
---|
| 19 | script = sys.argv[1] |
---|
| 20 | |
---|
| 21 | basename, ext = os.path.splitext(script) |
---|
| 22 | msg = 'Script "%s" must be a Python file' % script |
---|
| 23 | assert ext == '.py', msg |
---|
| 24 | |
---|
| 25 | depgraph = os.path.split(basename)[-1] + '_depgraph.png' |
---|
| 26 | |
---|
| 27 | s = 'python py2depgraph.py %s | python anuga_depgraph2dot.py | dot -T png -o %s' % (script, depgraph) |
---|
| 28 | print s |
---|
| 29 | os.system(s) |
---|
Note: See
TracBrowser
for help on using the repository browser.