)]}'
{"horizon/utils/file_discovery.py":[{"author":{"_account_id":14307,"name":"Tyr Johanson","email":"tyr@hpe.com","username":"tyr"},"change_message_id":"5532fa7fcbf943af464e42e4a53cf0292b444816","unresolved":false,"context_lines":[{"line_number":13,"context_line":"from os import path"},{"line_number":14,"context_line":"from os import walk"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"ROOT_EXT \u003d \u0027.root.js\u0027"},{"line_number":17,"context_line":"MODULE_EXT \u003d \u0027.module.js\u0027"},{"line_number":18,"context_line":"MOCK_EXT \u003d \u0027.mock.js\u0027"},{"line_number":19,"context_line":"SPEC_EXT \u003d \u0027.spec.js\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_39199323","line":16,"updated":"2015-06-11 16:10:16.000000000","message":"Why the new \"root\" terminology? I thought we were shifting to calling the top level module the \"app\". Also, isn\u0027t the top level always a module?\n\nI was expecting something like\n\nAPP_EXT \u003d \u0027.app.module.js\u0027","commit_id":"e96df288f30c1a3be8b36bb10e693288db2a135c"},{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"a84574425db221b5fd6fdbc0b9d8b3655a3ba1d2","unresolved":false,"context_lines":[{"line_number":13,"context_line":"from os import path"},{"line_number":14,"context_line":"from os import walk"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"ROOT_EXT \u003d \u0027.root.js\u0027"},{"line_number":17,"context_line":"MODULE_EXT \u003d \u0027.module.js\u0027"},{"line_number":18,"context_line":"MOCK_EXT \u003d \u0027.mock.js\u0027"},{"line_number":19,"context_line":"SPEC_EXT \u003d \u0027.spec.js\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"1af86dd1_a6aa0884","line":16,"in_reply_to":"3afb71cf_39199323","updated":"2015-06-11 21:52:53.000000000","message":"The reason for that is \u0027.app.module.js\u0027 will appear in both root list and module list, means the file will be loaded twice.  But you are right, we don\u0027t want to introduce `.root.js`.  I will see if we need it at all.","commit_id":"e96df288f30c1a3be8b36bb10e693288db2a135c"},{"author":{"_account_id":14307,"name":"Tyr Johanson","email":"tyr@hpe.com","username":"tyr"},"change_message_id":"5532fa7fcbf943af464e42e4a53cf0292b444816","unresolved":false,"context_lines":[{"line_number":19,"context_line":"SPEC_EXT \u003d \u0027.spec.js\u0027"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def discover_files(base_path, sub_path\u003d\u0027\u0027, ext\u003d\u0027\u0027, trim_base_path\u003dFalse):"},{"line_number":23,"context_line":"    \"\"\"Discovers all files with certain extension in given paths."},{"line_number":24,"context_line":"    \"\"\""},{"line_number":25,"context_line":"    file_list \u003d []"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_b90d83ea","line":22,"updated":"2015-06-11 16:10:16.000000000","message":"consider using \"glob\" instead to allow for pathname patterns.\n\nhttps://docs.python.org/2/library/glob.html","commit_id":"e96df288f30c1a3be8b36bb10e693288db2a135c"},{"author":{"_account_id":14307,"name":"Tyr Johanson","email":"tyr@hpe.com","username":"tyr"},"change_message_id":"5532fa7fcbf943af464e42e4a53cf0292b444816","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                     and not f.endswith(MOCK_EXT)"},{"line_number":67,"context_line":"                     and not f.endswith(SPEC_EXT)]"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    sources \u003d root + modules + other_sources"},{"line_number":70,"context_line":"    return sources, mocks, specs"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_b98103c6","line":69,"updated":"2015-06-11 16:10:16.000000000","message":"I think other_sources might need to be included first, at least during the transition period. This allows Angular code to reference/initialize javascript globals (like horizon.js).  We also know that non-Angular code (other_sources) will NOT have a dependency on Angular code because by definition it doesn\u0027t use injection.","commit_id":"e96df288f30c1a3be8b36bb10e693288db2a135c"},{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"a84574425db221b5fd6fdbc0b9d8b3655a3ba1d2","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                     and not f.endswith(MOCK_EXT)"},{"line_number":67,"context_line":"                     and not f.endswith(SPEC_EXT)]"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    sources \u003d root + modules + other_sources"},{"line_number":70,"context_line":"    return sources, mocks, specs"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1af86dd1_a6a44808","line":69,"in_reply_to":"3afb71cf_b98103c6","updated":"2015-06-11 21:52:53.000000000","message":"There is one file that has to be loaded before angular stuff, which is horizon.js. We will manually list that file before any other files.  Please check the below patch for details:\n\nhttps://review.openstack.org/#/c/189997/10/horizon/test/jasmine/jasmine_tests.py","commit_id":"e96df288f30c1a3be8b36bb10e693288db2a135c"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"3c96222b4cdef9957aa3e1cc5084fb28fac11a74","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    return sources, mocks, specs, html_files"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def output(file_list, list_name):"},{"line_number":86,"context_line":"    \"\"\"Prints result to console for debug"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":"    print (\"\\nDiscovered {0} {1}:\\n\".format(len(file_list), list_name))"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_ebb80513","line":85,"updated":"2015-06-10 11:29:31.000000000","message":"I suggest we add logging to your utils. (and maybe remove this function?) Having a DEBUG level log for this kind of functionality seems like a good idea. Should help folks, when debugging a missing js file. Or similar problem.\n\nWhat do you think?","commit_id":"e96df288f30c1a3be8b36bb10e693288db2a135c"},{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"b065b17ce3fae128cff38e56d0d22aaf68d0dd75","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    return sources, mocks, specs, html_files"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def output(file_list, list_name):"},{"line_number":86,"context_line":"    \"\"\"Prints result to console for debug"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":"    print (\"\\nDiscovered {0} {1}:\\n\".format(len(file_list), list_name))"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_0b3eac27","line":85,"in_reply_to":"3afb71cf_ebb80513","updated":"2015-06-10 18:53:14.000000000","message":"This is a great idea, thanks Kirill for the suggestion. I will change the change in next patch.","commit_id":"e96df288f30c1a3be8b36bb10e693288db2a135c"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"c7fe3c3cc0bcf65d2cacc4b3aaf7e645488890f1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"def output(file_list, list_name):"},{"line_number":86,"context_line":"    \"\"\"Prints result to console for debug"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":"    print (\"\\nDiscovered {0} {1}:\\n\".format(len(file_list), list_name))"},{"line_number":89,"context_line":"    for file_name in file_list:"},{"line_number":90,"context_line":"        print (file_name)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_98bc30bc","line":88,"updated":"2015-06-10 18:25:56.000000000","message":"print not always available in all version\n\nadd this to import:\n\nfrom __future__ import print_function","commit_id":"e96df288f30c1a3be8b36bb10e693288db2a135c"},{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"b065b17ce3fae128cff38e56d0d22aaf68d0dd75","unresolved":false,"context_lines":[{"line_number":85,"context_line":"def output(file_list, list_name):"},{"line_number":86,"context_line":"    \"\"\"Prints result to console for debug"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":"    print (\"\\nDiscovered {0} {1}:\\n\".format(len(file_list), list_name))"},{"line_number":89,"context_line":"    for file_name in file_list:"},{"line_number":90,"context_line":"        print (file_name)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3afb71cf_0b534c6c","line":88,"in_reply_to":"3afb71cf_98bc30bc","updated":"2015-06-10 18:53:14.000000000","message":"Thanks Lin for letting me know this, I learned. :) I am going to make this a DEBUG level log as Kirill suggested above, which I think is a great idea.","commit_id":"e96df288f30c1a3be8b36bb10e693288db2a135c"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"4c64d196f15cab6aa0f50a77e079fec772e4bdf3","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    return sources, mocks, specs, html_files"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"def log(file_list, list_name, in_path):"},{"line_number":90,"context_line":"    \"\"\"Logs result at debug level"},{"line_number":91,"context_line":"    \"\"\""},{"line_number":92,"context_line":"    LOG.debug(\"\\nDiscovered {0} {1} in {2}:\\n\""}],"source_content_type":"text/x-python","patch_set":14,"id":"1af86dd1_2c815790","line":89,"updated":"2015-06-11 23:12:25.000000000","message":"I suggest you do not need a separate function for that. This operation should be mandatory.\n\nSay If I use your autodiscover util in dashboard for my OS project — I would have to call it manually.\n\nI would prefer these LOG statements to be incorporated in the discover_files function.","commit_id":"ff30fddd6221af84fe79c0ce6f92f0f226813e03"},{"author":{"_account_id":15168,"name":"Kirill Zaitsev","email":"k.zaitsev@me.com","username":"kzaitsev"},"change_message_id":"14683aa2da02c17422c3e012e7e132a2ac4f4298","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    LOG.debug(\"\\nDiscovered {0} {1} file(s) in {2}:\\n\""},{"line_number":93,"context_line":"              .format(len(file_list), list_name, in_path))"},{"line_number":94,"context_line":"    for file_name in file_list:"},{"line_number":95,"context_line":"        LOG.debug(file_name)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa32b979_d03efeb7","line":95,"updated":"2015-06-13 21:29:03.000000000","message":"This would probably result in a lot of really similar lines in the log. Although since they\u0027re debug, this is ok, I guess.","commit_id":"ae5e8ac2e89c3c8aa6071ee655c9c70f9a593507"},{"author":{"_account_id":13805,"name":"Shaoquan Chen","email":"sean.chen2@hp.com","username":"SeanChen"},"change_message_id":"4c9e9b0f36a9fae1a8398eaca1ff2f7c0853db61","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    LOG.debug(\"\\nDiscovered {0} {1} file(s) in {2}:\\n\""},{"line_number":93,"context_line":"              .format(len(file_list), list_name, in_path))"},{"line_number":94,"context_line":"    for file_name in file_list:"},{"line_number":95,"context_line":"        LOG.debug(file_name)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa32b979_9d992971","line":95,"in_reply_to":"fa32b979_d03efeb7","updated":"2015-06-16 07:01:58.000000000","message":"Yes, I saw the same issue. changed.Thanks.","commit_id":"ae5e8ac2e89c3c8aa6071ee655c9c70f9a593507"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"af6b0f2dd0647d61ea5e0cec62467e401db3caa1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    mocks, specs and HTML templates, all grouped in lists."},{"line_number":73,"context_line":"    \"\"\""},{"line_number":74,"context_line":"    js_files \u003d discover_files(base_path, sub_path\u003dsub_path,"},{"line_number":75,"context_line":"                              ext\u003d\u0027.js\u0027, trim_base_path\u003dTrue)"},{"line_number":76,"context_line":"    sources, mocks, specs \u003d sort_js_files(js_files)"},{"line_number":77,"context_line":"    html_files \u003d discover_files(base_path, sub_path\u003dsub_path,"},{"line_number":78,"context_line":"                                ext\u003d\u0027.html\u0027, trim_base_path\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa32b979_d3ed44f0","line":75,"updated":"2015-06-16 17:00:24.000000000","message":"should \".js\" and \".html\" be a constant? this way, we can pass these in when we make this a django command.","commit_id":"018b39b84af5a9bc8459daf67c7f28212c31f473"}]}
