Commit 7d1c8035 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

Better loging; update readme

parent 5dbad999
......@@ -205,7 +205,25 @@ The gui package exposes the command `cadbiom` to the current context.
optional arguments:
-h, --help show this help message and exit
--make_graphs
--graphs
--json
--output [OUTPUT]
<br>
Usage in scripts:
>>> from cadbiom_cmd.solution_repr import graph_isomorph_test
>>> print(graph_isomorph_test('test.bcx', 'test2.bcx', output_dir='graphs/',
make_graphs=False, make_json=False))
INFO: 3 transitions loaded
INFO: 3 transitions loaded
INFO: BUILD GRAPH FOR SOL: Connexin_32_0 Connexin_26_0
INFO: BUILD GRAPH FOR SOL: Connexin_32_0 Connexin_26_0
INFO: Topology checking: True
INFO: Nodes checking: True
INFO: Edges checking: True
{u'nodes': True, u'edges': True, u'topology': True}
## Graphical User Interface
......
......@@ -195,7 +195,8 @@ def get_transitions(file):
# Return a dict instead of defaultdict to avoid later confusions
#(masked errors) by searching a transition that was not in the model...
assert len(transitions) != 0, "No transitions found in the model !"
assert len(transitions) != 0, "No transitions found in the model ! " \
"Please check the names of events (_h_xxx)"
return dict(transitions)
......@@ -507,7 +508,7 @@ def build_graph(solution, steps, transitions):
# Get & make all needed edges ##############################################
LOGGER.info("BUILD GRAPH FOR SOL: " + str(solution))
LOGGER.debug("BUILD GRAPH FOR SOL: " + str(solution))
LOGGER.debug("STEPS: " + str(steps))
#
# print(transitions['_h_2755'])
......@@ -801,8 +802,8 @@ def main(output_dir, model_file, solution_file):
)
def graph_isomorph_test(model_file_1, model_file_2,
output_dir, make_graphs=False, make_json=False):
def graph_isomorph_test(model_file_1, model_file_2, output_dir='graphs/',
make_graphs=False, make_json=False):
"""Entry point for model consistency checking.
This functions checks if the 2 given models have the same topology,
......
......@@ -205,7 +205,25 @@ The gui package exposes the command `cadbiom` to the current context.
optional arguments:
-h, --help show this help message and exit
--make_graphs
--graphs
--json
--output [OUTPUT]
<br>
Usage in scripts:
>>> from cadbiom_cmd.solution_repr import graph_isomorph_test
>>> print(graph_isomorph_test('test.bcx', 'test2.bcx', output_dir='graphs/',
make_graphs=False, make_json=False))
INFO: 3 transitions loaded
INFO: 3 transitions loaded
INFO: BUILD GRAPH FOR SOL: Connexin_32_0 Connexin_26_0
INFO: BUILD GRAPH FOR SOL: Connexin_32_0 Connexin_26_0
INFO: Topology checking: True
INFO: Nodes checking: True
INFO: Edges checking: True
{u'nodes': True, u'edges': True, u'topology': True}
## Graphical User Interface
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment