)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"d8ed290f1aec7360c1b3b75786379d90fbde419a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Illia Khudoshyn \u003cikhudoshyn@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-12-03 14:58:27 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add Workload object. Fix subtask representation in report"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The patch introduces Workload model"},{"line_number":10,"context_line":"instead of regular dict that was used to describe"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"7a740942_a8c987ae","line":7,"updated":"2015-12-03 16:14:28.000000000","message":"I would recommend to remove phrase \"Fix subtask representation in report\" because this patch does not actually make changes in report","commit_id":"8ec832ffab9dd2101a81cefb6c55b9460d3d1fad"}],"rally/task/engine.py":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"07b39288d335b409c29e1915b78e00e43183ae49","unresolved":false,"context_lines":[{"line_number":526,"context_line":""},{"line_number":527,"context_line":"    def to_task(self):"},{"line_number":528,"context_line":"        # return {self.name: [self.to_dict()]}"},{"line_number":529,"context_line":"        return self.to_dict()"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def make_key(self, pos):"},{"line_number":532,"context_line":"        return {\"name\": self.name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_1b3e75b8","line":529,"updated":"2015-11-26 03:07:07.000000000","message":"What is to_task used for? seems is the same with to_dict.","commit_id":"cd0f9131ad8a6bd0b533515f297c7d26ac1771d5"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"a0830da459a7961021010dfe2b8436138d15365f","unresolved":false,"context_lines":[{"line_number":526,"context_line":""},{"line_number":527,"context_line":"    def to_task(self):"},{"line_number":528,"context_line":"        # return {self.name: [self.to_dict()]}"},{"line_number":529,"context_line":"        return self.to_dict()"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def make_key(self, pos):"},{"line_number":532,"context_line":"        return {\"name\": self.name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_0e13835c","line":529,"in_reply_to":"9a8ffd7b_1b3e75b8","updated":"2015-11-26 10:58:39.000000000","message":"Added docstring and a comment in the next patchset","commit_id":"cd0f9131ad8a6bd0b533515f297c7d26ac1771d5"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"68b4398be385cf78ff943f09ed41e687996a3eff","unresolved":false,"context_lines":[{"line_number":513,"context_line":"    def to_dict(self):"},{"line_number":514,"context_line":"        scenario \u003d {\"runner\": self.runner}"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"        if self.sla:"},{"line_number":517,"context_line":"            scenario[\"sla\"] \u003d self.sla"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        if self.args:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_399d6f0a","line":516,"updated":"2015-11-26 11:31:11.000000000","message":"for prop in \"sla\", \"args\", \"context\":\n    value \u003d getattr(self, prop)\n    if value:\n        scenario[prop] \u003d value","commit_id":"43d1bebaa97774b6c4d2d38772eea86375779d1f"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"2722aceca6f12675a242331357c971f0519b9f8b","unresolved":false,"context_lines":[{"line_number":513,"context_line":"    def to_dict(self):"},{"line_number":514,"context_line":"        scenario \u003d {\"runner\": self.runner}"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"        if self.sla:"},{"line_number":517,"context_line":"            scenario[\"sla\"] \u003d self.sla"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        if self.args:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_5e9cd45c","line":516,"in_reply_to":"9a8ffd7b_399d6f0a","updated":"2015-11-26 12:28:53.000000000","message":"Done","commit_id":"43d1bebaa97774b6c4d2d38772eea86375779d1f"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"68b4398be385cf78ff943f09ed41e687996a3eff","unresolved":false,"context_lines":[{"line_number":543,"context_line":"        # return {self.name: [self.to_dict()]}"},{"line_number":544,"context_line":"        return self.to_dict()"},{"line_number":545,"context_line":""},{"line_number":546,"context_line":"    def make_key(self, pos):"},{"line_number":547,"context_line":"        return {\"name\": self.name,"},{"line_number":548,"context_line":"                \"pos\": pos,"},{"line_number":549,"context_line":"                \"kw\": self.to_task()}"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_f97927c9","line":546,"updated":"2015-11-26 11:31:11.000000000","message":"Just recommendation - name `get_key()\u0027 looks a bit better.\n\nSame for method below - get_exception_args()","commit_id":"43d1bebaa97774b6c4d2d38772eea86375779d1f"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"2722aceca6f12675a242331357c971f0519b9f8b","unresolved":false,"context_lines":[{"line_number":543,"context_line":"        # return {self.name: [self.to_dict()]}"},{"line_number":544,"context_line":"        return self.to_dict()"},{"line_number":545,"context_line":""},{"line_number":546,"context_line":"    def make_key(self, pos):"},{"line_number":547,"context_line":"        return {\"name\": self.name,"},{"line_number":548,"context_line":"                \"pos\": pos,"},{"line_number":549,"context_line":"                \"kw\": self.to_task()}"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a8ffd7b_3e331064","line":546,"in_reply_to":"9a8ffd7b_f97927c9","updated":"2015-11-26 12:28:53.000000000","message":"That was my first thought, yet I ended up with make_XXX as more appropriate. get_XXX is more like retreiving something that already exists, but make_XXX constructs something new.","commit_id":"43d1bebaa97774b6c4d2d38772eea86375779d1f"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"cfc784b5658fdcf8c3ac12b3d4fba80b858222f9","unresolved":false,"context_lines":[{"line_number":499,"context_line":"        self.context \u003d config.get(\"context\", {})"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"class ScenarioConfig(object):"},{"line_number":503,"context_line":"    \"\"\"ScenarioConfig -- scenario configuration in SubTask."},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a8ffd7b_3dbdd202","line":502,"updated":"2015-11-30 16:34:30.000000000","message":"Let\u0027s think about this name a bit...","commit_id":"5d602cfb1c18b360532522e2a78d01dd771cee69"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"894cf37c5856f4d57eb9b788e747867f41cab434","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        self.description \u003d config.get(\"description\")"},{"line_number":496,"context_line":"        self.workloads \u003d [Workload(wconf)"},{"line_number":497,"context_line":"                          for wconf"},{"line_number":498,"context_line":"                          in config[\"workloads\"]]"},{"line_number":499,"context_line":"        self.context \u003d config.get(\"context\", {})"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_a02ec840","line":498,"updated":"2015-12-03 10:27:08.000000000","message":"This can be moved to L497","commit_id":"e8d11bde87d71f7220902ca28ee991341d097cab"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"b5d5dc18c81445d85fa871fa04e8e95e0b42a108","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        self.description \u003d config.get(\"description\")"},{"line_number":496,"context_line":"        self.workloads \u003d [Workload(wconf)"},{"line_number":497,"context_line":"                          for wconf"},{"line_number":498,"context_line":"                          in config[\"workloads\"]]"},{"line_number":499,"context_line":"        self.context \u003d config.get(\"context\", {})"},{"line_number":500,"context_line":""},{"line_number":501,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_6a8752b5","line":498,"in_reply_to":"9a8ffd7b_a02ec840","updated":"2015-12-03 13:14:48.000000000","message":"Yes it can) But I prefer to keep \u0027for\u0027 and \u0027in\u0027 clauses on separate lines just for the sake of readability","commit_id":"e8d11bde87d71f7220902ca28ee991341d097cab"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"23d1ce79fcb9eed45a3d71cba7daa1e7d7a6f8de","unresolved":false,"context_lines":[{"line_number":500,"context_line":""},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"class Workload(object):"},{"line_number":503,"context_line":"    \"\"\"Workload -- workload configuration in SubTask."},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    \"\"\""},{"line_number":506,"context_line":"    def __init__(self, config):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_f94c82c9","line":503,"updated":"2015-12-03 12:27:02.000000000","message":"s/in/of ?","commit_id":"e8d11bde87d71f7220902ca28ee991341d097cab"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"b5d5dc18c81445d85fa871fa04e8e95e0b42a108","unresolved":false,"context_lines":[{"line_number":500,"context_line":""},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"class Workload(object):"},{"line_number":503,"context_line":"    \"\"\"Workload -- workload configuration in SubTask."},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    \"\"\""},{"line_number":506,"context_line":"    def __init__(self, config):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_eac102e5","line":503,"in_reply_to":"9a8ffd7b_f94c82c9","updated":"2015-12-03 13:14:48.000000000","message":"Done","commit_id":"e8d11bde87d71f7220902ca28ee991341d097cab"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"894cf37c5856f4d57eb9b788e747867f41cab434","unresolved":false,"context_lines":[{"line_number":515,"context_line":""},{"line_number":516,"context_line":"        for prop in \"sla\", \"args\", \"context\":"},{"line_number":517,"context_line":"            value \u003d getattr(self, prop)"},{"line_number":518,"context_line":"            if value:"},{"line_number":519,"context_line":"                workload[prop] \u003d value"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        return workload"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_e047f0b9","line":518,"updated":"2015-12-03 10:27:08.000000000","message":"Why do we filter keys for non-true values?\n\nIn this case we have to keep possible KeyError in mind while working with return value","commit_id":"e8d11bde87d71f7220902ca28ee991341d097cab"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"c0224f414a6ef0727d5f465f8105a36c56414b04","unresolved":false,"context_lines":[{"line_number":515,"context_line":""},{"line_number":516,"context_line":"        for prop in \"sla\", \"args\", \"context\":"},{"line_number":517,"context_line":"            value \u003d getattr(self, prop)"},{"line_number":518,"context_line":"            if value:"},{"line_number":519,"context_line":"                workload[prop] \u003d value"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        return workload"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_c560b1a7","line":518,"in_reply_to":"9a8ffd7b_aa3c5ae1","updated":"2015-12-03 13:20:12.000000000","message":"to_dict() is not directly related to JSON, this is actually a dict, and it can be used in python code (usage at L540). If we want to make specific JSON, then IMHO it is better to add to_json()","commit_id":"e8d11bde87d71f7220902ca28ee991341d097cab"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"733da1f46d1528c998b5a42259aeea7adc85d05a","unresolved":false,"context_lines":[{"line_number":515,"context_line":""},{"line_number":516,"context_line":"        for prop in \"sla\", \"args\", \"context\":"},{"line_number":517,"context_line":"            value \u003d getattr(self, prop)"},{"line_number":518,"context_line":"            if value:"},{"line_number":519,"context_line":"                workload[prop] \u003d value"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        return workload"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_afb78738","line":518,"in_reply_to":"9a8ffd7b_c560b1a7","updated":"2015-12-03 14:06:35.000000000","message":"Done","commit_id":"e8d11bde87d71f7220902ca28ee991341d097cab"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"b5d5dc18c81445d85fa871fa04e8e95e0b42a108","unresolved":false,"context_lines":[{"line_number":515,"context_line":""},{"line_number":516,"context_line":"        for prop in \"sla\", \"args\", \"context\":"},{"line_number":517,"context_line":"            value \u003d getattr(self, prop)"},{"line_number":518,"context_line":"            if value:"},{"line_number":519,"context_line":"                workload[prop] \u003d value"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        return workload"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_aa3c5ae1","line":518,"in_reply_to":"9a8ffd7b_e047f0b9","updated":"2015-12-03 13:14:48.000000000","message":"non-true in our case is \u0027non-empty dict\u0027\nThat\u0027s exactly what I want - not to have empty dicts in JSON","commit_id":"e8d11bde87d71f7220902ca28ee991341d097cab"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"61f0f8d2a5a85bd5975c947a5fb055fd6025262f","unresolved":false,"context_lines":[{"line_number":510,"context_line":"        self.context \u003d config.get(\"context\", {})"},{"line_number":511,"context_line":"        self.args \u003d config.get(\"args\", {})"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"    def to_json(self):"},{"line_number":514,"context_line":"        workload \u003d {\"runner\": self.runner}"},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"        for prop in \"sla\", \"args\", \"context\":"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_f204944a","line":513,"updated":"2015-12-03 14:37:26.000000000","message":"When I said about to_json() in patch set 8, I meant separate method, not rename s/to_dict/to_json/. JSON is not a dict, it is a type of `str\u0027!\n\nIMO method to_json() can not return dict","commit_id":"b6dba4c2015ad61daad62fb43cf5c923aaabc3f7"}],"tests/unit/task/test_engine.py":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"894cf37c5856f4d57eb9b788e747867f41cab434","unresolved":false,"context_lines":[{"line_number":746,"context_line":"        }"},{"line_number":747,"context_line":""},{"line_number":748,"context_line":"        self.assertEqual(expected_dict, wconf.to_dict())"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"    def test_make_key(self):"},{"line_number":751,"context_line":"        wconf \u003d engine.Workload({"},{"line_number":752,"context_line":"            \"name\": \"n\","}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_c0366c02","line":749,"updated":"2015-12-03 10:27:08.000000000","message":"It would be nice to add test_to_task()","commit_id":"e8d11bde87d71f7220902ca28ee991341d097cab"},{"author":{"_account_id":8491,"name":"Illia Khudoshyn","email":"ikhudoshyn@mirantis.com","username":"ikhudoshyn"},"change_message_id":"b5d5dc18c81445d85fa871fa04e8e95e0b42a108","unresolved":false,"context_lines":[{"line_number":746,"context_line":"        }"},{"line_number":747,"context_line":""},{"line_number":748,"context_line":"        self.assertEqual(expected_dict, wconf.to_dict())"},{"line_number":749,"context_line":""},{"line_number":750,"context_line":"    def test_make_key(self):"},{"line_number":751,"context_line":"        wconf \u003d engine.Workload({"},{"line_number":752,"context_line":"            \"name\": \"n\","}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_0a76c605","line":749,"in_reply_to":"9a8ffd7b_c0366c02","updated":"2015-12-03 13:14:48.000000000","message":"Done","commit_id":"e8d11bde87d71f7220902ca28ee991341d097cab"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"d8ed290f1aec7360c1b3b75786379d90fbde419a","unresolved":false,"context_lines":[{"line_number":730,"context_line":"class WorkloadTestCase(test.TestCase):"},{"line_number":731,"context_line":""},{"line_number":732,"context_line":"    def test_to_dict(self):"},{"line_number":733,"context_line":"        wconf \u003d engine.Workload({"},{"line_number":734,"context_line":"            \"name\": \"n\","},{"line_number":735,"context_line":"            \"runner\": \"r\","},{"line_number":736,"context_line":"            \"context\": \"c\","}],"source_content_type":"text/x-python","patch_set":12,"id":"7a740942_c85bb32d","line":733,"updated":"2015-12-03 16:14:28.000000000","message":"This is duplicated several times within this module... It would be good to move this to setUp()","commit_id":"8ec832ffab9dd2101a81cefb6c55b9460d3d1fad"}]}
