)]}'
{"doc/source/not_operator_support.rst":[{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":32,"context_line":"              - action: ..."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"All the sections are in use as described in the \"vitrage-template-format.yaml\" file."},{"line_number":36,"context_line":"But in the condition section it will be possible to write the \"not\" operator in addition to the \"and\" and \"or\" operators."},{"line_number":37,"context_line":"The \"not\" operator can be used only before relationship expression."},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_37425b11","line":35,"updated":"2017-03-19 21:11:06.000000000","message":"I think you meant \"vitrage-template-format.rst\" file","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":32,"context_line":"              - action: ..."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"All the sections are in use as described in the \"vitrage-template-format.yaml\" file."},{"line_number":36,"context_line":"But in the condition section it will be possible to write the \"not\" operator in addition to the \"and\" and \"or\" operators."},{"line_number":37,"context_line":"The \"not\" operator can be used only before relationship expression."},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_de54bc22","line":35,"in_reply_to":"1a1ced50_37425b11","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"All the sections are in use as described in the \"vitrage-template-format.yaml\" file."},{"line_number":36,"context_line":"But in the condition section it will be possible to write the \"not\" operator in addition to the \"and\" and \"or\" operators."},{"line_number":37,"context_line":"The \"not\" operator can be used only before relationship expression."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Condition Format"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_774cd342","line":37,"updated":"2017-03-19 21:11:06.000000000","message":"...before a relationship...","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"All the sections are in use as described in the \"vitrage-template-format.yaml\" file."},{"line_number":36,"context_line":"But in the condition section it will be possible to write the \"not\" operator in addition to the \"and\" and \"or\" operators."},{"line_number":37,"context_line":"The \"not\" operator can be used only before relationship expression."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Condition Format"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_5e3fecd5","line":37,"in_reply_to":"1a1ced50_774cd342","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":37,"context_line":"The \"not\" operator can be used only before relationship expression."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Condition Format"},{"line_number":41,"context_line":"----------------"},{"line_number":42,"context_line":"The condition which needs to be met will be phrased using the entities and"},{"line_number":43,"context_line":"relationships previously defined. An expression is either a *single* entity,"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_f75e03e8","line":40,"updated":"2017-03-19 21:11:06.000000000","message":"I think you don\u0027t need to copy the entire text from the basic documentation - you only need to focus on line 51, really, as the rest is in vitrage-template-format.rst","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":37,"context_line":"The \"not\" operator can be used only before relationship expression."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Condition Format"},{"line_number":41,"context_line":"----------------"},{"line_number":42,"context_line":"The condition which needs to be met will be phrased using the entities and"},{"line_number":43,"context_line":"relationships previously defined. An expression is either a *single* entity,"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_590d4636","line":40,"in_reply_to":"1a1ced50_f75e03e8","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"Use Case 1:"},{"line_number":71,"context_line":"-----------"},{"line_number":72,"context_line":"Host Connected to Vm and not connected to alarm."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"+--------+         +--------+   Not    +---------+"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_d768278a","line":72,"updated":"2017-03-19 21:11:06.000000000","message":"Rephrase to: There exists an instance on Host but there is no Alarm on the instance. (In general, should avoid \"connected\" in describing the use case - connectivity is a graph term, not a user term)","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"Use Case 1:"},{"line_number":71,"context_line":"-----------"},{"line_number":72,"context_line":"Host Connected to Vm and not connected to alarm."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"+--------+         +--------+   Not    +---------+"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_b991da9b","line":72,"in_reply_to":"1a1ced50_d768278a","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":" ::"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    metadata:"},{"line_number":82,"context_line":"        name: host_high_mem_load_to_instance_mem_suboptimal"},{"line_number":83,"context_line":"        description: when there is high memory on the host, show implications on the instances"},{"line_number":84,"context_line":"    definitions:"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_575c37ed","line":81,"updated":"2017-03-19 21:11:06.000000000","message":"metadata fields do not correspond to the example","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":" ::"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    metadata:"},{"line_number":82,"context_line":"        name: host_high_mem_load_to_instance_mem_suboptimal"},{"line_number":83,"context_line":"        description: when there is high memory on the host, show implications on the instances"},{"line_number":84,"context_line":"    definitions:"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_99d97e86","line":81,"in_reply_to":"1a1ced50_575c37ed","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                template_id : host_contains_instance"},{"line_number":109,"context_line":"    scenarios:"},{"line_number":110,"context_line":"        - scenario:"},{"line_number":111,"context_line":"            condition: host_contains_instance and not alarm_on_instance"},{"line_number":112,"context_line":"            actions:"},{"line_number":113,"context_line":"                - action:"},{"line_number":114,"context_line":"                   action_type: set_state"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_976eaf94","line":111,"updated":"2017-03-19 21:11:06.000000000","message":"confusing example - why is the host important for the use case if you set the state of the instance?","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                template_id : host_contains_instance"},{"line_number":109,"context_line":"    scenarios:"},{"line_number":110,"context_line":"        - scenario:"},{"line_number":111,"context_line":"            condition: host_contains_instance and not alarm_on_instance"},{"line_number":112,"context_line":"            actions:"},{"line_number":113,"context_line":"                - action:"},{"line_number":114,"context_line":"                   action_type: set_state"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_59ce26b5","line":111,"in_reply_to":"1a1ced50_976eaf94","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":121,"context_line":"Use Case 2:"},{"line_number":122,"context_line":"-----------"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"There is no alarm on host."},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"+--------+   Not     +---------+"},{"line_number":127,"context_line":"|  Host  | \u003c - - - - |  Alarm  |"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_1709dfdd","line":124,"updated":"2017-03-19 21:11:06.000000000","message":"how do we know if this means (A) there exists a host with no alarm, or (B) there exists an alarm that is not on a host or (C) either one? \nDo we rely implicitly/explicitly on the action target, or something like this?","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":121,"context_line":"Use Case 2:"},{"line_number":122,"context_line":"-----------"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"There is no alarm on host."},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"+--------+   Not     +---------+"},{"line_number":127,"context_line":"|  Host  | \u003c - - - - |  Alarm  |"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_193bce9d","line":124,"in_reply_to":"1a1ced50_1709dfdd","updated":"2017-03-20 08:02:12.000000000","message":"The user knows on what entity he wants to perform his action and thus how to call his template.","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":" ::"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    metadata:"},{"line_number":133,"context_line":"        name: host_high_mem_load_to_instance_mem_suboptimal"},{"line_number":134,"context_line":"        description: when there is high memory on the host, show implications on the instances"},{"line_number":135,"context_line":"    definitions:"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_5713570d","line":132,"updated":"2017-03-19 21:11:06.000000000","message":"metadata does not correspond to content of template","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":" ::"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    metadata:"},{"line_number":133,"context_line":"        name: host_high_mem_load_to_instance_mem_suboptimal"},{"line_number":134,"context_line":"        description: when there is high memory on the host, show implications on the instances"},{"line_number":135,"context_line":"    definitions:"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_399a4a64","line":132,"in_reply_to":"1a1ced50_5713570d","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":163,"context_line":"Use Case 3:"},{"line_number":164,"context_line":"-----------"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"The Switch is connected to a Host that is connected to a Vm."},{"line_number":167,"context_line":"The Switch is also connected to a Network which has a Port."},{"line_number":168,"context_line":"The Vm and the Port can not be connected."},{"line_number":169,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_d7ff47a8","line":166,"updated":"2017-03-19 21:11:06.000000000","message":"rephrase to not use terms such as \"connected\", which are graph terms.","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":163,"context_line":"Use Case 3:"},{"line_number":164,"context_line":"-----------"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"The Switch is connected to a Host that is connected to a Vm."},{"line_number":167,"context_line":"The Switch is also connected to a Network which has a Port."},{"line_number":168,"context_line":"The Vm and the Port can not be connected."},{"line_number":169,"context_line":""}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_19baeec0","line":166,"in_reply_to":"1a1ced50_d7ff47a8","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":" ::"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    metadata:"},{"line_number":188,"context_line":"        name: host_high_mem_load_to_instance_mem_suboptimal"},{"line_number":189,"context_line":"        description: when there is high memory on the host, show implications on the instances"},{"line_number":190,"context_line":"    definitions:"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_f72c434c","line":187,"updated":"2017-03-19 21:11:06.000000000","message":"metadata not matching template content","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":184,"context_line":""},{"line_number":185,"context_line":" ::"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    metadata:"},{"line_number":188,"context_line":"        name: host_high_mem_load_to_instance_mem_suboptimal"},{"line_number":189,"context_line":"        description: when there is high memory on the host, show implications on the instances"},{"line_number":190,"context_line":"    definitions:"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_f9dd1215","line":187,"in_reply_to":"1a1ced50_f72c434c","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":260,"context_line":"But the Vm is not connected to the Stack."},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"+---------+           +---------+      Not       +---------+            +---------+"},{"line_number":263,"context_line":"|  Host   | --------\u003e |   Vm    |  - - - - - -\u003e  |  Stack  | \u003c--------- |  Alarm  |"},{"line_number":264,"context_line":"+---------+           +---------+                +---------+            +---------+"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":" ::"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_1730ff9d","line":263,"updated":"2017-03-19 21:11:06.000000000","message":"Need to explain what the rule is for what is supported and what is not - to a non-expert this looks the same as Use Case 2 or 3 above, for example.","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":260,"context_line":"But the Vm is not connected to the Stack."},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"+---------+           +---------+      Not       +---------+            +---------+"},{"line_number":263,"context_line":"|  Host   | --------\u003e |   Vm    |  - - - - - -\u003e  |  Stack  | \u003c--------- |  Alarm  |"},{"line_number":264,"context_line":"+---------+           +---------+                +---------+            +---------+"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":" ::"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_d945b6b3","line":263,"in_reply_to":"1a1ced50_1730ff9d","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":" ::"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    metadata:"},{"line_number":269,"context_line":"        name: host_high_mem_load_to_instance_mem_suboptimal"},{"line_number":270,"context_line":"        description: when there is high memory on the host, show implications on the instances"},{"line_number":271,"context_line":"    definitions:"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_3727bb65","line":268,"updated":"2017-03-19 21:11:06.000000000","message":"metadata does not fit the content of the template","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":" ::"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    metadata:"},{"line_number":269,"context_line":"        name: host_high_mem_load_to_instance_mem_suboptimal"},{"line_number":270,"context_line":"        description: when there is high memory on the host, show implications on the instances"},{"line_number":271,"context_line":"    definitions:"}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a1ced50_19082e91","line":268,"in_reply_to":"1a1ced50_3727bb65","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"edc8d5cff5f5903c717140a37e36d44247714866","unresolved":false,"context_lines":[{"line_number":114,"context_line":"Use Case 2:"},{"line_number":115,"context_line":"-----------"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"There exists a host with no alarm."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"+--------+    Not    +---------+"},{"line_number":120,"context_line":"|  Host  | \u003c - - - - |  Alarm  |"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a1ced50_5d0ced3a","line":117,"updated":"2017-03-22 06:00:42.000000000","message":"To follow up on your comment from patch-set 13 - if the action is what defines (implicitly) what the template means, then we should add the following text here and also in use case #1, and in the intro to the BP:\n\n\"Note that in the example subgraph shown here the situation can be interpreted as either (1) a host with no alarm or (2) an alarm not connected to a host. In such a case, the evaluator will detect both cases depending on:\n[a] the event that triggered the analysis, e.g., if an alarm was updated, then the template will be read as \"an alarm not connected to a host\"\n[b] actions specified in the \"actions\" section of the scenario will only be applied if their target is (connected to) the entity triggered.\"\n\nIs the above correct?","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"}],"vitrage/datasources/static/driver.py":[{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"b9eb04e72e32644a0136ac73b22f4c251b2ee005","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def _is_valid_config(config):"},{"line_number":41,"context_line":"        \"\"\"check for validity of configuration\"\"\""},{"line_number":42,"context_line":"        # TODO(yujunz) check with yaml schema or reuse template validation"},{"line_number":43,"context_line":"        return TemplateTopologyFields.DEFINITIONS in config"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    @staticmethod"},{"line_number":46,"context_line":"    def get_event_types():"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba2be162_7bb3abe9","line":43,"updated":"2017-03-02 17:47:11.000000000","message":"It seems not correct to have an enum named \"TemplateXXX\" used within a datasource driver. Same applies to all the changes in this file.","commit_id":"424cfb62de195689e710e9f04ecde21ef4edb609"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def _is_valid_config(config):"},{"line_number":41,"context_line":"        \"\"\"check for validity of configuration\"\"\""},{"line_number":42,"context_line":"        # TODO(yujunz) check with yaml schema or reuse template validation"},{"line_number":43,"context_line":"        return TemplateTopologyFields.DEFINITIONS in config"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    @staticmethod"},{"line_number":46,"context_line":"    def get_event_types():"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_971cef14","line":43,"updated":"2017-03-19 21:11:06.000000000","message":"It seems not correct to have an enum named \"TemplateXXX\" used within a datasource driver. Same applies to all the changes in this file.","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def _is_valid_config(config):"},{"line_number":41,"context_line":"        \"\"\"check for validity of configuration\"\"\""},{"line_number":42,"context_line":"        # TODO(yujunz) check with yaml schema or reuse template validation"},{"line_number":43,"context_line":"        return TemplateTopologyFields.DEFINITIONS in config"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    @staticmethod"},{"line_number":46,"context_line":"    def get_event_types():"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_7d190d79","line":43,"in_reply_to":"1a1ced50_971cef14","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"}],"vitrage/datasources/static/transformer.py":[{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"b9eb04e72e32644a0136ac73b22f4c251b2ee005","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        return STATIC_DATASOURCE"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _create_vertex(self, entity_event):"},{"line_number":61,"context_line":"        metadata \u003d entity_event.get(TemplateTopologyFields.METADATA, {})"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        entity_type \u003d entity_event[VProps.TYPE]"},{"line_number":64,"context_line":"        entity_id \u003d entity_event[VProps.ID]"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba2be162_7b01eb69","line":61,"updated":"2017-03-02 17:47:11.000000000","message":"It seems not correct to have an enum named \"TemplateXXX\" used within a datasource transformer. Same applies to all the changes in this file.","commit_id":"424cfb62de195689e710e9f04ecde21ef4edb609"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        return STATIC_DATASOURCE"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _create_vertex(self, entity_event):"},{"line_number":61,"context_line":"        metadata \u003d entity_event.get(TemplateTopologyFields.METADATA, {})"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        entity_type \u003d entity_event[VProps.TYPE]"},{"line_number":64,"context_line":"        entity_id \u003d entity_event[VProps.ID]"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_b71bab1a","line":61,"updated":"2017-03-19 21:11:06.000000000","message":"It seems not correct to have an enum named \"TemplateXXX\" used within a datasource transformer. Same applies to all the changes in this file.","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        return STATIC_DATASOURCE"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _create_vertex(self, entity_event):"},{"line_number":61,"context_line":"        metadata \u003d entity_event.get(TemplateTopologyFields.METADATA, {})"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        entity_type \u003d entity_event[VProps.TYPE]"},{"line_number":64,"context_line":"        entity_id \u003d entity_event[VProps.ID]"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_dd20419e","line":61,"in_reply_to":"1a1ced50_b71bab1a","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"}],"vitrage/evaluator/scenario_evaluator.py":[{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"c3b0f1a82298efd7088fa00fe1f25d602d145db5","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                  str(before),"},{"line_number":88,"context_line":"                  str(current))"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        ############### check why Elisha wrote this #############################"},{"line_number":91,"context_line":"        # todo (erosensw): support for NOT conditions - reverse logic"},{"line_number":92,"context_line":"        before_scenarios \u003d self._get_element_scenarios(before, is_vertex)"},{"line_number":93,"context_line":"        current_scenarios \u003d self._get_element_scenarios(current, is_vertex)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_253982d9","line":90,"updated":"2017-02-09 16:40:57.000000000","message":"In what follows we determine which templates we use the \"do\" action and which the \"undo\". When there is no \"not\", the rule is before_scenarios --\u003e \"undo\", current_scenarios --\u003e \"do\". \n\nIf the trigger is for a NOT edge in the template, we MIGHT need to flip this rule, depending on how the ScenarioRepo was changed to support NOT.","commit_id":"b3955d7231f664ee02f626ea6d167ca618434e06"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"b2c89f1053de53014d7a1f7090001c6c708f8323","unresolved":false,"context_lines":[{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    @staticmethod"},{"line_number":225,"context_line":"    def _set_relationship_info(edge_description, is_not_condition):"},{"line_number":226,"context_line":"        if is_not_condition:"},{"line_number":227,"context_line":"            edge_description.edge[NEG_CONDITION] \u003d True"},{"line_number":228,"context_line":"            edge_description.edge[EProps.IS_DELETED] \u003d True"},{"line_number":229,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"da36d5c6_d4504661","line":226,"range":{"start_line":226,"start_character":11,"end_line":226,"end_character":27},"updated":"2017-02-28 09:47:51.000000000","message":"rename to is_negative_condition","commit_id":"1c402b6db141e5b35d542def2c75de528dafabe7"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"b9eb04e72e32644a0136ac73b22f4c251b2ee005","unresolved":false,"context_lines":[{"line_number":224,"context_line":"    @staticmethod"},{"line_number":225,"context_line":"    def _set_relationship_info(edge_description, is_negative_condition):"},{"line_number":226,"context_line":"        if is_negative_condition:"},{"line_number":227,"context_line":"            edge_description.edge[NEG_CONDITION] \u003d True"},{"line_number":228,"context_line":"            edge_description.edge[EProps.IS_DELETED] \u003d True"},{"line_number":229,"context_line":"        else:"},{"line_number":230,"context_line":"            edge_description.edge[EProps.IS_DELETED] \u003d False"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba2be162_fb015b07","line":227,"updated":"2017-03-02 17:47:11.000000000","message":"why do we set IS_DELETED \u003d\u003d False when that\u0027s the same as NEG_CONDITION?","commit_id":"424cfb62de195689e710e9f04ecde21ef4edb609"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":251,"context_line":"            edge_description.edge[NEG_CONDITION] \u003d True"},{"line_number":252,"context_line":"            edge_description.edge[EProps.IS_DELETED] \u003d True"},{"line_number":253,"context_line":"        else:"},{"line_number":254,"context_line":"            edge_description.edge[EProps.IS_DELETED] \u003d False"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        edge_description.source[VProps.IS_DELETED] \u003d False"},{"line_number":257,"context_line":"        edge_description.target[VProps.IS_DELETED] \u003d False"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_37dedb3f","line":254,"updated":"2017-03-19 21:11:06.000000000","message":"why do we set IS_DELETED \u003d\u003d False/True when it\u0027s the same as NEG_CONDITION every time? Perhaps a comment is enough here to explain.","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":251,"context_line":"            edge_description.edge[NEG_CONDITION] \u003d True"},{"line_number":252,"context_line":"            edge_description.edge[EProps.IS_DELETED] \u003d True"},{"line_number":253,"context_line":"        else:"},{"line_number":254,"context_line":"            edge_description.edge[EProps.IS_DELETED] \u003d False"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        edge_description.source[VProps.IS_DELETED] \u003d False"},{"line_number":257,"context_line":"        edge_description.target[VProps.IS_DELETED] \u003d False"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_1dfad9bd","line":254,"in_reply_to":"1a1ced50_37dedb3f","updated":"2017-03-20 08:02:12.000000000","message":"It is not enough, because we need it in the subgraph matching to find the correct subgraph when we have an entity that was deleted and due to that its is_deleted property was set to True, and thus in order for the subgraph matching to find the correct match we need it.","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"fefd41bec1957edd095ea3b50866b28aa079d1b1","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                                        element,"},{"line_number":164,"context_line":"                                                        scenario_element,"},{"line_number":165,"context_line":"                                                        action)"},{"line_number":166,"context_line":"                if matches:"},{"line_number":167,"context_line":"                    for is_switch_mode, match in matches:"},{"line_number":168,"context_line":"                        for mat in match:"},{"line_number":169,"context_line":"                            new_mode \u003d mode"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_fc35f645","line":166,"range":{"start_line":166,"start_character":16,"end_line":166,"end_character":27},"updated":"2017-03-20 15:15:26.000000000","message":"this if is not needed, if the list is empty we wont go into the loop","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d2c5b9ff810bc149e3eef894f87dcd3db1d530fc","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                                        element,"},{"line_number":164,"context_line":"                                                        scenario_element,"},{"line_number":165,"context_line":"                                                        action)"},{"line_number":166,"context_line":"                if matches:"},{"line_number":167,"context_line":"                    for is_switch_mode, match in matches:"},{"line_number":168,"context_line":"                        for mat in match:"},{"line_number":169,"context_line":"                            new_mode \u003d mode"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_a2c6d097","line":166,"range":{"start_line":166,"start_character":16,"end_line":166,"end_character":27},"in_reply_to":"1a1ced50_fc35f645","updated":"2017-03-21 11:35:09.000000000","message":"Done","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"fefd41bec1957edd095ea3b50866b28aa079d1b1","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                                                        scenario_element,"},{"line_number":165,"context_line":"                                                        action)"},{"line_number":166,"context_line":"                if matches:"},{"line_number":167,"context_line":"                    for is_switch_mode, match in matches:"},{"line_number":168,"context_line":"                        for mat in match:"},{"line_number":169,"context_line":"                            new_mode \u003d mode"},{"line_number":170,"context_line":"                            if is_switch_mode:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_0b13660e","line":167,"range":{"start_line":167,"start_character":20,"end_line":167,"end_character":57},"updated":"2017-03-20 15:15:26.000000000","message":"is_switch_mode changes per scenario_element and not per match, therefor should be calculated outside of _evaluate_full_condition","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d2c5b9ff810bc149e3eef894f87dcd3db1d530fc","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                                                        scenario_element,"},{"line_number":165,"context_line":"                                                        action)"},{"line_number":166,"context_line":"                if matches:"},{"line_number":167,"context_line":"                    for is_switch_mode, match in matches:"},{"line_number":168,"context_line":"                        for mat in match:"},{"line_number":169,"context_line":"                            new_mode \u003d mode"},{"line_number":170,"context_line":"                            if is_switch_mode:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_825b94f5","line":167,"range":{"start_line":167,"start_character":20,"end_line":167,"end_character":57},"in_reply_to":"1a1ced50_0b13660e","updated":"2017-03-21 11:35:09.000000000","message":"It is calculated per scenario, and thus it should be calculated in the _evaluate_and_condition because we need the subgraph of the condition, and thus it is ok.","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"fefd41bec1957edd095ea3b50866b28aa079d1b1","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                                             element,"},{"line_number":215,"context_line":"                                             scenario_element,"},{"line_number":216,"context_line":"                                             action)"},{"line_number":217,"context_line":"            condition_matches.append(and_condition_matches)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        return condition_matches"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_065c4aec","line":217,"range":{"start_line":217,"start_character":12,"end_line":217,"end_character":59},"updated":"2017-03-20 15:15:26.000000000","message":"BUG, adding the list as an item. use +\u003d or extend instead of append","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d2c5b9ff810bc149e3eef894f87dcd3db1d530fc","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                                             element,"},{"line_number":215,"context_line":"                                             scenario_element,"},{"line_number":216,"context_line":"                                             action)"},{"line_number":217,"context_line":"            condition_matches.append(and_condition_matches)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        return condition_matches"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_a2225050","line":217,"range":{"start_line":217,"start_character":12,"end_line":217,"end_character":59},"in_reply_to":"1a1ced50_065c4aec","updated":"2017-03-21 11:35:09.000000000","message":"Done","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"fefd41bec1957edd095ea3b50866b28aa079d1b1","unresolved":false,"context_lines":[{"line_number":294,"context_line":"        if filtered_subgraph.get_vertex(scen_ver.vertex_id):"},{"line_number":295,"context_line":"            initial_map \u003d Mapping(scen_ver, ver, True)"},{"line_number":296,"context_line":"            return switch_mode, \\"},{"line_number":297,"context_line":"                self._entity_graph.algo.sub_graph_matching(subgraph,"},{"line_number":298,"context_line":"                                                           initial_map)"},{"line_number":299,"context_line":"        else:"},{"line_number":300,"context_line":"            switch_mode \u003d True"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_3f42203f","line":297,"range":{"start_line":297,"start_character":59,"end_line":297,"end_character":67},"updated":"2017-03-20 15:15:26.000000000","message":"subgraph or filtered_subgraph?","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d2c5b9ff810bc149e3eef894f87dcd3db1d530fc","unresolved":false,"context_lines":[{"line_number":294,"context_line":"        if filtered_subgraph.get_vertex(scen_ver.vertex_id):"},{"line_number":295,"context_line":"            initial_map \u003d Mapping(scen_ver, ver, True)"},{"line_number":296,"context_line":"            return switch_mode, \\"},{"line_number":297,"context_line":"                self._entity_graph.algo.sub_graph_matching(subgraph,"},{"line_number":298,"context_line":"                                                           initial_map)"},{"line_number":299,"context_line":"        else:"},{"line_number":300,"context_line":"            switch_mode \u003d True"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_02724449","line":297,"range":{"start_line":297,"start_character":59,"end_line":297,"end_character":67},"in_reply_to":"1a1ced50_3f42203f","updated":"2017-03-21 11:35:09.000000000","message":"Done","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"fefd41bec1957edd095ea3b50866b28aa079d1b1","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            switch_mode \u003d True"},{"line_number":301,"context_line":"            return switch_mode, []"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def _find_edge_subgraph_matching(self, subgraph, action, ver, scen_ver):"},{"line_number":304,"context_line":"        # TODO(alexey_weyl): add documentation"},{"line_number":305,"context_line":"        switch_mode \u003d \\"},{"line_number":306,"context_line":"            subgraph.get_edge(scen_ver.source.vertex_id,"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_2bd2e200","line":303,"range":{"start_line":303,"start_character":66,"end_line":303,"end_character":74},"updated":"2017-03-20 15:15:26.000000000","message":"rename to scen_edge","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d2c5b9ff810bc149e3eef894f87dcd3db1d530fc","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            switch_mode \u003d True"},{"line_number":301,"context_line":"            return switch_mode, []"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def _find_edge_subgraph_matching(self, subgraph, action, ver, scen_ver):"},{"line_number":304,"context_line":"        # TODO(alexey_weyl): add documentation"},{"line_number":305,"context_line":"        switch_mode \u003d \\"},{"line_number":306,"context_line":"            subgraph.get_edge(scen_ver.source.vertex_id,"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_42c19c53","line":303,"range":{"start_line":303,"start_character":66,"end_line":303,"end_character":74},"in_reply_to":"1a1ced50_2bd2e200","updated":"2017-03-21 11:35:09.000000000","message":"Done","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"fefd41bec1957edd095ea3b50866b28aa079d1b1","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            subgraph.update_edge(scen_ver.edge)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        initial_map \u003d Mapping(scen_ver.edge, ver, False)"},{"line_number":320,"context_line":"        matches \u003d self._entity_graph.algo.sub_graph_matching(subgraph,"},{"line_number":321,"context_line":"                                                             initial_map)"},{"line_number":322,"context_line":"        for match in matches:"},{"line_number":323,"context_line":"            ver_ids \u003d [v.vertex_id for v in filtered_subgraph.get_vertices()]"},{"line_number":324,"context_line":"            ver_to_remove \u003d [id for id in match.keys() if id not in ver_ids]"},{"line_number":325,"context_line":"            for v_id in ver_to_remove:"},{"line_number":326,"context_line":"                del match[v_id]"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        return switch_mode, matches"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_9503f00c","line":326,"range":{"start_line":320,"start_character":0,"end_line":326,"end_character":31},"updated":"2017-03-20 15:15:26.000000000","message":"can we just run sub_graph_matching on filtered_subgraph instead of filtering the results?","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d2c5b9ff810bc149e3eef894f87dcd3db1d530fc","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            subgraph.update_edge(scen_ver.edge)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        initial_map \u003d Mapping(scen_ver.edge, ver, False)"},{"line_number":320,"context_line":"        matches \u003d self._entity_graph.algo.sub_graph_matching(subgraph,"},{"line_number":321,"context_line":"                                                             initial_map)"},{"line_number":322,"context_line":"        for match in matches:"},{"line_number":323,"context_line":"            ver_ids \u003d [v.vertex_id for v in filtered_subgraph.get_vertices()]"},{"line_number":324,"context_line":"            ver_to_remove \u003d [id for id in match.keys() if id not in ver_ids]"},{"line_number":325,"context_line":"            for v_id in ver_to_remove:"},{"line_number":326,"context_line":"                del match[v_id]"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        return switch_mode, matches"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_900d95ea","line":326,"range":{"start_line":320,"start_character":0,"end_line":326,"end_character":31},"in_reply_to":"1a1ced50_9503f00c","updated":"2017-03-21 11:35:09.000000000","message":"No","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        actions \u003d {}"},{"line_number":160,"context_line":"        for action in scenario.actions:"},{"line_number":161,"context_line":"            for scenario_element in scenario_elements:"},{"line_number":162,"context_line":"                matches_lst \u003d self._evaluate_full_condition(scenario.condition,"},{"line_number":163,"context_line":"                                                            element,"},{"line_number":164,"context_line":"                                                            scenario_element,"},{"line_number":165,"context_line":"                                                            action)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_120d603e","line":162,"range":{"start_line":162,"start_character":16,"end_line":162,"end_character":27},"updated":"2017-03-20 11:49:32.000000000","message":"I think that naming a variable with implementation details is bad why not matches","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        actions \u003d {}"},{"line_number":160,"context_line":"        for action in scenario.actions:"},{"line_number":161,"context_line":"            for scenario_element in scenario_elements:"},{"line_number":162,"context_line":"                matches_lst \u003d self._evaluate_full_condition(scenario.condition,"},{"line_number":163,"context_line":"                                                            element,"},{"line_number":164,"context_line":"                                                            scenario_element,"},{"line_number":165,"context_line":"                                                            action)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_af3ddebc","line":162,"range":{"start_line":162,"start_character":16,"end_line":162,"end_character":27},"in_reply_to":"1a1ced50_120d603e","updated":"2017-03-21 08:58:51.000000000","message":"because we use matches right after that.","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    def _process_scenario(self, element, scenario, scenario_elements, mode):"},{"line_number":157,"context_line":"        if not isinstance(scenario_elements, list):"},{"line_number":158,"context_line":"            scenario_elements \u003d [scenario_elements]"},{"line_number":159,"context_line":"        actions \u003d {}"},{"line_number":160,"context_line":"        for action in scenario.actions:"},{"line_number":161,"context_line":"            for scenario_element in scenario_elements:"},{"line_number":162,"context_line":"                matches_lst \u003d self._evaluate_full_condition(scenario.condition,"},{"line_number":163,"context_line":"                                                            element,"},{"line_number":164,"context_line":"                                                            scenario_element,"},{"line_number":165,"context_line":"                                                            action)"},{"line_number":166,"context_line":"                if matches_lst:"},{"line_number":167,"context_line":"                    for is_switch_mode, matches in matches_lst:"},{"line_number":168,"context_line":"                        for mat in matches:"},{"line_number":169,"context_line":"                            new_mode \u003d mode"},{"line_number":170,"context_line":"                            if is_switch_mode:"},{"line_number":171,"context_line":"                                new_mode \u003d ActionMode.UNDO \\"},{"line_number":172,"context_line":"                                    if mode \u003d\u003d ActionMode.DO else ActionMode.DO"},{"line_number":173,"context_line":"                            spec, action_id \u003d \\"},{"line_number":174,"context_line":"                                self._get_action_spec(action, mat)"},{"line_number":175,"context_line":"                            match_hash \u003d hash(tuple(sorted(mat.items())))"},{"line_number":176,"context_line":"                            actions[action_id] \u003d \\"},{"line_number":177,"context_line":"                                ActionInfo(spec, new_mode,"},{"line_number":178,"context_line":"                                           scenario.id,"},{"line_number":179,"context_line":"                                           match_hash)"},{"line_number":180,"context_line":"        return actions"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_863595db","line":179,"range":{"start_line":159,"start_character":8,"end_line":179,"end_character":54},"updated":"2017-03-20 11:49:32.000000000","message":"I would refactor this method to small methods that explain\nwhat this method does","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    def _process_scenario(self, element, scenario, scenario_elements, mode):"},{"line_number":157,"context_line":"        if not isinstance(scenario_elements, list):"},{"line_number":158,"context_line":"            scenario_elements \u003d [scenario_elements]"},{"line_number":159,"context_line":"        actions \u003d {}"},{"line_number":160,"context_line":"        for action in scenario.actions:"},{"line_number":161,"context_line":"            for scenario_element in scenario_elements:"},{"line_number":162,"context_line":"                matches_lst \u003d self._evaluate_full_condition(scenario.condition,"},{"line_number":163,"context_line":"                                                            element,"},{"line_number":164,"context_line":"                                                            scenario_element,"},{"line_number":165,"context_line":"                                                            action)"},{"line_number":166,"context_line":"                if matches_lst:"},{"line_number":167,"context_line":"                    for is_switch_mode, matches in matches_lst:"},{"line_number":168,"context_line":"                        for mat in matches:"},{"line_number":169,"context_line":"                            new_mode \u003d mode"},{"line_number":170,"context_line":"                            if is_switch_mode:"},{"line_number":171,"context_line":"                                new_mode \u003d ActionMode.UNDO \\"},{"line_number":172,"context_line":"                                    if mode \u003d\u003d ActionMode.DO else ActionMode.DO"},{"line_number":173,"context_line":"                            spec, action_id \u003d \\"},{"line_number":174,"context_line":"                                self._get_action_spec(action, mat)"},{"line_number":175,"context_line":"                            match_hash \u003d hash(tuple(sorted(mat.items())))"},{"line_number":176,"context_line":"                            actions[action_id] \u003d \\"},{"line_number":177,"context_line":"                                ActionInfo(spec, new_mode,"},{"line_number":178,"context_line":"                                           scenario.id,"},{"line_number":179,"context_line":"                                           match_hash)"},{"line_number":180,"context_line":"        return actions"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_8fcf427e","line":179,"range":{"start_line":159,"start_character":8,"end_line":179,"end_character":54},"in_reply_to":"1a1ced50_863595db","updated":"2017-03-21 08:58:51.000000000","message":"Done","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        initial_map \u003d Mapping(scen_ver.edge, ver, False)"},{"line_number":320,"context_line":"        matches \u003d self._entity_graph.algo.sub_graph_matching(subgraph,"},{"line_number":321,"context_line":"                                                             initial_map)"},{"line_number":322,"context_line":"        for match in matches:"},{"line_number":323,"context_line":"            ver_ids \u003d [v.vertex_id for v in filtered_subgraph.get_vertices()]"},{"line_number":324,"context_line":"            ver_to_remove \u003d [id for id in match.keys() if id not in ver_ids]"},{"line_number":325,"context_line":"            for v_id in ver_to_remove:"},{"line_number":326,"context_line":"                del match[v_id]"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        return switch_mode, matches"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_c69b0dc8","line":326,"range":{"start_line":322,"start_character":8,"end_line":326,"end_character":31},"updated":"2017-03-20 11:49:32.000000000","message":"refactor to a method like remove_vertices....","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        initial_map \u003d Mapping(scen_ver.edge, ver, False)"},{"line_number":320,"context_line":"        matches \u003d self._entity_graph.algo.sub_graph_matching(subgraph,"},{"line_number":321,"context_line":"                                                             initial_map)"},{"line_number":322,"context_line":"        for match in matches:"},{"line_number":323,"context_line":"            ver_ids \u003d [v.vertex_id for v in filtered_subgraph.get_vertices()]"},{"line_number":324,"context_line":"            ver_to_remove \u003d [id for id in match.keys() if id not in ver_ids]"},{"line_number":325,"context_line":"            for v_id in ver_to_remove:"},{"line_number":326,"context_line":"                del match[v_id]"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        return switch_mode, matches"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_0fdef210","line":326,"range":{"start_line":322,"start_character":8,"end_line":326,"end_character":31},"in_reply_to":"1a1ced50_c69b0dc8","updated":"2017-03-21 08:58:51.000000000","message":"Done","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import vitrage.evaluator.actions.priority_tools as pt"},{"line_number":27,"context_line":"from vitrage.evaluator.template_data import ActionSpecs"},{"line_number":28,"context_line":"from vitrage.evaluator.template_data import EdgeDescription"},{"line_number":29,"context_line":"from vitrage.evaluator.template_data import ENTITY"},{"line_number":30,"context_line":"from vitrage.graph.algo_driver.algorithm import Mapping"},{"line_number":31,"context_line":"from vitrage.graph.algo_driver.sub_graph_matching import \\"},{"line_number":32,"context_line":"    NEG_CONDITION"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_12389fee","line":29,"updated":"2017-03-22 10:27:40.000000000","message":"remove this import","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":26,"context_line":"import vitrage.evaluator.actions.priority_tools as pt"},{"line_number":27,"context_line":"from vitrage.evaluator.template_data import ActionSpecs"},{"line_number":28,"context_line":"from vitrage.evaluator.template_data import EdgeDescription"},{"line_number":29,"context_line":"from vitrage.evaluator.template_data import ENTITY"},{"line_number":30,"context_line":"from vitrage.graph.algo_driver.algorithm import Mapping"},{"line_number":31,"context_line":"from vitrage.graph.algo_driver.sub_graph_matching import \\"},{"line_number":32,"context_line":"    NEG_CONDITION"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_0af77b8b","line":29,"in_reply_to":"1a1ced50_12389fee","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from vitrage.graph.algo_driver.algorithm import Mapping"},{"line_number":31,"context_line":"from vitrage.graph.algo_driver.sub_graph_matching import \\"},{"line_number":32,"context_line":"    NEG_CONDITION"},{"line_number":33,"context_line":"from vitrage.graph.driver.networkx_graph import NXGraph"},{"line_number":34,"context_line":"from vitrage.graph.driver import Vertex"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"LOG \u003d log.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_523e97da","line":33,"updated":"2017-03-22 10:27:40.000000000","message":"remove this import","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from vitrage.graph.algo_driver.algorithm import Mapping"},{"line_number":31,"context_line":"from vitrage.graph.algo_driver.sub_graph_matching import \\"},{"line_number":32,"context_line":"    NEG_CONDITION"},{"line_number":33,"context_line":"from vitrage.graph.driver.networkx_graph import NXGraph"},{"line_number":34,"context_line":"from vitrage.graph.driver import Vertex"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"LOG \u003d log.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_2af2779a","line":33,"in_reply_to":"1a1ced50_523e97da","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                matches \u003d self._evaluate_subgraphs(scenario.subgraphs,"},{"line_number":163,"context_line":"                                                   element,"},{"line_number":164,"context_line":"                                                   scenario_element,"},{"line_number":165,"context_line":"                                                   action)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"                self._create_actions_from_matches(matches,"},{"line_number":168,"context_line":"                                                  mode,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_261e3d5f","line":165,"updated":"2017-03-22 10:27:40.000000000","message":"Instead of passing \"action\" here, pass action.targets - this is the only parameter you use from the action. It will reduce duplicate code later on and also make the following methods clearer (the signature will express what you are using).\nSee more comments below on row 266, 294.","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                matches \u003d self._evaluate_subgraphs(scenario.subgraphs,"},{"line_number":163,"context_line":"                                                   element,"},{"line_number":164,"context_line":"                                                   scenario_element,"},{"line_number":165,"context_line":"                                                   action)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"                self._create_actions_from_matches(matches,"},{"line_number":168,"context_line":"                                                  mode,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_952c6c9a","line":165,"in_reply_to":"1a1ced50_261e3d5f","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                                                     element,"},{"line_number":189,"context_line":"                                                     scenario_element)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _create_actions_from_matches(self,"},{"line_number":192,"context_line":"                                     combined_matches,"},{"line_number":193,"context_line":"                                     mode,"},{"line_number":194,"context_line":"                                     action,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_926c8f36","line":191,"updated":"2017-03-22 10:27:40.000000000","message":"- better to not change the \"actions\" variable within the scope of the method. Instead, return the actions from these matches and add them to a global \"actions\". Then you also don\u0027t need to pass the \"actions\" parameter into the method.\n- Change the name to \"_get_actions_from_matches\". If you don\u0027t accept the previous comment and change the actions inside the method, then the name should be \"_add_actions_from_matches\".","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                                                     element,"},{"line_number":189,"context_line":"                                                     scenario_element)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _create_actions_from_matches(self,"},{"line_number":192,"context_line":"                                     combined_matches,"},{"line_number":193,"context_line":"                                     mode,"},{"line_number":194,"context_line":"                                     action,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_245d4b47","line":191,"in_reply_to":"1a1ced50_926c8f36","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    def _create_actions_from_matches(self,"},{"line_number":192,"context_line":"                                     combined_matches,"},{"line_number":193,"context_line":"                                     mode,"},{"line_number":194,"context_line":"                                     action,"},{"line_number":195,"context_line":"                                     scenario,"},{"line_number":196,"context_line":"                                     actions):"},{"line_number":197,"context_line":"        for is_switch_mode, matches in combined_matches:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_c6c3a955","line":194,"updated":"2017-03-22 10:27:40.000000000","message":"because the name is \"create_actions...\" makes more sense to name the parameter \"action_spec\"","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    def _create_actions_from_matches(self,"},{"line_number":192,"context_line":"                                     combined_matches,"},{"line_number":193,"context_line":"                                     mode,"},{"line_number":194,"context_line":"                                     action,"},{"line_number":195,"context_line":"                                     scenario,"},{"line_number":196,"context_line":"                                     actions):"},{"line_number":197,"context_line":"        for is_switch_mode, matches in combined_matches:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_957aac86","line":194,"in_reply_to":"1a1ced50_c6c3a955","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                actions_to_perform[key] \u003d new_dominant"},{"line_number":252,"context_line":"        return actions_to_perform.values()"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def _find_vertex_subgraph_matching(self, subgraphs, action, ver, scen_ver):"},{"line_number":255,"context_line":"        \"\"\"calculates subgraph matching for vertex"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        iterates over all the subgraphs, and checks if the triggered vertex is"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_0b806abf","line":254,"updated":"2017-03-22 10:27:40.000000000","message":"\"scen_ver\" is unclear name. Rename to scenario_vertex or, at least, scenario_v. same with \"ver\"","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                actions_to_perform[key] \u003d new_dominant"},{"line_number":252,"context_line":"        return actions_to_perform.values()"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def _find_vertex_subgraph_matching(self, subgraphs, action, ver, scen_ver):"},{"line_number":255,"context_line":"        \"\"\"calculates subgraph matching for vertex"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        iterates over all the subgraphs, and checks if the triggered vertex is"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_f54200ad","line":254,"in_reply_to":"1a1ced50_0b806abf","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        matches \u003d []"},{"line_number":264,"context_line":"        for subgraph in subgraphs:"},{"line_number":265,"context_line":"            filtered_subgraph \u003d subgraph.algo.graph_query_vertices("},{"line_number":266,"context_line":"                root_id\u003daction[1][\u0027target\u0027],"},{"line_number":267,"context_line":"                edge_query_dict\u003d{\u0027!\u003d\u0027: {NEG_CONDITION: True}})"},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_6b28fee2","line":265,"updated":"2017-03-22 10:27:40.000000000","message":"A better variable name would be: connected_component","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        matches \u003d []"},{"line_number":264,"context_line":"        for subgraph in subgraphs:"},{"line_number":265,"context_line":"            filtered_subgraph \u003d subgraph.algo.graph_query_vertices("},{"line_number":266,"context_line":"                root_id\u003daction[1][\u0027target\u0027],"},{"line_number":267,"context_line":"                edge_query_dict\u003d{\u0027!\u003d\u0027: {NEG_CONDITION: True}})"},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_551bd4c9","line":265,"in_reply_to":"1a1ced50_6b28fee2","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        matches \u003d []"},{"line_number":264,"context_line":"        for subgraph in subgraphs:"},{"line_number":265,"context_line":"            filtered_subgraph \u003d subgraph.algo.graph_query_vertices("},{"line_number":266,"context_line":"                root_id\u003daction[1][\u0027target\u0027],"},{"line_number":267,"context_line":"                edge_query_dict\u003d{\u0027!\u003d\u0027: {NEG_CONDITION: True}})"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            if filtered_subgraph.get_vertex(scen_ver.vertex_id):"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_f5b76dd5","line":266,"updated":"2017-03-22 10:27:40.000000000","message":"(1) since \"action\" is of type ActionSpec, replace with \nroot_id \u003d action.targets[\u0027target\u0027]. Also should have an enum for \u0027target\u0027\n(2) what will happen if the target of the action has several targets, like with the add_causal_relationship action? Is it OK to ignore the \u0027source\u0027 vertex?","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        matches \u003d []"},{"line_number":264,"context_line":"        for subgraph in subgraphs:"},{"line_number":265,"context_line":"            filtered_subgraph \u003d subgraph.algo.graph_query_vertices("},{"line_number":266,"context_line":"                root_id\u003daction[1][\u0027target\u0027],"},{"line_number":267,"context_line":"                edge_query_dict\u003d{\u0027!\u003d\u0027: {NEG_CONDITION: True}})"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            if filtered_subgraph.get_vertex(scen_ver.vertex_id):"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_1aa26499","line":266,"in_reply_to":"1a1ced50_f5b76dd5","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                matches.append((True, set()))"},{"line_number":274,"context_line":"        return matches"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def _find_edge_subgraph_matching(self, subgraphs, action, ver, scen_edge):"},{"line_number":277,"context_line":"        \"\"\"calculates subgraph matching for edge"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        iterates over all the subgraphs, and checks if the triggered edge is a"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_664d953d","line":276,"updated":"2017-03-22 10:27:40.000000000","message":"scen_edge is not clear. use scenario_edge or scenario_e","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                matches.append((True, set()))"},{"line_number":274,"context_line":"        return matches"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def _find_edge_subgraph_matching(self, subgraphs, action, ver, scen_edge):"},{"line_number":277,"context_line":"        \"\"\"calculates subgraph matching for edge"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        iterates over all the subgraphs, and checks if the triggered edge is a"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_95662c4f","line":276,"in_reply_to":"1a1ced50_664d953d","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                                  scen_edge.target.vertex_id,"},{"line_number":291,"context_line":"                                  scen_edge.edge.label).get(NEG_CONDITION, False)"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            filtered_subgraph \u003d subgraph.algo.graph_query_vertices("},{"line_number":294,"context_line":"                root_id\u003daction[1][\u0027target\u0027],"},{"line_number":295,"context_line":"                edge_query_dict\u003d{\u0027!\u003d\u0027: {NEG_CONDITION: True}})"},{"line_number":296,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_26e55ddb","line":293,"updated":"2017-03-22 10:27:40.000000000","message":"rename to \"connected_component\"","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                                  scen_edge.target.vertex_id,"},{"line_number":291,"context_line":"                                  scen_edge.edge.label).get(NEG_CONDITION, False)"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            filtered_subgraph \u003d subgraph.algo.graph_query_vertices("},{"line_number":294,"context_line":"                root_id\u003daction[1][\u0027target\u0027],"},{"line_number":295,"context_line":"                edge_query_dict\u003d{\u0027!\u003d\u0027: {NEG_CONDITION: True}})"},{"line_number":296,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_f5576055","line":293,"in_reply_to":"1a1ced50_26e55ddb","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":291,"context_line":"                                  scen_edge.edge.label).get(NEG_CONDITION, False)"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            filtered_subgraph \u003d subgraph.algo.graph_query_vertices("},{"line_number":294,"context_line":"                root_id\u003daction[1][\u0027target\u0027],"},{"line_number":295,"context_line":"                edge_query_dict\u003d{\u0027!\u003d\u0027: {NEG_CONDITION: True}})"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"            if switch_mode:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_757e1d1a","line":294,"updated":"2017-03-22 10:27:40.000000000","message":"(1) since \"action\" is of type ActionSpec, replace with \nroot_id \u003d action.targets[\u0027target\u0027]. Also should have an enum for \u0027target\u0027\n(2) what will happen if the target of the action has several targets, like with the add_causal_relationship action? Is it OK to ignore the \u0027source\u0027 vertex","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":291,"context_line":"                                  scen_edge.edge.label).get(NEG_CONDITION, False)"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            filtered_subgraph \u003d subgraph.algo.graph_query_vertices("},{"line_number":294,"context_line":"                root_id\u003daction[1][\u0027target\u0027],"},{"line_number":295,"context_line":"                edge_query_dict\u003d{\u0027!\u003d\u0027: {NEG_CONDITION: True}})"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"            if switch_mode:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_7ab998cb","line":294,"in_reply_to":"1a1ced50_757e1d1a","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                root_id\u003daction[1][\u0027target\u0027],"},{"line_number":295,"context_line":"                edge_query_dict\u003d{\u0027!\u003d\u0027: {NEG_CONDITION: True}})"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"            if switch_mode:"},{"line_number":298,"context_line":"                scen_edge.edge[NEG_CONDITION] \u003d False"},{"line_number":299,"context_line":"                scen_edge.edge[EProps.IS_DELETED] \u003d False"},{"line_number":300,"context_line":"                subgraph.update_edge(scen_edge.edge)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_21c8e7a7","line":297,"updated":"2017-03-22 10:27:40.000000000","message":"would be good to have a comment explaining why you are doing this.","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                root_id\u003daction[1][\u0027target\u0027],"},{"line_number":295,"context_line":"                edge_query_dict\u003d{\u0027!\u003d\u0027: {NEG_CONDITION: True}})"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"            if switch_mode:"},{"line_number":298,"context_line":"                scen_edge.edge[NEG_CONDITION] \u003d False"},{"line_number":299,"context_line":"                scen_edge.edge[EProps.IS_DELETED] \u003d False"},{"line_number":300,"context_line":"                subgraph.update_edge(scen_edge.edge)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_10a24a99","line":297,"in_reply_to":"1a1ced50_21c8e7a7","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"}],"vitrage/graph/algo_driver/networkx_algorithm.py":[{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"b2c89f1053de53014d7a1f7090001c6c708f8323","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                           validate\u003dFalse):"},{"line_number":122,"context_line":"        \"\"\"Finds all the matching subgraphs in the graph"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        In case the known_match is a negative edge then run subgraph matching"},{"line_number":125,"context_line":"        on the positive vertices and unite the results."},{"line_number":126,"context_line":"        Otherwise just run subgraph matching and return its result."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        :param subgraph: the subgraph to match"}],"source_content_type":"text/x-python","patch_set":11,"id":"da36d5c6_da922d9f","line":125,"range":{"start_line":124,"start_character":46,"end_line":125,"end_character":55},"updated":"2017-02-28 09:47:51.000000000","message":"I think instead of \u0027positive\u0027  it should be connected. anyway this isn\u0027t clear","commit_id":"1c402b6db141e5b35d542def2c75de528dafabe7"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"8ff928674e846ee39faa2ec722af5b2caad09d29","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                                                         subgraph,"},{"line_number":144,"context_line":"                                                         validate)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"            for target_item in target_matches:"},{"line_number":147,"context_line":"                if target_item not in source_matches:"},{"line_number":148,"context_line":"                    source_matches.append(target_item)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"            return source_matches"},{"line_number":151,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"da36d5c6_fada9116","line":148,"range":{"start_line":146,"start_character":12,"end_line":148,"end_character":54},"updated":"2017-02-28 10:02:01.000000000","message":"how about list(set(source_matches).union(target_matches))","commit_id":"1c402b6db141e5b35d542def2c75de528dafabe7"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"b2c89f1053de53014d7a1f7090001c6c708f8323","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            template_vertex \u003d subgraph.get_vertex(sge_v_id)"},{"line_number":206,"context_line":"            graph_vertex \u003d self.graph.get_vertex(ge_v_id)"},{"line_number":207,"context_line":"            match \u003d Mapping(template_vertex, graph_vertex, True)"},{"line_number":208,"context_line":"            subgraphs_from_source \u003d subgraph_matching(self.graph, subgraph,"},{"line_number":209,"context_line":"                                                      [match], validate)"},{"line_number":210,"context_line":"            return subgraphs_from_source"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":11,"id":"da36d5c6_ffc7e361","line":210,"range":{"start_line":208,"start_character":12,"end_line":210,"end_character":40},"updated":"2017-02-28 09:47:51.000000000","message":"return subgraph_matching(self.graph, subgraph,[match], validate)","commit_id":"1c402b6db141e5b35d542def2c75de528dafabe7"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"b9eb04e72e32644a0136ac73b22f4c251b2ee005","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        ge \u003d known_match.graph_element"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        if not known_match.is_vertex and sge.get(NEG_CONDITION):"},{"line_number":138,"context_line":"            source_matches \u003d self._run_subgraph_matching(ge.source_id,"},{"line_number":139,"context_line":"                                                         sge.source_id,"},{"line_number":140,"context_line":"                                                         subgraph,"},{"line_number":141,"context_line":"                                                         validate)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba2be162_0c30b7e7","line":138,"updated":"2017-03-02 17:47:11.000000000","message":"comment #1: this will return [] (empty list) if it has no non-deleted edges. So if both source AND target have no non-deleted edges, you will return (in line 151) an empty list. But this is not correct - you need to return a single match in this case.","commit_id":"424cfb62de195689e710e9f04ecde21ef4edb609"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"b9eb04e72e32644a0136ac73b22f4c251b2ee005","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                                                         subgraph,"},{"line_number":145,"context_line":"                                                         validate)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"            for target_item in target_matches:"},{"line_number":148,"context_line":"                if target_item not in source_matches:"},{"line_number":149,"context_line":"                    source_matches.append(target_item)"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba2be162_8712c007","line":147,"updated":"2017-03-02 17:47:11.000000000","message":"Two comments:\n(A) Does this mean that if you have a disconnected graph (a--\u003eb belongs to one component, and not connected to c--\u003ed component) then you will return two separate subgraphs, one for each part? Since only one of them will have an action on it - check that this won\u0027t cause an exception (I didn\u0027t see any changes in the evaluator to deal with this situation)\n\n(B) This code can be optimized: Replace lines 147-149 with using set() built-in functionality.\n\n(C) this is done only when the known_match edge is the negated edge. this means the code flow is different for a case where there is a negated edge a --\u003e b but the trigger is, say, c --\u003e b. Shouldn\u0027t that case also be split? I\u0027m not positive - please explain this logic in the documentation or here in comments.","commit_id":"424cfb62de195689e710e9f04ecde21ef4edb609"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"b9eb04e72e32644a0136ac73b22f4c251b2ee005","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                                             source\u003dsource,"},{"line_number":201,"context_line":"                                             target\u003dtarget)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def _run_subgraph_matching(self, ge_v_id, sge_v_id, subgraph, validate):"},{"line_number":204,"context_line":"        if self.graph.neighbors(ge_v_id,"},{"line_number":205,"context_line":"                                edge_attr_filter\u003d{EProps.IS_DELETED: False}):"},{"line_number":206,"context_line":"            template_vertex \u003d subgraph.get_vertex(sge_v_id)"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba2be162_2114a49e","line":203,"updated":"2017-03-02 17:47:11.000000000","message":"the naming here is very confusing - we have \"subgraph_matching\", \"sub_graph_matching\", and now \"_run_subgraph_matching\"...","commit_id":"424cfb62de195689e710e9f04ecde21ef4edb609"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        ge \u003d known_match.graph_element"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if not known_match.is_vertex and sge.get(NEG_CONDITION):"},{"line_number":123,"context_line":"            # vertex \u003d subgraph.get_vertex(sge.source_id)"},{"line_number":124,"context_line":"            # is_source_real_vertex \u003d vertex.get(\u0027is_real_vertex\u0027, False)"},{"line_number":125,"context_line":"            # vertex[\u0027is_real_vertex\u0027] \u003d None"},{"line_number":126,"context_line":"            # subgraph.update_vertex(vertex)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_77e853e3","line":123,"updated":"2017-03-19 21:11:06.000000000","message":"remove redundant comments","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        ge \u003d known_match.graph_element"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if not known_match.is_vertex and sge.get(NEG_CONDITION):"},{"line_number":123,"context_line":"            # vertex \u003d subgraph.get_vertex(sge.source_id)"},{"line_number":124,"context_line":"            # is_source_real_vertex \u003d vertex.get(\u0027is_real_vertex\u0027, False)"},{"line_number":125,"context_line":"            # vertex[\u0027is_real_vertex\u0027] \u003d None"},{"line_number":126,"context_line":"            # subgraph.update_vertex(vertex)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_dd268167","line":123,"in_reply_to":"1a1ced50_77e853e3","updated":"2017-03-20 08:02:12.000000000","message":"Done","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            # vertex[\u0027is_real_vertex\u0027] \u003d None"},{"line_number":131,"context_line":"            # subgraph.update_vertex(vertex, )"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            source_matches \u003d self._run_subgraph_matching(ge.source_id,"},{"line_number":134,"context_line":"                                                         sge.source_id,"},{"line_number":135,"context_line":"                                                         subgraph,"},{"line_number":136,"context_line":"                                                         validate)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_d7ed87f0","line":133,"updated":"2017-03-19 21:11:06.000000000","message":"Lines 133-134 this will return [] (empty list) if it has no non-deleted edges. So if both source AND target have no non-deleted edges, you will return (in line 146) an empty list. But this is not correct - you need to return a single match in this case.","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                                                         subgraph,"},{"line_number":140,"context_line":"                                                         validate)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"            for target_item in target_matches:"},{"line_number":143,"context_line":"                if target_item not in source_matches:"},{"line_number":144,"context_line":"                    source_matches.append(target_item)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_17be3fd4","line":142,"updated":"2017-03-19 21:11:06.000000000","message":"(A) I\u0027m assuming that this means we don\u0027t support the case of  a disconnected graph (a--\u003eb belongs to one component, and not connected to c--\u003ed component) \n(B) This code can be optimized: Replace lines 142-144 with using set() built-in functionality.\n(C) this is done only when the known_match edge is the negated edge. this means the code flow is different for a case where there is a negated edge a --\u003e b but the trigger is, say, c --\u003e b. Shouldn\u0027t that case also be split? I\u0027m not positive - please explain this logic in the documentation or here in comments.","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                                             source\u003dsource,"},{"line_number":196,"context_line":"                                             target\u003dtarget)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def _run_subgraph_matching(self, ge_v_id, sge_v_id, subgraph, validate):"},{"line_number":199,"context_line":"        if self.graph.neighbors(ge_v_id,"},{"line_number":200,"context_line":"                                edge_attr_filter\u003d{EProps.IS_DELETED: False}):"},{"line_number":201,"context_line":"            template_vertex \u003d subgraph.get_vertex(sge_v_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_37b5fbed","line":198,"updated":"2017-03-19 21:11:06.000000000","message":"the naming here is very confusing - we have \"subgraph_matching\", \"sub_graph_matching\", and now \"_run_subgraph_matching\"...","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"fefd41bec1957edd095ea3b50866b28aa079d1b1","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            return subgraph_matching(self.graph, subgraph, [match], validate)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        return []"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    @staticmethod"},{"line_number":199,"context_line":"    def _edge_result_to_list(edge_result):"},{"line_number":200,"context_line":"        d \u003d dict()"},{"line_number":201,"context_line":"        for source_id, target_id, label, data in edge_result:"},{"line_number":202,"context_line":"            d[(source_id, target_id, label)] \u003d \\"},{"line_number":203,"context_line":"                Edge(source_id, target_id, label, properties\u003ddata)"},{"line_number":204,"context_line":"        return d.values()"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @staticmethod"},{"line_number":207,"context_line":"    def _vertex_result_to_list(vertex_result):"},{"line_number":208,"context_line":"        d \u003d dict()"},{"line_number":209,"context_line":"        for v_id, data in vertex_result:"},{"line_number":210,"context_line":"            d[v_id] \u003d Vertex(vertex_id\u003dv_id, properties\u003ddata)"},{"line_number":211,"context_line":"        return d.values()"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_1fd564b8","line":211,"range":{"start_line":197,"start_character":0,"end_line":211,"end_character":25},"updated":"2017-03-20 15:15:26.000000000","message":"Why did you move these functions?","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d2c5b9ff810bc149e3eef894f87dcd3db1d530fc","unresolved":false,"context_lines":[{"line_number":194,"context_line":"            return subgraph_matching(self.graph, subgraph, [match], validate)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        return []"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    @staticmethod"},{"line_number":199,"context_line":"    def _edge_result_to_list(edge_result):"},{"line_number":200,"context_line":"        d \u003d dict()"},{"line_number":201,"context_line":"        for source_id, target_id, label, data in edge_result:"},{"line_number":202,"context_line":"            d[(source_id, target_id, label)] \u003d \\"},{"line_number":203,"context_line":"                Edge(source_id, target_id, label, properties\u003ddata)"},{"line_number":204,"context_line":"        return d.values()"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @staticmethod"},{"line_number":207,"context_line":"    def _vertex_result_to_list(vertex_result):"},{"line_number":208,"context_line":"        d \u003d dict()"},{"line_number":209,"context_line":"        for v_id, data in vertex_result:"},{"line_number":210,"context_line":"            d[v_id] \u003d Vertex(vertex_id\u003dv_id, properties\u003ddata)"},{"line_number":211,"context_line":"        return d.values()"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a1ced50_c2ae6ce5","line":211,"range":{"start_line":197,"start_character":0,"end_line":211,"end_character":25},"in_reply_to":"1a1ced50_1fd564b8","updated":"2017-03-21 11:35:09.000000000","message":"Sorry for moving them, its just that in my perspective the externally used methods should be first, and only then the internal methods.","commit_id":"842e00bb3220fda4252a51f8a431a3801e8a1405"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        sge \u003d known_match.subgraph_element"},{"line_number":120,"context_line":"        ge \u003d known_match.graph_element"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if not known_match.is_vertex and sge.get(NEG_CONDITION):"},{"line_number":123,"context_line":"            source_matches \u003d self._filtered_subgraph_matching(ge.source_id,"},{"line_number":124,"context_line":"                                                              sge.source_id,"},{"line_number":125,"context_line":"                                                              subgraph,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_c6378dae","line":122,"range":{"start_line":122,"start_character":11,"end_line":122,"end_character":62},"updated":"2017-03-20 11:49:32.000000000","message":"what exactly does it mean ?\ndoes it mean is_a_negative_vertex ?\nwhy not extract a method it is much clearer","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        sge \u003d known_match.subgraph_element"},{"line_number":120,"context_line":"        ge \u003d known_match.graph_element"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if not known_match.is_vertex and sge.get(NEG_CONDITION):"},{"line_number":123,"context_line":"            source_matches \u003d self._filtered_subgraph_matching(ge.source_id,"},{"line_number":124,"context_line":"                                                              sge.source_id,"},{"line_number":125,"context_line":"                                                              subgraph,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_f346e04d","line":122,"range":{"start_line":122,"start_character":11,"end_line":122,"end_character":62},"in_reply_to":"1a1ced50_c6378dae","updated":"2017-03-21 08:58:51.000000000","message":"it means that if the entity is edge and it is negative then do that.\nI won\u0027t create a method only for one line. I think that this line is understandable and uses a meaningful names.","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                                                              subgraph,"},{"line_number":130,"context_line":"                                                              validate)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"            for target_item in target_matches:"},{"line_number":133,"context_line":"                if target_item not in source_matches:"},{"line_number":134,"context_line":"                    source_matches.append(target_item)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"            return source_matches"},{"line_number":137,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_4621dd4c","line":134,"range":{"start_line":132,"start_character":12,"end_line":134,"end_character":54},"updated":"2017-03-20 11:49:32.000000000","message":"what are u doing here are u doing some kind of a list union ? why not extract a method with that name\nand write a remark why you are not using set union (not hash-able)","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":129,"context_line":"                                                              subgraph,"},{"line_number":130,"context_line":"                                                              validate)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"            for target_item in target_matches:"},{"line_number":133,"context_line":"                if target_item not in source_matches:"},{"line_number":134,"context_line":"                    source_matches.append(target_item)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"            return source_matches"},{"line_number":137,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_078c167e","line":134,"range":{"start_line":132,"start_character":12,"end_line":134,"end_character":54},"in_reply_to":"1a1ced50_4621dd4c","updated":"2017-03-21 08:58:51.000000000","message":"Done","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    @staticmethod"},{"line_number":203,"context_line":"    def _edge_result_to_list(edge_result):"},{"line_number":204,"context_line":"        d \u003d dict()"},{"line_number":205,"context_line":"        for source_id, target_id, label, data in edge_result:"},{"line_number":206,"context_line":"            d[(source_id, target_id, label)] \u003d \\"},{"line_number":207,"context_line":"                Edge(source_id, target_id, label, properties\u003ddata)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_d2e8287f","line":204,"range":{"start_line":204,"start_character":12,"end_line":204,"end_character":16},"updated":"2017-03-20 11:49:32.000000000","message":"why not do d \u003d {}","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    @staticmethod"},{"line_number":203,"context_line":"    def _edge_result_to_list(edge_result):"},{"line_number":204,"context_line":"        d \u003d dict()"},{"line_number":205,"context_line":"        for source_id, target_id, label, data in edge_result:"},{"line_number":206,"context_line":"            d[(source_id, target_id, label)] \u003d \\"},{"line_number":207,"context_line":"                Edge(source_id, target_id, label, properties\u003ddata)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_67fcea72","line":204,"range":{"start_line":204,"start_character":12,"end_line":204,"end_character":16},"in_reply_to":"1a1ced50_d2e8287f","updated":"2017-03-21 08:58:51.000000000","message":"I just moved those methods. Those are idan\u0027s methods and I prefer not to touch them because he will be mad at me.","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    @staticmethod"},{"line_number":211,"context_line":"    def _vertex_result_to_list(vertex_result):"},{"line_number":212,"context_line":"        d \u003d dict()"},{"line_number":213,"context_line":"        for v_id, data in vertex_result:"},{"line_number":214,"context_line":"            d[v_id] \u003d Vertex(vertex_id\u003dv_id, properties\u003ddata)"},{"line_number":215,"context_line":"        return d.values()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_9295d0e5","line":212,"range":{"start_line":212,"start_character":8,"end_line":212,"end_character":18},"updated":"2017-03-20 11:49:32.000000000","message":"same as above\n\nwhy are u using a dictionary if you return a list of vertex\nif you want to remove duplicates you can use a set","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    @staticmethod"},{"line_number":211,"context_line":"    def _vertex_result_to_list(vertex_result):"},{"line_number":212,"context_line":"        d \u003d dict()"},{"line_number":213,"context_line":"        for v_id, data in vertex_result:"},{"line_number":214,"context_line":"            d[v_id] \u003d Vertex(vertex_id\u003dv_id, properties\u003ddata)"},{"line_number":215,"context_line":"        return d.values()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_8701e66c","line":212,"range":{"start_line":212,"start_character":8,"end_line":212,"end_character":18},"in_reply_to":"1a1ced50_9295d0e5","updated":"2017-03-21 08:58:51.000000000","message":"I just moved those methods. Those are idan\u0027s methods and I prefer not to touch them because he will be mad at me.","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"25339999c818ea0ee8f41716659b081c912ad077","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                                             source\u003dsource,"},{"line_number":182,"context_line":"                                             target\u003dtarget)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def _filtered_subgraph_matching(self,"},{"line_number":185,"context_line":"                                    ge_v_id,"},{"line_number":186,"context_line":"                                    sge_v_id,"},{"line_number":187,"context_line":"                                    subgraph,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_de537337","line":184,"updated":"2017-03-22 10:27:40.000000000","message":"Add comment to explain what \"filtered\" means","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"d417265283275cf55fedd021de3abde544e3ba92","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                                             source\u003dsource,"},{"line_number":182,"context_line":"                                             target\u003dtarget)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def _filtered_subgraph_matching(self,"},{"line_number":185,"context_line":"                                    ge_v_id,"},{"line_number":186,"context_line":"                                    sge_v_id,"},{"line_number":187,"context_line":"                                    subgraph,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_3d763a3e","line":184,"in_reply_to":"1a1ced50_de537337","updated":"2017-03-22 15:31:37.000000000","message":"Done","commit_id":"c811a76053cdab833cf10a31381ca717367a3aa1"}],"vitrage/graph/algo_driver/sub_graph_matching.py":[{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"c3b0f1a82298efd7088fa00fe1f25d602d145db5","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        if edges and not graph_candidate_vertices:"},{"line_number":123,"context_line":"            params \u003d (curr_subgraph, subgraph_vertex_to_map)"},{"line_number":124,"context_line":"            if _check_and_set_not_codition_info(*params):"},{"line_number":125,"context_line":"                queue.append(curr_subgraph.copy())"},{"line_number":126,"context_line":"        else:"},{"line_number":127,"context_line":"            p \u003d (base_graph, curr_subgraph, edges, graph_candidate_vertices)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_00ce34b4","line":124,"updated":"2017-02-09 16:40:57.000000000","message":"What does this private method do? the name is not clear.\n\nalso, why assign \"params\" and then use *params? why not just enter the parameters? you don\u0027t seem to reuse params again.\nsame with p, params later on, etc.","commit_id":"b3955d7231f664ee02f626ea6d167ca618434e06"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"c3b0f1a82298efd7088fa00fe1f25d602d145db5","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                queue.append(curr_subgraph.copy())"},{"line_number":126,"context_line":"        else:"},{"line_number":127,"context_line":"            p \u003d (base_graph, curr_subgraph, edges, graph_candidate_vertices)"},{"line_number":128,"context_line":"            has_no_overall_problems \u003d \\"},{"line_number":129,"context_line":"                _check_subgraph_not_edge_exists_in_candidates(*p)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"            if has_no_overall_problems:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_659e2a65","line":128,"updated":"2017-02-09 16:40:57.000000000","message":"unclear variable name. What does it mean to have \"problems\"?","commit_id":"b3955d7231f664ee02f626ea6d167ca618434e06"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"8ff928674e846ee39faa2ec722af5b2caad09d29","unresolved":false,"context_lines":[{"line_number":28,"context_line":"NEG_CONDITION \u003d \u0027negative_condition\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def subgraph_matching(base_graph, subgraph, matches, validate\u003dFalse):"},{"line_number":32,"context_line":"    \"\"\"Find all occurrences of subgraph in the graph"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    In the following, a partial mapping is a copy of the sub-graph."},{"line_number":35,"context_line":"    As we go, vertices of curr_mapping graph will be updated with new"},{"line_number":36,"context_line":"    fields used only for the traversal:"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"     - MAPPED_V_ID:"},{"line_number":39,"context_line":"       The vertex_id of the corresponding vertex in the graph."},{"line_number":40,"context_line":"       If it is not empty, than this vertex is already mapped"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"     - NEIGHBORS_MAPPED:"},{"line_number":43,"context_line":"       True or None. When set True it means all the"},{"line_number":44,"context_line":"       neighbors of this vertex have already been mapped"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    Implementation Details:"},{"line_number":47,"context_line":"    ----------------------"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    - Init Step:"},{"line_number":50,"context_line":"      copy the sub-graph to create the first candidate mapping graph. In which"},{"line_number":51,"context_line":"      known vertices mappings are added to vertices MAPPED_V_ID. So, we now"},{"line_number":52,"context_line":"      have a sub-graph copy where some of the vertices already have a mapping"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    Main loop steps:"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    - Steps 1:"},{"line_number":57,"context_line":"      Pop a partially mapped sub-graph from the queue."},{"line_number":58,"context_line":"      If all its vertices have a MAPPED_V_ID, add it to final mappings"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    - Steps 2 \u0026 3:"},{"line_number":61,"context_line":"      Find one template vertex that is not mapped but has a mapped neighbor"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    - Step 4: CHECK PROPERTIES"},{"line_number":64,"context_line":"      In the graph find candidate vertices that are linked to that neighbor"},{"line_number":65,"context_line":"      and match the template vertex properties"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    - Step 5: CHECK STRUCTURE"},{"line_number":68,"context_line":"      Filter candidate vertices according to edges"},{"line_number":69,"context_line":"    \"\"\""},{"line_number":70,"context_line":"    final_subgraphs \u003d []"},{"line_number":71,"context_line":"    initial_sg \u003d _create_initial_subgraph(matches,"},{"line_number":72,"context_line":"                                          base_graph,"},{"line_number":73,"context_line":"                                          subgraph,"},{"line_number":74,"context_line":"                                          validate)"},{"line_number":75,"context_line":"    if not initial_sg:"},{"line_number":76,"context_line":"        LOG.warning(_LW(\u0027subgraph_matching:Initial sub-graph creation failed\u0027))"},{"line_number":77,"context_line":"        LOG.warning(_LW(\u0027subgraph_matching: Known matches: %s\u0027),"},{"line_number":78,"context_line":"                    str(matches))"},{"line_number":79,"context_line":"        return final_subgraphs"},{"line_number":80,"context_line":"    queue \u003d [initial_sg]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    while queue:"},{"line_number":83,"context_line":"        curr_subgraph \u003d queue.pop(0)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        # STEP 1: STOPPING CONDITION"},{"line_number":86,"context_line":"        mapped_vertices \u003d list(filter("},{"line_number":87,"context_line":"            lambda v: v.get(MAPPED_V_ID),"},{"line_number":88,"context_line":"            curr_subgraph.get_vertices()))"},{"line_number":89,"context_line":"        if len(mapped_vertices) \u003d\u003d subgraph.num_vertices():"},{"line_number":90,"context_line":"            final_subgraphs.append(curr_subgraph)"},{"line_number":91,"context_line":"            continue"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        # STEP 2: CAN WE THROW THIS SUB-GRAPH?"},{"line_number":94,"context_line":"        vertices_with_unmapped_neighbors \u003d list(filter("},{"line_number":95,"context_line":"            lambda v: not v.get(NEIGHBORS_MAPPED),"},{"line_number":96,"context_line":"            mapped_vertices))"},{"line_number":97,"context_line":"        if not vertices_with_unmapped_neighbors:"},{"line_number":98,"context_line":"            continue"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # STEP 3: FIND A SUB-GRAPH VERTEX TO MAP"},{"line_number":101,"context_line":"        v_with_unmapped_neighbors \u003d _choose_vertex("},{"line_number":102,"context_line":"            vertices_with_unmapped_neighbors,"},{"line_number":103,"context_line":"            curr_subgraph)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        unmapped_neighbors \u003d list(filter("},{"line_number":106,"context_line":"            lambda v: not v.get(MAPPED_V_ID),"},{"line_number":107,"context_line":"            curr_subgraph.neighbors(v_with_unmapped_neighbors.vertex_id)))"},{"line_number":108,"context_line":"        if not unmapped_neighbors:"},{"line_number":109,"context_line":"            # Mark vertex as NEIGHBORS_MAPPED\u003dTrue"},{"line_number":110,"context_line":"            v_with_unmapped_neighbors[NEIGHBORS_MAPPED] \u003d True"},{"line_number":111,"context_line":"            curr_subgraph.update_vertex(v_with_unmapped_neighbors)"},{"line_number":112,"context_line":"            queue.append(curr_subgraph)"},{"line_number":113,"context_line":"            continue"},{"line_number":114,"context_line":"        subgraph_vertex_to_map \u003d _choose_vertex("},{"line_number":115,"context_line":"            unmapped_neighbors,"},{"line_number":116,"context_line":"            curr_subgraph,"},{"line_number":117,"context_line":"            curr_v\u003dv_with_unmapped_neighbors)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        # STEP 4: PROPERTIES CHECK"},{"line_number":120,"context_line":"        graph_candidate_vertices \u003d base_graph.neighbors("},{"line_number":121,"context_line":"            v_id\u003dv_with_unmapped_neighbors[MAPPED_V_ID],"},{"line_number":122,"context_line":"            vertex_attr_filter\u003dsubgraph_vertex_to_map)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        # STEP 5: STRUCTURE CHECK"},{"line_number":125,"context_line":"        edges \u003d _get_edges_to_mapped_vertices(curr_subgraph,"},{"line_number":126,"context_line":"                                              subgraph_vertex_to_map.vertex_id)"},{"line_number":127,"context_line":"        neg_edges \u003d set(e for e in edges if e.get(NEG_CONDITION))"},{"line_number":128,"context_line":"        pos_edges \u003d edges.difference(neg_edges)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if not graph_candidate_vertices and neg_edges and not pos_edges:"},{"line_number":131,"context_line":"            subgraph_vertex_to_map[MAPPED_V_ID] \u003d NEG_VERTEX"},{"line_number":132,"context_line":"            curr_subgraph.update_vertex(subgraph_vertex_to_map)"},{"line_number":133,"context_line":"            queue.append(curr_subgraph.copy())"},{"line_number":134,"context_line":"            continue"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        found_subgraphs \u003d []"},{"line_number":137,"context_line":"        for graph_vertex in graph_candidate_vertices:"},{"line_number":138,"context_line":"            subgraph_vertex_to_map[MAPPED_V_ID] \u003d graph_vertex.vertex_id"},{"line_number":139,"context_line":"            subgraph_vertex_to_map[GRAPH_VERTEX] \u003d graph_vertex"},{"line_number":140,"context_line":"            curr_subgraph.update_vertex(subgraph_vertex_to_map)"},{"line_number":141,"context_line":"            if not _graph_contains_subgraph_edges(base_graph,"},{"line_number":142,"context_line":"                                                  curr_subgraph,"},{"line_number":143,"context_line":"                                                  pos_edges):"},{"line_number":144,"context_line":"                continue"},{"line_number":145,"context_line":"            if not _graph_contains_subgraph_edges(base_graph,"},{"line_number":146,"context_line":"                                                  curr_subgraph,"},{"line_number":147,"context_line":"                                                  neg_edges):"},{"line_number":148,"context_line":"                del found_subgraphs[:]"},{"line_number":149,"context_line":"                break"},{"line_number":150,"context_line":"            if neg_edges and not pos_edges:"},{"line_number":151,"context_line":"                subgraph_vertex_to_map[MAPPED_V_ID] \u003d NEG_VERTEX"},{"line_number":152,"context_line":"                curr_subgraph.update_vertex(subgraph_vertex_to_map)"},{"line_number":153,"context_line":"            found_subgraphs.append(curr_subgraph.copy())"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        queue.extend(found_subgraphs)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    # Last thing: Convert results to the expected format!"},{"line_number":158,"context_line":"    return _generate_result(final_subgraphs)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"def _generate_result(final_subgraphs):"}],"source_content_type":"text/x-python","patch_set":11,"id":"da36d5c6_ba6c9937","line":158,"range":{"start_line":31,"start_character":0,"end_line":158,"end_character":44},"updated":"2017-02-28 10:02:01.000000000","message":"I would refactor this method to small method each one is a step","commit_id":"1c402b6db141e5b35d542def2c75de528dafabe7"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"8ff928674e846ee39faa2ec722af5b2caad09d29","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"def _generate_result(final_subgraphs):"},{"line_number":162,"context_line":"    result \u003d []"},{"line_number":163,"context_line":"    for mapping in final_subgraphs:"},{"line_number":164,"context_line":"        subgraph_vertices \u003d dict()"},{"line_number":165,"context_line":"        for v in mapping.get_vertices():"},{"line_number":166,"context_line":"            v_id \u003d v[MAPPED_V_ID]"},{"line_number":167,"context_line":"            if isinstance(v_id, six.string_types) and v_id is not NEG_VERTEX:"},{"line_number":168,"context_line":"                subgraph_vertices[v.vertex_id] \u003d v[GRAPH_VERTEX]"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        if subgraph_vertices not in result:"},{"line_number":171,"context_line":"            result.append(subgraph_vertices)"},{"line_number":172,"context_line":"    return result"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"da36d5c6_9a5ef574","line":171,"range":{"start_line":162,"start_character":4,"end_line":171,"end_character":44},"updated":"2017-02-28 10:02:01.000000000","message":"I would use comprehension list here","commit_id":"1c402b6db141e5b35d542def2c75de528dafabe7"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"8ff928674e846ee39faa2ec722af5b2caad09d29","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    for v in vertices:"},{"line_number":180,"context_line":"        curr_vertex_id \u003d curr_v.vertex_id if curr_v else None"},{"line_number":181,"context_line":"        edges \u003d subgraph.get_edges(v.vertex_id, curr_vertex_id)"},{"line_number":182,"context_line":"        if not set(e for e in edges if e.get(NEG_CONDITION)):"},{"line_number":183,"context_line":"            return v"},{"line_number":184,"context_line":"    return vertices.pop(0)"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"da36d5c6_9aec3591","line":182,"range":{"start_line":182,"start_character":15,"end_line":182,"end_character":61},"updated":"2017-02-28 10:02:01.000000000","message":"u can do {} instead of set","commit_id":"1c402b6db141e5b35d542def2c75de528dafabe7"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":28,"context_line":"NEG_CONDITION \u003d \u0027negative_condition\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def subgraph_matching(base_graph, subgraph, matches, validate\u003dFalse):"},{"line_number":32,"context_line":"    \"\"\"Find all occurrences of subgraph in the graph"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    In the following, a partial mapping is a copy of the sub-graph."}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_46d2bd01","line":31,"range":{"start_line":31,"start_character":4,"end_line":31,"end_character":21},"updated":"2017-03-20 11:49:32.000000000","message":"this method should be refactored to smaller methods","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":28,"context_line":"NEG_CONDITION \u003d \u0027negative_condition\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def subgraph_matching(base_graph, subgraph, matches, validate\u003dFalse):"},{"line_number":32,"context_line":"    \"\"\"Find all occurrences of subgraph in the graph"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    In the following, a partial mapping is a copy of the sub-graph."}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_a76fc229","line":31,"range":{"start_line":31,"start_character":4,"end_line":31,"end_character":21},"in_reply_to":"1a1ced50_46d2bd01","updated":"2017-03-21 08:58:51.000000000","message":"Idan prefer this method to be as it is, and I quite understand him.\nThis is a very complicated code, and it is better to see it all together because other wise when you from one method to another it is even more complicated. At the begining of the method there is a documentation that explains everything.","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        # STEP 5: STRUCTURE CHECK"},{"line_number":125,"context_line":"        edges \u003d _get_edges_to_mapped_vertices(curr_subgraph,"},{"line_number":126,"context_line":"                                              subgraph_vertex_to_map.vertex_id)"},{"line_number":127,"context_line":"        neg_edges \u003d set(e for e in edges if e.get(NEG_CONDITION))"},{"line_number":128,"context_line":"        pos_edges \u003d edges.difference(neg_edges)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if not graph_candidate_vertices and neg_edges and not pos_edges:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_a69b7171","line":127,"range":{"start_line":127,"start_character":20,"end_line":127,"end_character":65},"updated":"2017-03-20 11:49:32.000000000","message":"u can use {} instead of set","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        # STEP 5: STRUCTURE CHECK"},{"line_number":125,"context_line":"        edges \u003d _get_edges_to_mapped_vertices(curr_subgraph,"},{"line_number":126,"context_line":"                                              subgraph_vertex_to_map.vertex_id)"},{"line_number":127,"context_line":"        neg_edges \u003d set(e for e in edges if e.get(NEG_CONDITION))"},{"line_number":128,"context_line":"        pos_edges \u003d edges.difference(neg_edges)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if not graph_candidate_vertices and neg_edges and not pos_edges:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_c753de69","line":127,"range":{"start_line":127,"start_character":20,"end_line":127,"end_character":65},"in_reply_to":"1a1ced50_a69b7171","updated":"2017-03-21 08:58:51.000000000","message":"I see, but this way it is more clearer for the not experienced eye that this is a set. otherwise he might think it is a dictionary.","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    return _generate_result(final_subgraphs)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"def _generate_result(final_subgraphs):"},{"line_number":162,"context_line":"    result \u003d []"},{"line_number":163,"context_line":"    for mapping in final_subgraphs:"},{"line_number":164,"context_line":"        subgraph_vertices \u003d dict()"},{"line_number":165,"context_line":"        for v in mapping.get_vertices():"},{"line_number":166,"context_line":"            v_id \u003d v[MAPPED_V_ID]"},{"line_number":167,"context_line":"            if isinstance(v_id, six.string_types) and v_id is not NEG_VERTEX:"},{"line_number":168,"context_line":"                subgraph_vertices[v.vertex_id] \u003d v[GRAPH_VERTEX]"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        if subgraph_vertices not in result:"},{"line_number":171,"context_line":"            result.append(subgraph_vertices)"},{"line_number":172,"context_line":"    return result"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def _choose_vertex(vertices, subgraph, curr_v\u003dNone):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_e6b9e9cc","line":172,"range":{"start_line":161,"start_character":4,"end_line":172,"end_character":17},"updated":"2017-03-20 11:49:32.000000000","message":"I would refactor and use comprehension list","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    return _generate_result(final_subgraphs)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"def _generate_result(final_subgraphs):"},{"line_number":162,"context_line":"    result \u003d []"},{"line_number":163,"context_line":"    for mapping in final_subgraphs:"},{"line_number":164,"context_line":"        subgraph_vertices \u003d dict()"},{"line_number":165,"context_line":"        for v in mapping.get_vertices():"},{"line_number":166,"context_line":"            v_id \u003d v[MAPPED_V_ID]"},{"line_number":167,"context_line":"            if isinstance(v_id, six.string_types) and v_id is not NEG_VERTEX:"},{"line_number":168,"context_line":"                subgraph_vertices[v.vertex_id] \u003d v[GRAPH_VERTEX]"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        if subgraph_vertices not in result:"},{"line_number":171,"context_line":"            result.append(subgraph_vertices)"},{"line_number":172,"context_line":"    return result"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def _choose_vertex(vertices, subgraph, curr_v\u003dNone):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_0702560b","line":172,"range":{"start_line":161,"start_character":4,"end_line":172,"end_character":17},"in_reply_to":"1a1ced50_e6b9e9cc","updated":"2017-03-21 08:58:51.000000000","message":"It will a very ugly list comprehension, because of the if in the end which makes it a set, and thus because the set is unhashable, its problematic.","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"}],"vitrage/graph/driver/graph.py":[{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"b9eb04e72e32644a0136ac73b22f4c251b2ee005","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        Fetch all edges from the graph, according to its two vertices."},{"line_number":213,"context_line":"        If only one vertex id is given it finds all the edges from this vertex"},{"line_number":214,"context_line":"        to all other vertices."},{"line_number":215,"context_line":"        If two vertices ids are given it finds all the edges between those two"},{"line_number":216,"context_line":"        vertices."},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        EXAMPLE"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba2be162_3e65a1b4","line":215,"updated":"2017-03-02 17:47:11.000000000","message":"\"If two vertices ids\" --\u003e \"If two vertex ids\"","commit_id":"424cfb62de195689e710e9f04ecde21ef4edb609"}],"vitrage/graph/driver/networkx_graph.py":[{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"b2c89f1053de53014d7a1f7090001c6c708f8323","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        LOG.debug(\"get_vertex item not found. v_id\u003d%s\", str(v_id))"},{"line_number":108,"context_line":"        return None"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def get_edge(self, source_id, target_id, label\u003dNone):"},{"line_number":111,"context_line":"        try:"},{"line_number":112,"context_line":"            properties \u003d self._g.adj[source_id][target_id][label]"},{"line_number":113,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":11,"id":"da36d5c6_ff57e323","line":110,"range":{"start_line":110,"start_character":50,"end_line":110,"end_character":55},"updated":"2017-02-28 09:47:51.000000000","message":"is this added by mistake?","commit_id":"1c402b6db141e5b35d542def2c75de528dafabe7"},{"author":{"_account_id":19184,"name":"Idan Hefetz","email":"idan.hefetz@nokia.com","username":"idan-hefetz"},"change_message_id":"b2c89f1053de53014d7a1f7090001c6c708f8323","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            nodes, edges \u003d self._neighboring_nodes_edges_query("},{"line_number":136,"context_line":"                v1_id, edge_predicate\u003dcheck_edge, direction\u003ddirection)"},{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            if direction \u003d\u003d Direction.OUT or direction \u003d\u003d Direction.BOTH:"},{"line_number":139,"context_line":"                try:"},{"line_number":140,"context_line":"                    for label, props in self._g.adj[v1_id][v2_id].items():"},{"line_number":141,"context_line":"                        edge \u003d (v1_id, v2_id, label, props)"},{"line_number":142,"context_line":"                        edges.append(edge)"},{"line_number":143,"context_line":"                except KeyError:"},{"line_number":144,"context_line":"                    pass"},{"line_number":145,"context_line":"            if direction \u003d\u003d Direction.IN or direction \u003d\u003d Direction.BOTH:"},{"line_number":146,"context_line":"                try:"},{"line_number":147,"context_line":"                    for label, props in self._g.adj[v2_id][v1_id].items():"},{"line_number":148,"context_line":"                        edge \u003d (v2_id, v1_id, label, props)"},{"line_number":149,"context_line":"                        edges.append(edge)"},{"line_number":150,"context_line":"                except KeyError:"},{"line_number":151,"context_line":"                    pass"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        edge_copies \u003d set(edge_copy(u, v, label, data)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da36d5c6_5a51dd0d","line":150,"range":{"start_line":138,"start_character":0,"end_line":150,"end_character":32},"updated":"2017-02-28 09:47:51.000000000","message":"If v2 is provided attr_filter id ignored, this should be supported.","commit_id":"1c402b6db141e5b35d542def2c75de528dafabe7"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"b9eb04e72e32644a0136ac73b22f4c251b2ee005","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        if not v2_id:"},{"line_number":136,"context_line":"            nodes, edges \u003d self._neighboring_nodes_edges_query("},{"line_number":137,"context_line":"                v1_id, edge_predicate\u003dcheck_edge, direction\u003ddirection)"},{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            if direction \u003d\u003d Direction.OUT or direction \u003d\u003d Direction.BOTH:"},{"line_number":140,"context_line":"                try:"},{"line_number":141,"context_line":"                    for label, props in self._g.adj[v1_id][v2_id].items():"}],"source_content_type":"text/x-python","patch_set":12,"id":"ba2be162_5e425569","line":138,"updated":"2017-03-02 17:47:11.000000000","message":"Suggestion to replace lines 138-155: \nUse the same code  as in lines 136-137 (the query), and then remove from \"edges\" all the ones that don\u0027t have v2_id as the other vertex (of course, checking for the correct direction). This would improve the code clarity and (I\u0027m guessing) performance.","commit_id":"424cfb62de195689e710e9f04ecde21ef4edb609"},{"author":{"_account_id":19233,"name":"Elisha Rosensweig","email":"elisha@chorus.ai","username":"elisha.rosensweig"},"change_message_id":"532de800265d2446e7ba131f54292e216326dc63","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            nodes, edges \u003d self._neighboring_nodes_edges_query("},{"line_number":137,"context_line":"                v1_id, edge_predicate\u003dcheck_edge, direction\u003ddirection)"},{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            if direction \u003d\u003d Direction.OUT or direction \u003d\u003d Direction.BOTH:"},{"line_number":140,"context_line":"                try:"},{"line_number":141,"context_line":"                    for label, props in self._g.adj[v1_id][v2_id].items():"},{"line_number":142,"context_line":"                        edge \u003d (v1_id, v2_id, label, props)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_77cf737f","line":139,"updated":"2017-03-19 21:11:06.000000000","message":"Suggestion to replace lines 138-155: \nUse the same code  as in lines 136-137 (the query), and then remove from \"edges\" all the ones that don\u0027t have v2_id as the other vertex (of course, checking for the correct direction). This would improve the code clarity and (I\u0027m guessing) performance.","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"e76a7f3df64468d6843257c71677a0e20a123bd0","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            nodes, edges \u003d self._neighboring_nodes_edges_query("},{"line_number":137,"context_line":"                v1_id, edge_predicate\u003dcheck_edge, direction\u003ddirection)"},{"line_number":138,"context_line":"        else:"},{"line_number":139,"context_line":"            if direction \u003d\u003d Direction.OUT or direction \u003d\u003d Direction.BOTH:"},{"line_number":140,"context_line":"                try:"},{"line_number":141,"context_line":"                    for label, props in self._g.adj[v1_id][v2_id].items():"},{"line_number":142,"context_line":"                        edge \u003d (v1_id, v2_id, label, props)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a1ced50_1da499a4","line":139,"in_reply_to":"1a1ced50_77cf737f","updated":"2017-03-20 08:02:12.000000000","message":"Agree :)","commit_id":"d43ba09d92933bcaa981285d0cabb8c0206235cc"}],"vitrage/tests/functional/evaluator/test_scenario_evaluator.py":[{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                     DSProps.DATASOURCE_ACTION: DatasourceAction.SNAPSHOT}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class TestScenarioEvaluator(TestFunctionalBase):"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    EVALUATOR_OPTS \u003d ["},{"line_number":46,"context_line":"        cfg.StrOpt(\u0027templates_dir\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_66225903","line":43,"range":{"start_line":43,"start_character":6,"end_line":43,"end_character":27},"updated":"2017-03-20 11:49:32.000000000","message":"the tests are long and aren\u0027t readable if they fail only u can understand what happened :-)","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                     DSProps.DATASOURCE_ACTION: DatasourceAction.SNAPSHOT}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class TestScenarioEvaluator(TestFunctionalBase):"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    EVALUATOR_OPTS \u003d ["},{"line_number":46,"context_line":"        cfg.StrOpt(\u0027templates_dir\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_22282086","line":43,"range":{"start_line":43,"start_character":6,"end_line":43,"end_character":27},"in_reply_to":"1a1ced50_66225903","updated":"2017-03-21 08:58:51.000000000","message":"I agree.\nI need to add documentation","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"}],"vitrage/tests/unit/graph/test_graph_algo.py":[{"author":{"_account_id":19134,"name":"Eyal","email":"eyalb1@gmail.com","username":"eyalb"},"change_message_id":"26d360d265beaad2e0bd598e9d9a055de76ff4d0","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from vitrage.tests.unit.graph.base import *  # noqa"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class GraphAlgorithmTest(GraphTestBase):"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # noinspection PyPep8Naming"},{"line_number":39,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_26ece18e","line":36,"range":{"start_line":36,"start_character":6,"end_line":36,"end_character":24},"updated":"2017-03-20 11:49:32.000000000","message":"the tests are long and aren\u0027t readable","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"},{"author":{"_account_id":19122,"name":"Alexey Weyl","email":"aloshaweyl@gmail.com","username":"alexey_weyl"},"change_message_id":"85e2ecffcb8395bf85a2d4a46c3ea3f7b04e03bc","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from vitrage.tests.unit.graph.base import *  # noqa"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class GraphAlgorithmTest(GraphTestBase):"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # noinspection PyPep8Naming"},{"line_number":39,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_822394a6","line":36,"range":{"start_line":36,"start_character":6,"end_line":36,"end_character":24},"in_reply_to":"1a1ced50_26ece18e","updated":"2017-03-21 08:58:51.000000000","message":"I agree.\nI need to add documentation.","commit_id":"90d2522c548778d18df661d5ea4ab5c9606f2e51"}]}
