Skip to content

Commit

Permalink
added pydot and graphviz to 'all' CI deps and added fix to test_cmdli…
Browse files Browse the repository at this point in the history
…ne for missing pydot/graphviz
  • Loading branch information
naylor-b committed Apr 8, 2024
1 parent bf50de0 commit dfd0bc1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/openmdao_test_workflow.yml
Expand Up @@ -320,7 +320,8 @@ jobs:
echo "============================================================="
echo "Install additional packages for testing/coverage"
echo "============================================================="
python -m pip install pyparsing psutil objgraph pyxdsm
conda install graphviz
python -m pip install pyparsing psutil objgraph pyxdsm pydot
- name: Display environment info
id: env_info
Expand Down
24 changes: 17 additions & 7 deletions openmdao/utils/tests/test_cmdline.py
Expand Up @@ -37,6 +37,16 @@
except ImportError:
PETScVector = None

try:
import pydot
except ImportError:
pydot = None

try:
import graphviz
except ImportError:
graphviz = None


dname = os.path.dirname

Expand All @@ -55,13 +65,13 @@ def _test_func_name(func, num, param):
('openmdao comm_info {}'.format(os.path.join(scriptdir, 'circle_opt.py')), {}),
('openmdao cite {}'.format(os.path.join(scriptdir, 'circle_opt.py')), {}),
('openmdao compute_entry_points openmdao', {}),
('openmdao graph --no-display {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {}),
('openmdao graph --no-display --type=tree {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {}),
('openmdao graph --no-display --show-vars {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {}),
('openmdao graph --no-display --show-vars --no-recurse {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {}),
('openmdao graph --no-display --group=circuit {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {}),
('openmdao graph --no-display --group=circuit --show-vars {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {}),
('openmdao graph --no-display --group=circuit --show-vars --no-recurse {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {}),
('openmdao graph --no-display {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {'pydot': pydot, 'graphviz': graphviz}),
('openmdao graph --no-display --type=tree {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {'pydot': pydot, 'graphviz': graphviz}),
('openmdao graph --no-display --show-vars {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {'pydot': pydot, 'graphviz': graphviz}),
('openmdao graph --no-display --show-vars --no-recurse {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {'pydot': pydot, 'graphviz': graphviz}),
('openmdao graph --no-display --group=circuit {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {'pydot': pydot, 'graphviz': graphviz}),
('openmdao graph --no-display --group=circuit --show-vars {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {'pydot': pydot, 'graphviz': graphviz}),
('openmdao graph --no-display --group=circuit --show-vars --no-recurse {}'.format(os.path.join(scriptdir, 'circuit_analysis.py')), {'pydot': pydot, 'graphviz': graphviz}),
('openmdao iprof --no_browser {}'.format(os.path.join(scriptdir, 'circle_opt.py')),
{'tornado': tornado}),
('openmdao iprof_totals {}'.format(os.path.join(scriptdir, 'circle_opt.py')), {}),
Expand Down

0 comments on commit dfd0bc1

Please sign in to comment.