)]}'
{"marconi/common/utils.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"d7ccec91568fdfcf8087ab524d01521ddb666521","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":"    return dict((key_transform(k), value_transform(v))"},{"line_number":37,"context_line":"                for k, v in six.iteritems(d)"},{"line_number":38,"context_line":"                if k in names and pred(v))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATX%2F%2F%2BIk%3D","line":38,"updated":"2013-10-23 14:15:57.000000000","message":"This nifty function generalizes the notion of extracting fields we care about from, say, a PATCH request, and then transforming it to make it compatible with a given use case.","commit_id":"2eca41dc60f484a1d094d3872bcf07d684a1de73"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e474b08a630479ec860d8cbdbc874bccd21f5870","unresolved":false,"context_lines":[{"line_number":21,"context_line":"def fields(d, names, pred\u003dlambda x: True,"},{"line_number":22,"context_line":"           key_transform\u003dlambda x: x, value_transform\u003dlambda x: x):"},{"line_number":23,"context_line":"    \"\"\"Returns the entries in this dictionary with keys appearing in names."},{"line_number":24,"context_line":"    :type d: dict"},{"line_number":25,"context_line":"    :type names: [a]"},{"line_number":26,"context_line":"    :param pred: a filter that is applied to the values of the dictionary."},{"line_number":27,"context_line":"    :type pred: (a -\u003e bool)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F%2FwZI%3D","line":24,"updated":"2013-10-29 15:40:11.000000000","message":"missing :param d:","commit_id":"9c7036ff4eaa093e72a9dfa5b0c2301f576d1d38"}],"marconi/queues/storage/base.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"3acea09aa14817324696e1ad3b145004cae945c4","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":346,"context_line":"class ShardsBase(ControllerBase):"},{"line_number":347,"context_line":"    \"\"\"A controller for managing shards.\"\"\""},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2Fv5c%3D","line":346,"updated":"2013-10-10 11:43:28.000000000","message":"Notice that this name is redundant, as are the names of all controllers in this file. Ref: https://bugs.launchpad.net/marconi/+bug/1237747","commit_id":"bbe4ce9e04bb98d36fbc2ff041b366b77fcf3755"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e474b08a630479ec860d8cbdbc874bccd21f5870","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        raise NotImplementedError"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"class AdminControllerBase(object):"},{"line_number":372,"context_line":"    \"\"\"Top-level class for controllers."},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"    :param driver: Instance of the driver"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F%2FwWY%3D","line":371,"updated":"2013-10-29 15:40:11.000000000","message":"mmh, I think AdminControllerBase can be a bit confusing. I\u0027d consider renaming it in a separate patch!\n\nAlso, Why ControllerBase is not good enough?","commit_id":"9c7036ff4eaa093e72a9dfa5b0c2301f576d1d38"}],"marconi/queues/storage/mongodb/driver.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e474b08a630479ec860d8cbdbc874bccd21f5870","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @decorators.lazy_property(write\u003dFalse)"},{"line_number":112,"context_line":"    def shards_database(self):"},{"line_number":113,"context_line":"        name \u003d self.mongodb_conf.database + \u0027_shards\u0027"},{"line_number":114,"context_line":"        return self.connection[name]"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAATn%2F%2FwSw%3D","line":113,"updated":"2013-10-29 15:40:11.000000000","message":"I\u0027d like us to consider using \u0027.\u0027 instead of \u0027_\u0027 for mongodb. Using dots is compliant with mongodb\u0027s namespacing and we\u0027re accessing databases w/o using dot notation anyway.","commit_id":"9c7036ff4eaa093e72a9dfa5b0c2301f576d1d38"}],"marconi/queues/storage/mongodb/shards.py":[{"author":{"_account_id":6943,"name":"Zhihao Yuan","email":"zhihao.yuan@rackspace.com","username":"zyuan"},"change_message_id":"91b8d0eb74923957a6e483cc6dc857ea0cdb5d8f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        names \u003d (\u0027location\u0027, \u0027weight\u0027, \u0027options\u0027)"},{"line_number":86,"context_line":"        fields \u003d common_utils.fields(kwargs, names,"},{"line_number":87,"context_line":"                                     pred\u003dlambda x: x is not None,"},{"line_number":88,"context_line":"                                     key_transform\u003dlambda x: x[0])"},{"line_number":89,"context_line":"        assert fields, \u0027`weight`, `location`, or `options` not found in kwargs\u0027"},{"line_number":90,"context_line":"        res \u003d self._col.update({\u0027n\u0027: name},"},{"line_number":91,"context_line":"                               {\u0027$set\u0027: fields},"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FUnQ%3D","line":88,"updated":"2013-10-17 18:53:05.000000000","message":"I love this style, but I suspect that comprehension can be faster than this.","commit_id":"15ad254893d053cbd21c86a701838f80f1f54641"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"6da12e48fe8ada237c4d6fe4769febfd4d9f12d7","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        names \u003d (\u0027location\u0027, \u0027weight\u0027, \u0027options\u0027)"},{"line_number":86,"context_line":"        fields \u003d common_utils.fields(kwargs, names,"},{"line_number":87,"context_line":"                                     pred\u003dlambda x: x is not None,"},{"line_number":88,"context_line":"                                     key_transform\u003dlambda x: x[0])"},{"line_number":89,"context_line":"        assert fields, \u0027`weight`, `location`, or `options` not found in kwargs\u0027"},{"line_number":90,"context_line":"        res \u003d self._col.update({\u0027n\u0027: name},"},{"line_number":91,"context_line":"                               {\u0027$set\u0027: fields},"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATH%2F%2FUQs%3D","line":88,"in_reply_to":"AAAATH%2F%2FUnQ%3D","updated":"2013-10-17 20:38:54.000000000","message":"Assuming this API will see a low volume of requests, a few microseconds extra won\u0027t matter here IMO.","commit_id":"15ad254893d053cbd21c86a701838f80f1f54641"}],"marconi/queues/storage/sharding.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"d7ccec91568fdfcf8087ab524d01521ddb666521","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        ]"},{"line_number":150,"context_line":"        options \u003d ["},{"line_number":151,"context_line":"            cfg.StrOpt(\u0027storage\u0027, default\u003d\u0027sqlite\u0027),"},{"line_number":152,"context_line":"        ]"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        conf.register_opts(general_opts)"},{"line_number":155,"context_line":"        conf.register_opts(options, group\u003d\u0027queues:drivers\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATX%2F%2F%2BHY%3D","line":152,"updated":"2013-10-23 14:15:57.000000000","message":"Adding this option here continues the TODO pattern above. Until we\u0027re able to receive shard configurations dynamically, we need this as a placeholder.","commit_id":"2eca41dc60f484a1d094d3872bcf07d684a1de73"}],"marconi/tests/queues/storage/base.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"3acea09aa14817324696e1ad3b145004cae945c4","unresolved":false,"context_lines":[{"line_number":701,"context_line":"        for i, entry in enumerate(res):"},{"line_number":702,"context_line":"            self._shard_expects(entry, str(i), i, str(i))"},{"line_number":703,"context_line":"            self.assertIn(\u0027o\u0027, entry)"},{"line_number":704,"context_line":"            self.assertEqual(entry[\u0027o\u0027], {})"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"def _insert_fixtures(controller, queue_name, project\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2Fv4Q%3D","line":704,"updated":"2013-10-10 11:43:28.000000000","message":"Ideally, this test (test_listing_simple) would be broken out into a few separate tests that verify: plain listing works as expected, detailed listing works, marker setting works as expected, and limit works as expected. However, I felt it was a reasonable trade-off for now to clump it all into one test.","commit_id":"bbe4ce9e04bb98d36fbc2ff041b366b77fcf3755"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"d7ccec91568fdfcf8087ab524d01521ddb666521","unresolved":false,"context_lines":[{"line_number":615,"context_line":"        self.shards_controller \u003d self.driver.shards_controller"},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"        # Let\u0027s create one shard"},{"line_number":618,"context_line":"        self.shard \u003d str(uuid.uuid1())"},{"line_number":619,"context_line":"        self.shards_controller.create(self.shard, 100, \u0027localhost\u0027, {})"},{"line_number":620,"context_line":""},{"line_number":621,"context_line":"    def tearDown(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATX%2F%2F%2BHQ%3D","line":618,"updated":"2013-10-23 14:15:57.000000000","message":"uuid - because it makes the tests almost trivial to parallelize.","commit_id":"2eca41dc60f484a1d094d3872bcf07d684a1de73"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"ec6ad4fc801cf135ca7ebc3939caebc79bea1791","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        self.shards_controller.create(name,"},{"line_number":632,"context_line":"                                      100, \u0027localhost\u0027, {})"},{"line_number":633,"context_line":"        self.shards_controller.create(name,"},{"line_number":634,"context_line":"                                      100, \u0027localhost\u0027, {})"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"    def _shard_expects(self, shard, xname, xweight, xlocation):"},{"line_number":637,"context_line":"        self.assertIn(\u0027n\u0027, shard)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATn%2F%2F0Rc%3D","line":634,"updated":"2013-10-28 15:01:37.000000000","message":"How about setting the fields to something different, then reading back to prove the upsert modified the existing document?\n\nThis will help ensure consistent behavior between storage drivers.","commit_id":"1dd062f8b7d424f912ac395db0f2140410be3e6a"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"4f8f2c283280e10e81f0f674090487a5584fdeed","unresolved":false,"context_lines":[{"line_number":631,"context_line":"        self.shards_controller.create(name,"},{"line_number":632,"context_line":"                                      100, \u0027localhost\u0027, {})"},{"line_number":633,"context_line":"        self.shards_controller.create(name,"},{"line_number":634,"context_line":"                                      100, \u0027localhost\u0027, {})"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"    def _shard_expects(self, shard, xname, xweight, xlocation):"},{"line_number":637,"context_line":"        self.assertIn(\u0027n\u0027, shard)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATn%2F%2F0PQ%3D","line":634,"in_reply_to":"AAAATn%2F%2F0Rc%3D","updated":"2013-10-28 15:10:27.000000000","message":"Good point! I\u0027ll update this test. :)","commit_id":"1dd062f8b7d424f912ac395db0f2140410be3e6a"}],"tests/unit/queues/storage/test_shard_catalog.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"d7ccec91568fdfcf8087ab524d01521ddb666521","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        conf_file \u003d \u0027etc/wsgi_sqlite_sharded.conf\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        conf \u003d cfg.ConfigOpts()"},{"line_number":32,"context_line":"        conf(args\u003d[], default_config_files\u003d[conf_file])"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        lookup \u003d sharding.Catalog(conf).lookup"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATX%2F%2F%2BG0%3D","line":32,"updated":"2013-10-23 14:15:57.000000000","message":"Surprisingly, conf explodes with SystemExit 2 if no args are passed in. Even reading the latest GH source for oslo.config does not explain why this happens.","commit_id":"2eca41dc60f484a1d094d3872bcf07d684a1de73"}],"tests/unit/queues/transport/wsgi/base.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"d7ccec91568fdfcf8087ab524d01521ddb666521","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        super(TestBase, self).setUp()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        conf \u003d self.load_conf(self.config_filename)"},{"line_number":37,"context_line":"        conf.register_opts(driver._WSGI_OPTIONS,"},{"line_number":38,"context_line":"                           group\u003ddriver._WSGI_GROUP)"},{"line_number":39,"context_line":"        self.wsgi_cfg \u003d conf[driver._WSGI_GROUP]"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATX%2F%2F%2BGI%3D","line":36,"updated":"2013-10-23 14:15:57.000000000","message":"This is shorter, and also solves the problem hinted at in the previous patch.","commit_id":"2eca41dc60f484a1d094d3872bcf07d684a1de73"}],"tests/unit/test_bootstrap.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"d7ccec91568fdfcf8087ab524d01521ddb666521","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def _bootstrap(self, conf_file):"},{"line_number":28,"context_line":"        self.conf \u003d self.load_conf(conf_file)"},{"line_number":29,"context_line":"        return bootstrap.Bootstrap(self.conf)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def test_storage_invalid(self):"},{"line_number":32,"context_line":"        boot \u003d self._bootstrap(\u0027etc/drivers_storage_invalid.conf\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATX%2F%2F%2BF0%3D","line":29,"updated":"2013-10-23 14:15:57.000000000","message":"There is no need to make this self.conf. It likely snuck in as a result of me struggling with a rebase and getting cryptic SystemExit errors. :P","commit_id":"2eca41dc60f484a1d094d3872bcf07d684a1de73"}]}
