)]}'
{"rally/task/processing/plot.py":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"70330cd55d23dcbe49997c8802af4d2b4cb7298d","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    Group tasks results by their input configuration,"},{"line_number":161,"context_line":"    calculate statistics for these groups and prepare it"},{"line_number":162,"context_line":"    for displayigg in trends HTML report."},{"line_number":163,"context_line":"    \"\"\""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_d4b756f3","line":162,"updated":"2016-04-25 00:31:07.000000000","message":"typo","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"98875db79563dd477d2ea4634f3356a48c85f831","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    Group tasks results by their input configuration,"},{"line_number":161,"context_line":"    calculate statistics for these groups and prepare it"},{"line_number":162,"context_line":"    for displayigg in trends HTML report."},{"line_number":163,"context_line":"    \"\"\""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_178a6bbf","line":162,"in_reply_to":"1a122d0e_d4b756f3","updated":"2016-04-25 09:49:42.000000000","message":"Will fix","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"70330cd55d23dcbe49997c8802af4d2b4cb7298d","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            return \",\".join(sorted([self._to_str(v) for v in obj]))"},{"line_number":176,"context_line":"        elif isinstance(obj, dict):"},{"line_number":177,"context_line":"            if \"network_create_args\" in obj:"},{"line_number":178,"context_line":"                obj[\"network_create_args\"] \u003d {}"},{"line_number":179,"context_line":"            return \"|\".join(sorted([\":\".join([self._to_str(k),"},{"line_number":180,"context_line":"                                              self._to_str(v)])"},{"line_number":181,"context_line":"                                    for k, v in obj.items()]))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_14470e1e","line":178,"updated":"2016-04-25 00:31:07.000000000","message":"I\u0027m a bit confused. why network related stuff inside base Trends class?","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"98875db79563dd477d2ea4634f3356a48c85f831","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            return \",\".join(sorted([self._to_str(v) for v in obj]))"},{"line_number":176,"context_line":"        elif isinstance(obj, dict):"},{"line_number":177,"context_line":"            if \"network_create_args\" in obj:"},{"line_number":178,"context_line":"                obj[\"network_create_args\"] \u003d {}"},{"line_number":179,"context_line":"            return \"|\".join(sorted([\":\".join([self._to_str(k),"},{"line_number":180,"context_line":"                                              self._to_str(v)])"},{"line_number":181,"context_line":"                                    for k, v in obj.items()]))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_17554b4f","line":178,"in_reply_to":"1a122d0e_14470e1e","updated":"2016-04-25 09:49:42.000000000","message":"This is a workaround for https://bugs.launchpad.net/rally/+bug/1570328\n\nWithout this fix, some scenarios will never be agredated into trends because these (equal) scenarios will differ by network_create_args","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"8780b62f36e047fac7e5eba1754689f8e15087f1","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            return \",\".join(sorted([self._to_str(v) for v in obj]))"},{"line_number":176,"context_line":"        elif isinstance(obj, dict):"},{"line_number":177,"context_line":"            if \"network_create_args\" in obj:"},{"line_number":178,"context_line":"                obj[\"network_create_args\"] \u003d {}"},{"line_number":179,"context_line":"            return \"|\".join(sorted([\":\".join([self._to_str(k),"},{"line_number":180,"context_line":"                                              self._to_str(v)])"},{"line_number":181,"context_line":"                                    for k, v in obj.items()]))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_573a1e99","line":178,"in_reply_to":"1a122d0e_17554b4f","updated":"2016-04-25 12:12:21.000000000","message":"I see... but any way this looks like dirty hack. Adding if inside new code to make it work together with the bug. Why not to fix it and to use such hacks here?","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"731cc347ecb6807339cb26eb341eef3a07e1941a","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            return \",\".join(sorted([self._to_str(v) for v in obj]))"},{"line_number":176,"context_line":"        elif isinstance(obj, dict):"},{"line_number":177,"context_line":"            if \"network_create_args\" in obj:"},{"line_number":178,"context_line":"                obj[\"network_create_args\"] \u003d {}"},{"line_number":179,"context_line":"            return \"|\".join(sorted([\":\".join([self._to_str(k),"},{"line_number":180,"context_line":"                                              self._to_str(v)])"},{"line_number":181,"context_line":"                                    for k, v in obj.items()]))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_57985e1b","line":178,"in_reply_to":"1a122d0e_573a1e99","updated":"2016-04-25 12:34:14.000000000","message":"https://review.openstack.org/#/c/306489/","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"70330cd55d23dcbe49997c8802af4d2b4cb7298d","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            return \"|\".join(sorted([\":\".join([self._to_str(k),"},{"line_number":180,"context_line":"                                              self._to_str(v)])"},{"line_number":181,"context_line":"                                    for k, v in obj.items()]))"},{"line_number":182,"context_line":"        raise TypeError(\"Object %(obj)r of unexpected type \u0027%(type)s\u0027\""},{"line_number":183,"context_line":"                        % {\"obj\": obj, \"type\": type(obj)})"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _make_hash(self, obj):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_94083edb","line":182,"updated":"2016-04-25 00:31:07.000000000","message":"I\u0027d better rephrase \"Unexpected type of object\" because the first part of the sentence is the main and then is the reference. In original case reference became the main part of the sentence what is strange. I have noticed that this function _to_str used only in _make_hash and it used only like _make_hash(result[\"key\"][\"kw\"]). The question is - How we could get here Unexpected type of object?","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"98875db79563dd477d2ea4634f3356a48c85f831","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            return \"|\".join(sorted([\":\".join([self._to_str(k),"},{"line_number":180,"context_line":"                                              self._to_str(v)])"},{"line_number":181,"context_line":"                                    for k, v in obj.items()]))"},{"line_number":182,"context_line":"        raise TypeError(\"Object %(obj)r of unexpected type \u0027%(type)s\u0027\""},{"line_number":183,"context_line":"                        % {\"obj\": obj, \"type\": type(obj)})"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def _make_hash(self, obj):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_323055e8","line":182,"in_reply_to":"1a122d0e_94083edb","updated":"2016-04-25 09:49:42.000000000","message":"* \"Unexpected type of object\" - will change\n\n* Look at L186 - unexpected type potentially can appear in result[\"key\"][\"kw\"] because this is 1) nested and sometimes complicated structure and 2) we have real-life example (see bug mentioned above) when this structure is modified in runtime","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"4989c10d3ffed3efcc05de0e59af8d654ebfbace","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        elif isinstance(obj, dict):"},{"line_number":177,"context_line":"            return \"|\".join(sorted([\":\".join([self._to_str(k),"},{"line_number":178,"context_line":"                                              self._to_str(v)])"},{"line_number":179,"context_line":"                                    for k, v in obj.items()]))"},{"line_number":180,"context_line":"        raise TypeError(\"Unexpected type %(type)r of object %(obj)r\""},{"line_number":181,"context_line":"                        % {\"obj\": obj, \"type\": type(obj)})"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_3ea63c53","line":179,"range":{"start_line":179,"start_character":0,"end_line":179,"end_character":62},"updated":"2016-05-20 13:28:47.000000000","message":"Well, if you already imported \u0027six\u0027, please use six.iteritems()","commit_id":"d82236503f78bcd6dcc6a9358e5ecfd6a6b7be14"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"cc358d6d655e681bf23c34f4cb63aa017113e796","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        elif isinstance(obj, dict):"},{"line_number":177,"context_line":"            return \"|\".join(sorted([\":\".join([self._to_str(k),"},{"line_number":178,"context_line":"                                              self._to_str(v)])"},{"line_number":179,"context_line":"                                    for k, v in obj.items()]))"},{"line_number":180,"context_line":"        raise TypeError(\"Unexpected type %(type)r of object %(obj)r\""},{"line_number":181,"context_line":"                        % {\"obj\": obj, \"type\": type(obj)})"},{"line_number":182,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_5c56a95c","line":179,"range":{"start_line":179,"start_character":0,"end_line":179,"end_character":62},"in_reply_to":"bab6814e_3ea63c53","updated":"2016-05-20 13:43:58.000000000","message":"The main purpose of six.iteritems is to replace python2 dict.iteritems() (we need it in places where we expect iterator only), but in this place items() is enough ant this method is compatible for py2 and py3","commit_id":"d82236503f78bcd6dcc6a9358e5ecfd6a6b7be14"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"4989c10d3ffed3efcc05de0e59af8d654ebfbace","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        task \u003d {row[0]: dict(zip(result[\"info\"][\"stat\"][\"cols\"], row))"},{"line_number":208,"context_line":"                for row in result[\"info\"][\"stat\"][\"rows\"]}"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        for k in task.keys():"},{"line_number":211,"context_line":"            for tgt, src in ((\"min\", \"Min (sec)\"),"},{"line_number":212,"context_line":"                             (\"median\", \"Median (sec)\"),"},{"line_number":213,"context_line":"                             (\"90%ile\", \"90%ile (sec)\"),"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_1e70980a","line":210,"range":{"start_line":210,"start_character":22,"end_line":210,"end_character":26},"updated":"2016-05-20 13:28:47.000000000","message":"just \u0027for k in task:\u0027","commit_id":"d82236503f78bcd6dcc6a9358e5ecfd6a6b7be14"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"cc358d6d655e681bf23c34f4cb63aa017113e796","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        task \u003d {row[0]: dict(zip(result[\"info\"][\"stat\"][\"cols\"], row))"},{"line_number":208,"context_line":"                for row in result[\"info\"][\"stat\"][\"rows\"]}"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        for k in task.keys():"},{"line_number":211,"context_line":"            for tgt, src in ((\"min\", \"Min (sec)\"),"},{"line_number":212,"context_line":"                             (\"median\", \"Median (sec)\"),"},{"line_number":213,"context_line":"                             (\"90%ile\", \"90%ile (sec)\"),"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_dcc8d924","line":210,"range":{"start_line":210,"start_character":22,"end_line":210,"end_character":26},"in_reply_to":"bab6814e_1e70980a","updated":"2016-05-20 13:43:58.000000000","message":"Agree","commit_id":"d82236503f78bcd6dcc6a9358e5ecfd6a6b7be14"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"4989c10d3ffed3efcc05de0e59af8d654ebfbace","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                    (self._tasks[key][\"seq\"], task[k][src]))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def get_data(self):"},{"line_number":233,"context_line":"        for key, value in self._tasks.items():"},{"line_number":234,"context_line":"            total \u003d None"},{"line_number":235,"context_line":"            for k, v in value[\"data\"].items():"},{"line_number":236,"context_line":"                if k \u003d\u003d \"total\":"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_7e1f246c","line":233,"range":{"start_line":233,"start_character":38,"end_line":233,"end_character":43},"updated":"2016-05-20 13:28:47.000000000","message":"six.iteritems","commit_id":"d82236503f78bcd6dcc6a9358e5ecfd6a6b7be14"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"cc358d6d655e681bf23c34f4cb63aa017113e796","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                    (self._tasks[key][\"seq\"], task[k][src]))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def get_data(self):"},{"line_number":233,"context_line":"        for key, value in self._tasks.items():"},{"line_number":234,"context_line":"            total \u003d None"},{"line_number":235,"context_line":"            for k, v in value[\"data\"].items():"},{"line_number":236,"context_line":"                if k \u003d\u003d \"total\":"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_7c2a8d91","line":233,"range":{"start_line":233,"start_character":38,"end_line":233,"end_character":43},"in_reply_to":"bab6814e_7e1f246c","updated":"2016-05-20 13:43:58.000000000","message":"items() is py2/py3 compatible in cases when we do not need iterator only and it does good job here, no need to use extra module for simple action","commit_id":"d82236503f78bcd6dcc6a9358e5ecfd6a6b7be14"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"4989c10d3ffed3efcc05de0e59af8d654ebfbace","unresolved":false,"context_lines":[{"line_number":232,"context_line":"    def get_data(self):"},{"line_number":233,"context_line":"        for key, value in self._tasks.items():"},{"line_number":234,"context_line":"            total \u003d None"},{"line_number":235,"context_line":"            for k, v in value[\"data\"].items():"},{"line_number":236,"context_line":"                if k \u003d\u003d \"total\":"},{"line_number":237,"context_line":"                    total \u003d v"},{"line_number":238,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_fe0b1428","line":235,"range":{"start_line":235,"start_character":38,"end_line":235,"end_character":43},"updated":"2016-05-20 13:28:47.000000000","message":"ditto","commit_id":"d82236503f78bcd6dcc6a9358e5ecfd6a6b7be14"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"4989c10d3ffed3efcc05de0e59af8d654ebfbace","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                    total \u003d v"},{"line_number":238,"context_line":"                else:"},{"line_number":239,"context_line":"                    self._tasks[key][\"atomic\"].append("},{"line_number":240,"context_line":"                        {\"name\": k, \"values\": list(v.items())})"},{"line_number":241,"context_line":"            for stat, comp in ((\"min\", charts.streaming.MinComputation()),"},{"line_number":242,"context_line":"                               (\"max\", charts.streaming.MaxComputation()),"},{"line_number":243,"context_line":"                               (\"avg\", charts.streaming.MeanComputation())):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_dcea990e","line":240,"range":{"start_line":240,"start_character":46,"end_line":240,"end_character":60},"updated":"2016-05-20 13:28:47.000000000","message":"in python prior to v3, dict.items() already creates a list, so you create a list twice. Pls use six.iteritems().","commit_id":"d82236503f78bcd6dcc6a9358e5ecfd6a6b7be14"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"4989c10d3ffed3efcc05de0e59af8d654ebfbace","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                    comp.add(v)"},{"line_number":246,"context_line":"                self._tasks[key][\"stat\"][stat] \u003d comp.result()"},{"line_number":247,"context_line":"            del self._tasks[key][\"data\"]"},{"line_number":248,"context_line":"            self._tasks[key][\"total\"] \u003d list(total.items())"},{"line_number":249,"context_line":"            self._tasks[key][\"single\"] \u003d self._tasks[key][\"seq\"] \u003c 2"},{"line_number":250,"context_line":"        return sorted(self._tasks.values(), key\u003dlambda s: s[\"name\"])"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_3cc3e58a","line":248,"range":{"start_line":248,"start_character":40,"end_line":248,"end_character":59},"updated":"2016-05-20 13:28:47.000000000","message":"see above","commit_id":"d82236503f78bcd6dcc6a9358e5ecfd6a6b7be14"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"4989c10d3ffed3efcc05de0e59af8d654ebfbace","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            del self._tasks[key][\"data\"]"},{"line_number":248,"context_line":"            self._tasks[key][\"total\"] \u003d list(total.items())"},{"line_number":249,"context_line":"            self._tasks[key][\"single\"] \u003d self._tasks[key][\"seq\"] \u003c 2"},{"line_number":250,"context_line":"        return sorted(self._tasks.values(), key\u003dlambda s: s[\"name\"])"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_dc2d7947","line":250,"range":{"start_line":250,"start_character":34,"end_line":250,"end_character":42},"updated":"2016-05-20 13:28:47.000000000","message":"six.itervalues()","commit_id":"d82236503f78bcd6dcc6a9358e5ecfd6a6b7be14"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"cc358d6d655e681bf23c34f4cb63aa017113e796","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            del self._tasks[key][\"data\"]"},{"line_number":248,"context_line":"            self._tasks[key][\"total\"] \u003d list(total.items())"},{"line_number":249,"context_line":"            self._tasks[key][\"single\"] \u003d self._tasks[key][\"seq\"] \u003c 2"},{"line_number":250,"context_line":"        return sorted(self._tasks.values(), key\u003dlambda s: s[\"name\"])"}],"source_content_type":"text/x-python","patch_set":7,"id":"bab6814e_9fe5a339","line":250,"range":{"start_line":250,"start_character":34,"end_line":250,"end_character":42},"in_reply_to":"bab6814e_dc2d7947","updated":"2016-05-20 13:43:58.000000000","message":"sorted() iterated over all values, no matter whenther the source is iterator or iterable. six.itervalues is not required.\n\nsix does not *replace* built-in functions. It just provides compatibility for specific cases\n\nvalues() (as well as items()) exists both in py2 and py3, let\u0027s not fall back to usage of iter-items and iter-values if we do not need an iterator explicitly","commit_id":"d82236503f78bcd6dcc6a9358e5ecfd6a6b7be14"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"19e304d4785d96ea94381a83897d2b1e9d53a939","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    def __init__(self):"},{"line_number":166,"context_line":"        self._tasks \u003d {}"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def _to_str(self, obj):"},{"line_number":169,"context_line":"        \"\"\"Convert object into string.\"\"\""},{"line_number":170,"context_line":"        if obj is None:"},{"line_number":171,"context_line":"            return \"None\""}],"source_content_type":"text/x-python","patch_set":8,"id":"bab6814e_0c674826","line":168,"updated":"2016-05-24 13:49:04.000000000","message":"_to_str and _make_hash both seems just helper functions, not methods of Trends class","commit_id":"f501f397cc20738e2a2ac425f2da26b3d801a5f8"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"a18814b3f2986bbec2216d53a5e9124785b33b0e","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    def __init__(self):"},{"line_number":166,"context_line":"        self._tasks \u003d {}"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def _to_str(self, obj):"},{"line_number":169,"context_line":"        \"\"\"Convert object into string.\"\"\""},{"line_number":170,"context_line":"        if obj is None:"},{"line_number":171,"context_line":"            return \"None\""}],"source_content_type":"text/x-python","patch_set":8,"id":"bab6814e_e71c9dc3","line":168,"in_reply_to":"bab6814e_0c674826","updated":"2016-05-24 13:56:03.000000000","message":"Is _to_str expected to be reused somewhere outside Trends? If not, its role as class method looks good","commit_id":"f501f397cc20738e2a2ac425f2da26b3d801a5f8"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"19e304d4785d96ea94381a83897d2b1e9d53a939","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            self._tasks[key] \u003d {\"seq\": 1,"},{"line_number":191,"context_line":"                                \"name\": name,"},{"line_number":192,"context_line":"                                \"cls\": name.split(\".\")[0],"},{"line_number":193,"context_line":"                                \"met\": name.split(\".\")[1],"},{"line_number":194,"context_line":"                                \"data\": {},"},{"line_number":195,"context_line":"                                \"total\": None,"},{"line_number":196,"context_line":"                                \"atomic\": [],"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab6814e_675b8d2f","line":193,"updated":"2016-05-24 13:49:04.000000000","message":"Where this keys are used? (cls and met) Why \"name\" isn\u0027t enough?\n\nNot sure if name will always contain a dot.","commit_id":"f501f397cc20738e2a2ac425f2da26b3d801a5f8"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"a18814b3f2986bbec2216d53a5e9124785b33b0e","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            self._tasks[key] \u003d {\"seq\": 1,"},{"line_number":191,"context_line":"                                \"name\": name,"},{"line_number":192,"context_line":"                                \"cls\": name.split(\".\")[0],"},{"line_number":193,"context_line":"                                \"met\": name.split(\".\")[1],"},{"line_number":194,"context_line":"                                \"data\": {},"},{"line_number":195,"context_line":"                                \"total\": None,"},{"line_number":196,"context_line":"                                \"atomic\": [],"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab6814e_62809b47","line":193,"in_reply_to":"bab6814e_675b8d2f","updated":"2016-05-24 13:56:03.000000000","message":"These keys are used in trends HTML report as template environment.\n\nSimilar env is used in task report at L78-103.\n\nWe expect dot in scenario name for now (same for task report),\nthis is a topic of another change.","commit_id":"f501f397cc20738e2a2ac425f2da26b3d801a5f8"}],"tests/unit/task/processing/test_plot.py":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"70330cd55d23dcbe49997c8802af4d2b4cb7298d","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        trends \u003d plot.Trends()"},{"line_number":177,"context_line":"        self.assertEqual(expected, trends._to_str(obj))"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def test__to_str_raises(self):"},{"line_number":180,"context_line":"        trends \u003d plot.Trends()"},{"line_number":181,"context_line":"        self.assertRaises(TypeError, trends._to_str, 1, 2)"},{"line_number":182,"context_line":"        self.assertRaises(TypeError, trends._to_str, set())"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_14e38e06","line":179,"updated":"2016-04-25 00:31:07.000000000","message":"I suggest you to mix up two function from above and use in the new one the same pattern as you pointed earlier here https://review.openstack.org/#/c/261527/22/tests/unit/plugins/common/exporter/test_file_system.py","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"98875db79563dd477d2ea4634f3356a48c85f831","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        trends \u003d plot.Trends()"},{"line_number":177,"context_line":"        self.assertEqual(expected, trends._to_str(obj))"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def test__to_str_raises(self):"},{"line_number":180,"context_line":"        trends \u003d plot.Trends()"},{"line_number":181,"context_line":"        self.assertRaises(TypeError, trends._to_str, 1, 2)"},{"line_number":182,"context_line":"        self.assertRaises(TypeError, trends._to_str, set())"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_3247b54c","line":179,"in_reply_to":"1a122d0e_14e38e06","updated":"2016-04-25 09:49:42.000000000","message":"will do","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"70330cd55d23dcbe49997c8802af4d2b4cb7298d","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def test__make_hash(self):"},{"line_number":185,"context_line":"        trends \u003d plot.Trends()"},{"line_number":186,"context_line":"        self.assertEqual(\"acbd18db4cc2f85cedef654fccc4a4d8\","},{"line_number":187,"context_line":"                         trends._make_hash(\"foo\"))"},{"line_number":188,"context_line":"        self.assertEqual(\"37b51d194a7513e45b56f6524f2d51f2\","},{"line_number":189,"context_line":"                         trends._make_hash(\"bar\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_b4ba9adf","line":186,"updated":"2016-04-25 00:31:07.000000000","message":"As for me this test says that _make_hash return some value. But it should test whether it call hashlib or not for example. With what arguments... I don\u0027t know whether this is right value or not.","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"4259cd4224086f9a378a34c8ec261b6650cb7faa","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def test__make_hash(self):"},{"line_number":185,"context_line":"        trends \u003d plot.Trends()"},{"line_number":186,"context_line":"        self.assertEqual(\"acbd18db4cc2f85cedef654fccc4a4d8\","},{"line_number":187,"context_line":"                         trends._make_hash(\"foo\"))"},{"line_number":188,"context_line":"        self.assertEqual(\"37b51d194a7513e45b56f6524f2d51f2\","},{"line_number":189,"context_line":"                         trends._make_hash(\"bar\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_7412b8b5","line":186,"in_reply_to":"1a122d0e_7285ad57","updated":"2016-04-25 11:47:50.000000000","message":"Looking at the test I see only that _make_hash retrun some hash. I don\u0027t have any clue what\u0027s inside\nLets imagine that we rewrite it. We have mocked hashlib.\nNow we could check is it actually called or not, how many time, with what arguments and does this function return the same as hashlib give us and we proccess. That is what this test should do.\n\n\"Since hashlib is a standard lib and it does not create side effect - this is OK\" - I don\u0027t ask you to test standard library. Mocking of it will help us only to collect information of how it was used inside.","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"988aac7166990e767cf28c6ef1891a996d5b6646","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def test__make_hash(self):"},{"line_number":185,"context_line":"        trends \u003d plot.Trends()"},{"line_number":186,"context_line":"        self.assertEqual(\"acbd18db4cc2f85cedef654fccc4a4d8\","},{"line_number":187,"context_line":"                         trends._make_hash(\"foo\"))"},{"line_number":188,"context_line":"        self.assertEqual(\"37b51d194a7513e45b56f6524f2d51f2\","},{"line_number":189,"context_line":"                         trends._make_hash(\"bar\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_b45a9081","line":186,"in_reply_to":"1a122d0e_7412b8b5","updated":"2016-04-25 11:50:26.000000000","message":"I\u0027m not sure we need to check that hashlib is called, simple check that given input argument produces expected result is enough","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"98875db79563dd477d2ea4634f3356a48c85f831","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def test__make_hash(self):"},{"line_number":185,"context_line":"        trends \u003d plot.Trends()"},{"line_number":186,"context_line":"        self.assertEqual(\"acbd18db4cc2f85cedef654fccc4a4d8\","},{"line_number":187,"context_line":"                         trends._make_hash(\"foo\"))"},{"line_number":188,"context_line":"        self.assertEqual(\"37b51d194a7513e45b56f6524f2d51f2\","},{"line_number":189,"context_line":"                         trends._make_hash(\"bar\"))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_7285ad57","line":186,"in_reply_to":"1a122d0e_b4ba9adf","updated":"2016-04-25 09:49:42.000000000","message":"This check is better because it verifies the result. We assume that the value is right because this is testing code. Whether it calls hashlib or imaginary superhashlib - does not matter.\nSince hashlib is a standard lib and it does not create side effect - this is OK","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"70330cd55d23dcbe49997c8802af4d2b4cb7298d","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        self.assertEqual(\"acbd18db4cc2f85cedef654fccc4a4d8\","},{"line_number":187,"context_line":"                         trends._make_hash(\"foo\"))"},{"line_number":188,"context_line":"        self.assertEqual(\"37b51d194a7513e45b56f6524f2d51f2\","},{"line_number":189,"context_line":"                         trends._make_hash(\"bar\"))"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _make_result(self, salt, sla_success\u003dTrue):"},{"line_number":192,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_94a4beb9","line":189,"updated":"2016-04-25 00:31:07.000000000","message":"What is the sense to add here test for foo and bar? I think that one of them will cover enough.","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"98875db79563dd477d2ea4634f3356a48c85f831","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        self.assertEqual(\"acbd18db4cc2f85cedef654fccc4a4d8\","},{"line_number":187,"context_line":"                         trends._make_hash(\"foo\"))"},{"line_number":188,"context_line":"        self.assertEqual(\"37b51d194a7513e45b56f6524f2d51f2\","},{"line_number":189,"context_line":"                         trends._make_hash(\"bar\"))"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _make_result(self, salt, sla_success\u003dTrue):"},{"line_number":192,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_f2f41dd0","line":189,"in_reply_to":"1a122d0e_94a4beb9","updated":"2016-04-25 09:49:42.000000000","message":"This is for sure :) Yes, bar-test can be removed, however it would be nice to replace it for value of empty string","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"70330cd55d23dcbe49997c8802af4d2b4cb7298d","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        return {"},{"line_number":193,"context_line":"            \"key\": {\"kw\": salt + \"_kw\", \"name\": \"Scenario.name_%s\" % salt},"},{"line_number":194,"context_line":"            \"sla\": [{\"success\": sla_success}],"},{"line_number":195,"context_line":"            \"info\": {\"iterations_count\": 4,"},{"line_number":196,"context_line":"                     \"atomic\": {\"a\": 123, \"b\": 456},"},{"line_number":197,"context_line":"                     \"stat\": {\"rows\": [[\"a\", 0.7, 0.85, 0.9, 0.87,"},{"line_number":198,"context_line":"                                        1.25, 0.67, \"100.0%\", 4],"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_f4ab7287","line":195,"updated":"2016-04-25 00:31:07.000000000","message":"The same as in 189 to number of iteration 1 or 2 will be enough. This will help us to reduce a bit number of lines and male tests a bit shorter","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"c444ce42f6888ddda722712a3e4c39c49f0834c7","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        return {"},{"line_number":193,"context_line":"            \"key\": {\"kw\": salt + \"_kw\", \"name\": \"Scenario.name_%s\" % salt},"},{"line_number":194,"context_line":"            \"sla\": [{\"success\": sla_success}],"},{"line_number":195,"context_line":"            \"info\": {\"iterations_count\": 4,"},{"line_number":196,"context_line":"                     \"atomic\": {\"a\": 123, \"b\": 456},"},{"line_number":197,"context_line":"                     \"stat\": {\"rows\": [[\"a\", 0.7, 0.85, 0.9, 0.87,"},{"line_number":198,"context_line":"                                        1.25, 0.67, \"100.0%\", 4],"}],"source_content_type":"text/x-python","patch_set":6,"id":"dab17558_f9ce19b6","line":195,"in_reply_to":"1a122d0e_f4ab7287","updated":"2016-05-12 13:05:40.000000000","message":"4 is not a big number of iterations, let\u0027s not catch nits","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"98875db79563dd477d2ea4634f3356a48c85f831","unresolved":false,"context_lines":[{"line_number":192,"context_line":"        return {"},{"line_number":193,"context_line":"            \"key\": {\"kw\": salt + \"_kw\", \"name\": \"Scenario.name_%s\" % salt},"},{"line_number":194,"context_line":"            \"sla\": [{\"success\": sla_success}],"},{"line_number":195,"context_line":"            \"info\": {\"iterations_count\": 4,"},{"line_number":196,"context_line":"                     \"atomic\": {\"a\": 123, \"b\": 456},"},{"line_number":197,"context_line":"                     \"stat\": {\"rows\": [[\"a\", 0.7, 0.85, 0.9, 0.87,"},{"line_number":198,"context_line":"                                        1.25, 0.67, \"100.0%\", 4],"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_72a48db8","line":195,"in_reply_to":"1a122d0e_f4ab7287","updated":"2016-04-25 09:49:42.000000000","message":"`2\u0027 - maybe enough but `1\u0027 will be definitely not enough","commit_id":"4d60f7526041e1219d9336c94a0cb8277cbd2ac9"}]}
