)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"d9f52d6f33ac5c4a6c94060ec15b6d880183a1a3","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve detection of base path"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On Ubuntu sys.prefix is set to \u0027/usr\u0027 even though pip will install"},{"line_number":10,"context_line":"packages to \u0027/usr/local\u0027 when not using a virtualenv. This change fixes"},{"line_number":11,"context_line":"the detection in this instance. Non standard install locations are not"},{"line_number":12,"context_line":"currently supported."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I214e11e7d099d1b39041fdc6b91002e1929d9c00"},{"line_number":15,"context_line":"Story: 2005510"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7faddb67_0543b7b0","line":12,"range":{"start_line":9,"start_character":0,"end_line":12,"end_character":20},"updated":"2019-07-16 15:28:07.000000000","message":"Why would they do this?","commit_id":"d464d961f90b8219f2c6c18de92fedaf11ec95d4"}],"doc/source/configuration/kayobe.rst":[{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"853d74f24c5073ba1d03ce0f8a8622dd4b1e106e","unresolved":false,"context_lines":[{"line_number":120,"context_line":"Location of data files"},{"line_number":121,"context_line":"----------------------"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"Kayobe needs to know where to find any files not contained within it\u0027s python package;"},{"line_number":124,"context_line":"this includes it\u0027s Ansible playbooks and any other files it needs for runtime operation."},{"line_number":125,"context_line":"These files are known collectively as \u0027data files\u0027."},{"line_number":126,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"bfb3d3c7_33cc7a60","line":123,"range":{"start_line":123,"start_character":66,"end_line":123,"end_character":70},"updated":"2019-05-21 14:16:50.000000000","message":"its","commit_id":"60a0bff4e4003f56d50540c9da6899637394dca0"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"853d74f24c5073ba1d03ce0f8a8622dd4b1e106e","unresolved":false,"context_lines":[{"line_number":121,"context_line":"----------------------"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"Kayobe needs to know where to find any files not contained within it\u0027s python package;"},{"line_number":124,"context_line":"this includes it\u0027s Ansible playbooks and any other files it needs for runtime operation."},{"line_number":125,"context_line":"These files are known collectively as \u0027data files\u0027."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"Kayobe will attempt to detect the location of it\u0027s data files automatically. However, if"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bfb3d3c7_f3d582e6","line":124,"range":{"start_line":124,"start_character":14,"end_line":124,"end_character":18},"updated":"2019-05-21 14:16:50.000000000","message":"its","commit_id":"60a0bff4e4003f56d50540c9da6899637394dca0"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"853d74f24c5073ba1d03ce0f8a8622dd4b1e106e","unresolved":false,"context_lines":[{"line_number":124,"context_line":"this includes it\u0027s Ansible playbooks and any other files it needs for runtime operation."},{"line_number":125,"context_line":"These files are known collectively as \u0027data files\u0027."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"Kayobe will attempt to detect the location of it\u0027s data files automatically. However, if"},{"line_number":128,"context_line":"you have installed kayobe to a non-standard location this auto-detection may fail."},{"line_number":129,"context_line":"It is possible to manually override the path using the environmental variable:"},{"line_number":130,"context_line":"``KAYOBE_DATA_FILES_PATH``. This should be set to a path with the following structure::"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bfb3d3c7_7303d274","line":127,"range":{"start_line":127,"start_character":46,"end_line":127,"end_character":50},"updated":"2019-05-21 14:16:50.000000000","message":"its","commit_id":"60a0bff4e4003f56d50540c9da6899637394dca0"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"853d74f24c5073ba1d03ce0f8a8622dd4b1e106e","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"Kayobe will attempt to detect the location of it\u0027s data files automatically. However, if"},{"line_number":128,"context_line":"you have installed kayobe to a non-standard location this auto-detection may fail."},{"line_number":129,"context_line":"It is possible to manually override the path using the environmental variable:"},{"line_number":130,"context_line":"``KAYOBE_DATA_FILES_PATH``. This should be set to a path with the following structure::"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    requirements.yml"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bfb3d3c7_13fa9674","line":129,"range":{"start_line":129,"start_character":55,"end_line":129,"end_character":68},"updated":"2019-05-21 14:16:50.000000000","message":"environment","commit_id":"60a0bff4e4003f56d50540c9da6899637394dca0"}],"kayobe/tests/unit/test_utils.py":[{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"853d74f24c5073ba1d03ce0f8a8622dd4b1e106e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":"import os"},{"line_number":15,"context_line":"import subprocess"},{"line_number":16,"context_line":"import unittest"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bfb3d3c7_b32e2af8","line":14,"updated":"2019-05-21 14:16:50.000000000","message":"IMHO it looks nicer if you keep the empty line.","commit_id":"60a0bff4e4003f56d50540c9da6899637394dca0"}],"kayobe/utils.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"d9f52d6f33ac5c4a6c94060ec15b6d880183a1a3","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        return os.path.join(_get_base_path(prefix), *relative_path)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    # Assume uninstalled"},{"line_number":51,"context_line":"    return os.path.join(os.path.realpath(__file__), \"..\")"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"def _detect_install_prefix(path):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_e5453bb5","line":51,"updated":"2019-07-16 15:28:07.000000000","message":"Doesn\u0027t include relative_path. Does it make sense to factor out a function to find the base path, then call it here and join with relative_path once?","commit_id":"d464d961f90b8219f2c6c18de92fedaf11ec95d4"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"d9f52d6f33ac5c4a6c94060ec15b6d880183a1a3","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    if \u0027lib\u0027 not in components:"},{"line_number":60,"context_line":"        return None"},{"line_number":61,"context_line":"    prefix \u003d itertools.takewhile("},{"line_number":62,"context_line":"        lambda x: not x \u003d\u003d \"lib\","},{"line_number":63,"context_line":"        components"},{"line_number":64,"context_line":"    )"},{"line_number":65,"context_line":"    prefix_path \u003d os.sep.join(prefix)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_85b487d2","line":62,"range":{"start_line":62,"start_character":18,"end_line":62,"end_character":32},"updated":"2019-07-16 15:28:07.000000000","message":"x !\u003d \"lib\"","commit_id":"d464d961f90b8219f2c6c18de92fedaf11ec95d4"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"da94e4cecb38fb839b49e81f7b2b7d600a90654c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"def _detect_install_prefix(path):"},{"line_number":38,"context_line":"    script_path \u003d os.path.realpath(path)"},{"line_number":39,"context_line":"    script_path \u003d os.path.normpath(script_path)"},{"line_number":40,"context_line":"    components \u003d script_path.split(os.sep)"},{"line_number":41,"context_line":"    # use heuristic: anything before \u0027lib\u0027 in path is the prefix"},{"line_number":42,"context_line":"    if \u0027lib\u0027 not in components:"},{"line_number":43,"context_line":"        return None"},{"line_number":44,"context_line":"    prefix \u003d itertools.takewhile("},{"line_number":45,"context_line":"        lambda x: x !\u003d \"lib\","},{"line_number":46,"context_line":"        components"},{"line_number":47,"context_line":"    )"},{"line_number":48,"context_line":"    prefix_path \u003d os.sep.join(prefix)"},{"line_number":49,"context_line":"    return prefix_path"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _get_base_path():"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_df0ec73b","line":49,"range":{"start_line":40,"start_character":4,"end_line":49,"end_character":22},"updated":"2019-12-10 14:43:03.000000000","message":"Can\u0027t you just do this with split directly rather than wheeling out itertools? Something like:\n\n```\nsplit_path \u003d script_path.split(\u0027/lib\u0027)\nreturn split_path[0] if len(split_path) \u003e 1 else None\n```","commit_id":"bf760189f290dc1533c9c6fd5a7965a41e5e811e"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"4d52f722be4aa9b8a05ad06741ec14d08577fdaa","unresolved":false,"context_lines":[{"line_number":37,"context_line":"def _detect_install_prefix(path):"},{"line_number":38,"context_line":"    script_path \u003d os.path.realpath(path)"},{"line_number":39,"context_line":"    script_path \u003d os.path.normpath(script_path)"},{"line_number":40,"context_line":"    components \u003d script_path.split(os.sep)"},{"line_number":41,"context_line":"    # use heuristic: anything before \u0027lib\u0027 in path is the prefix"},{"line_number":42,"context_line":"    if \u0027lib\u0027 not in components:"},{"line_number":43,"context_line":"        return None"},{"line_number":44,"context_line":"    prefix \u003d itertools.takewhile("},{"line_number":45,"context_line":"        lambda x: x !\u003d \"lib\","},{"line_number":46,"context_line":"        components"},{"line_number":47,"context_line":"    )"},{"line_number":48,"context_line":"    prefix_path \u003d os.sep.join(prefix)"},{"line_number":49,"context_line":"    return prefix_path"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _get_base_path():"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_6e027940","line":49,"range":{"start_line":40,"start_character":4,"end_line":49,"end_character":22},"in_reply_to":"3fa7e38b_6e6b591e","updated":"2019-12-11 10:07:50.000000000","message":"It seems unnecessarily complex, but just a nitpick","commit_id":"bf760189f290dc1533c9c6fd5a7965a41e5e811e"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"7f8ec60ceb101ca3080877036791471fd4498bca","unresolved":false,"context_lines":[{"line_number":37,"context_line":"def _detect_install_prefix(path):"},{"line_number":38,"context_line":"    script_path \u003d os.path.realpath(path)"},{"line_number":39,"context_line":"    script_path \u003d os.path.normpath(script_path)"},{"line_number":40,"context_line":"    components \u003d script_path.split(os.sep)"},{"line_number":41,"context_line":"    # use heuristic: anything before \u0027lib\u0027 in path is the prefix"},{"line_number":42,"context_line":"    if \u0027lib\u0027 not in components:"},{"line_number":43,"context_line":"        return None"},{"line_number":44,"context_line":"    prefix \u003d itertools.takewhile("},{"line_number":45,"context_line":"        lambda x: x !\u003d \"lib\","},{"line_number":46,"context_line":"        components"},{"line_number":47,"context_line":"    )"},{"line_number":48,"context_line":"    prefix_path \u003d os.sep.join(prefix)"},{"line_number":49,"context_line":"    return prefix_path"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _get_base_path():"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_aeedd124","line":49,"range":{"start_line":40,"start_character":4,"end_line":49,"end_character":22},"in_reply_to":"3fa7e38b_9645949d","updated":"2019-12-11 09:50:54.000000000","message":"You could split on `os.sep + \u0027lib\u0027 + os.sep` if you\u0027re worried about \u0027library\u0027 in the path? Seems very unlikely that the path would end in \u0027lib\u0027, but we could add another unit test if you think it is.","commit_id":"bf760189f290dc1533c9c6fd5a7965a41e5e811e"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"b399a93ca68656359a6e7d69d4c113d9c6712ed3","unresolved":false,"context_lines":[{"line_number":37,"context_line":"def _detect_install_prefix(path):"},{"line_number":38,"context_line":"    script_path \u003d os.path.realpath(path)"},{"line_number":39,"context_line":"    script_path \u003d os.path.normpath(script_path)"},{"line_number":40,"context_line":"    components \u003d script_path.split(os.sep)"},{"line_number":41,"context_line":"    # use heuristic: anything before \u0027lib\u0027 in path is the prefix"},{"line_number":42,"context_line":"    if \u0027lib\u0027 not in components:"},{"line_number":43,"context_line":"        return None"},{"line_number":44,"context_line":"    prefix \u003d itertools.takewhile("},{"line_number":45,"context_line":"        lambda x: x !\u003d \"lib\","},{"line_number":46,"context_line":"        components"},{"line_number":47,"context_line":"    )"},{"line_number":48,"context_line":"    prefix_path \u003d os.sep.join(prefix)"},{"line_number":49,"context_line":"    return prefix_path"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _get_base_path():"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_6e6b591e","line":49,"range":{"start_line":40,"start_character":4,"end_line":49,"end_character":22},"in_reply_to":"3fa7e38b_9645949d","updated":"2019-12-11 10:03:38.000000000","message":"why not just leave it as it is? itertools is in the std lib...","commit_id":"bf760189f290dc1533c9c6fd5a7965a41e5e811e"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"51f20d51abcde74e60920a61b7d1425d58497425","unresolved":false,"context_lines":[{"line_number":37,"context_line":"def _detect_install_prefix(path):"},{"line_number":38,"context_line":"    script_path \u003d os.path.realpath(path)"},{"line_number":39,"context_line":"    script_path \u003d os.path.normpath(script_path)"},{"line_number":40,"context_line":"    components \u003d script_path.split(os.sep)"},{"line_number":41,"context_line":"    # use heuristic: anything before \u0027lib\u0027 in path is the prefix"},{"line_number":42,"context_line":"    if \u0027lib\u0027 not in components:"},{"line_number":43,"context_line":"        return None"},{"line_number":44,"context_line":"    prefix \u003d itertools.takewhile("},{"line_number":45,"context_line":"        lambda x: x !\u003d \"lib\","},{"line_number":46,"context_line":"        components"},{"line_number":47,"context_line":"    )"},{"line_number":48,"context_line":"    prefix_path \u003d os.sep.join(prefix)"},{"line_number":49,"context_line":"    return prefix_path"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _get_base_path():"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_9645949d","line":49,"range":{"start_line":40,"start_character":4,"end_line":49,"end_character":22},"in_reply_to":"3fa7e38b_df0ec73b","updated":"2019-12-10 17:50:54.000000000","message":"Here is a possible corner case with that:\n\n`/opt/library/lib`","commit_id":"bf760189f290dc1533c9c6fd5a7965a41e5e811e"}],"releasenotes/notes/fix-data-files-path-detection-on-ubuntu-dfa8e4e7a1d3ea27.yaml":[{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"853d74f24c5073ba1d03ce0f8a8622dd4b1e106e","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    for details."},{"line_number":7,"context_line":"features:"},{"line_number":8,"context_line":"  - |"},{"line_number":9,"context_line":"    Added the ``KAYOBE_DATA_FILES_PATH`` environmental variable to override the"},{"line_number":10,"context_line":"    auto-detection of the data files path. See the documentation for more details. "}],"source_content_type":"text/x-yaml","patch_set":3,"id":"bfb3d3c7_d3215efd","line":9,"range":{"start_line":9,"start_character":41,"end_line":9,"end_character":54},"updated":"2019-05-21 14:16:50.000000000","message":"environment","commit_id":"60a0bff4e4003f56d50540c9da6899637394dca0"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"853d74f24c5073ba1d03ce0f8a8622dd4b1e106e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"features:"},{"line_number":8,"context_line":"  - |"},{"line_number":9,"context_line":"    Added the ``KAYOBE_DATA_FILES_PATH`` environmental variable to override the"},{"line_number":10,"context_line":"    auto-detection of the data files path. See the documentation for more details. "}],"source_content_type":"text/x-yaml","patch_set":3,"id":"bfb3d3c7_b37ceaeb","line":10,"range":{"start_line":10,"start_character":47,"end_line":10,"end_character":64},"updated":"2019-05-21 14:16:50.000000000","message":"Link to the doc section?","commit_id":"60a0bff4e4003f56d50540c9da6899637394dca0"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"853d74f24c5073ba1d03ce0f8a8622dd4b1e106e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"features:"},{"line_number":8,"context_line":"  - |"},{"line_number":9,"context_line":"    Added the ``KAYOBE_DATA_FILES_PATH`` environmental variable to override the"},{"line_number":10,"context_line":"    auto-detection of the data files path. See the documentation for more details. "}],"source_content_type":"text/x-yaml","patch_set":3,"id":"bfb3d3c7_33231a08","line":10,"range":{"start_line":10,"start_character":82,"end_line":10,"end_character":83},"updated":"2019-05-21 14:16:50.000000000","message":"Remove trailing space.","commit_id":"60a0bff4e4003f56d50540c9da6899637394dca0"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"105e0aa9cb0e7b2ac1226ac7ee84cd3e197e39c5","unresolved":false,"context_lines":[{"line_number":7,"context_line":"features:"},{"line_number":8,"context_line":"  - |"},{"line_number":9,"context_line":"    Added the ``KAYOBE_DATA_FILES_PATH`` environment variable to override the"},{"line_number":10,"context_line":"    auto-detection of the data files path. See the `documentation \u003chttps://kayobe.readthedocs.io/en/latest/configuration/kayobe.html#location-of-data-files\u003e`__ for more details."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3fa7e38b_98fef702","line":10,"range":{"start_line":10,"start_character":67,"end_line":10,"end_character":155},"updated":"2019-11-25 13:58:16.000000000","message":"URL needs updating.","commit_id":"7fedc694a87500d56a39b831fb19813a5ba9a938"}]}
