)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Additional tasks to be completed:"},{"line_number":15,"context_line":"  - edge case testing and resulting debug of current functionality"},{"line_number":16,"context_line":"  - addition of utilities which update the openstack-manuals"},{"line_number":17,"context_line":"    sitemap index"},{"line_number":18,"context_line":"  - addition of functionality which rsyncs the new sitemap up to"},{"line_number":19,"context_line":"    the webserver and removes any files which are not listed in"},{"line_number":20,"context_line":"    the updated sitemap."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"df87a7cf_c41eba6f","line":17,"updated":"2017-12-02 20:31:49.000000000","message":"That work should happen in the openstack-manuals repo. We can use a template that uses the project data available in the build there already.","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    sitemap index"},{"line_number":18,"context_line":"  - addition of functionality which rsyncs the new sitemap up to"},{"line_number":19,"context_line":"    the webserver and removes any files which are not listed in"},{"line_number":20,"context_line":"    the updated sitemap."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"These action items are a result of ongoing discussion surrounding"},{"line_number":23,"context_line":"the automation of the sitemap generation process, and may, as a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"df87a7cf_042b4294","line":20,"updated":"2017-12-02 20:31:49.000000000","message":"If the sitemap is placed in the same build output directory as the HTML files it will be copied up along with the contents of that directory, with no other changes needed.","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"940d66d7a58830070821328f9ad8fcc5e2ba344b","unresolved":false,"context_lines":[{"line_number":17,"context_line":"    sitemap index"},{"line_number":18,"context_line":"  - addition of functionality which rsyncs the new sitemap up to"},{"line_number":19,"context_line":"    the webserver and removes any files which are not listed in"},{"line_number":20,"context_line":"    the updated sitemap."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"These action items are a result of ongoing discussion surrounding"},{"line_number":23,"context_line":"the automation of the sitemap generation process, and may, as a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"df87a7cf_ce1334b8","line":20,"in_reply_to":"df87a7cf_042b4294","updated":"2017-12-03 07:02:48.000000000","message":"I was wondering that, actually. The only reason I mentioned it was because it was brought up during the original conversation re: where to place this patch.","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"}],"playbooks/sphinx-docs/run.yaml":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":21,"context_line":"        name: sitemap-generation"},{"line_number":22,"context_line":"      vars:"},{"line_number":23,"context_line":"        webserver: https://docs.openstack.org"},{"line_number":24,"context_line":"        project_root: /opt/stack/nova"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"df87a7cf_44214ab4","line":24,"updated":"2017-12-02 20:31:49.000000000","message":"Should project_root be hard-coded like this?","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"940d66d7a58830070821328f9ad8fcc5e2ba344b","unresolved":false,"context_lines":[{"line_number":21,"context_line":"        name: sitemap-generation"},{"line_number":22,"context_line":"      vars:"},{"line_number":23,"context_line":"        webserver: https://docs.openstack.org"},{"line_number":24,"context_line":"        project_root: /opt/stack/nova"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"df87a7cf_2e4500b4","line":24,"in_reply_to":"df87a7cf_44214ab4","updated":"2017-12-03 07:02:48.000000000","message":"nope, that was a test value that slipped past my test variable cleanup sweep. (was testing against nova because it has lots of documentation and is therefore good for testing whether runtime was reasonable)","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"}],"roles/sitemap-generation/README.rst":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6382a8908c82178fa0a45ed67f39bf8c79a1b027","unresolved":false,"context_lines":[{"line_number":8,"context_line":".. zuul:rolevar::release_tag"},{"line_number":9,"context_line":"   :default: {{ zuul.jobtags }}"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":".. zuul:rolevar:: docs_url"},{"line_number":12,"context_line":"   :default: \"docs.openstack.org\""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9f91af0f_271c3969","line":11,"updated":"2018-01-02 14:23:25.000000000","message":"Maybe docs_hostname, since it\u0027s not a full URL? I don\u0027t know if there are naming conventions in other roles that need to be followed, so that\u0027s something to ask the infra team about.","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"61d9a100612cc5fb40531269ed7437c3e373764b","unresolved":false,"context_lines":[{"line_number":8,"context_line":".. zuul:rolevar::release_tag"},{"line_number":9,"context_line":"   :default: {{ zuul.jobtags }}"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":".. zuul:rolevar:: docs_url"},{"line_number":12,"context_line":"   :default: \"docs.openstack.org\""}],"source_content_type":"text/x-rst","patch_set":6,"id":"9f91af0f_8235e6dc","line":11,"in_reply_to":"9f91af0f_271c3969","updated":"2018-01-03 06:22:18.000000000","message":"Done","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3170561bf902f74c0ba7726471080471e413d3ca","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Sitemap Generation"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"This role is intended update a project\u0027s sitemaps any time new documentation is built and created."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":".. zuul:rolevar:: src_project_root"},{"line_number":6,"context_line":"   :default: {{ zuul.project.src_dir }}"}],"source_content_type":"text/x-rst","patch_set":9,"id":"7f96bb07_79a2cb4d","line":3,"range":{"start_line":3,"start_character":13,"end_line":3,"end_character":28},"updated":"2018-01-12 16:13:41.000000000","message":"intended to update","commit_id":"2bff5ef4f562692e17708b1dbade6c96e3e3ff0a"},{"author":{"_account_id":6547,"name":"Andreas Jaeger","email":"jaegerandi@gmail.com","username":"jaegerandi"},"change_message_id":"c81ea7f90bc240e02a026a1e3c0b2fb8394f6b5f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Sitemap Generation"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"This role is intended update a project\u0027s sitemaps any time new documentation is built and created."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":".. zuul:rolevar::src_project_root"},{"line_number":6,"context_line":"   :default: {{ zuul.project.src_dir }}"}],"source_content_type":"text/x-rst","patch_set":19,"id":"7f96bb07_dc72947b","line":3,"range":{"start_line":3,"start_character":21,"end_line":3,"end_character":26},"updated":"2018-01-16 17:05:53.000000000","message":"intented *to*","commit_id":"d52fea73060e07b44cc1229200f173bfd3f87fd3"},{"author":{"_account_id":6547,"name":"Andreas Jaeger","email":"jaegerandi@gmail.com","username":"jaegerandi"},"change_message_id":"c81ea7f90bc240e02a026a1e3c0b2fb8394f6b5f","unresolved":false,"context_lines":[{"line_number":11,"context_line":".. zuul:rolevar::docs_hostname"},{"line_number":12,"context_line":"   :default: \"docs.openstack.org\""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":".. zuul:rolevar::docs_base_dir"},{"line_number":15,"context_line":"   :default: \"doc/build/html\""}],"source_content_type":"text/x-rst","patch_set":19,"id":"7f96bb07_bca468a7","line":14,"updated":"2018-01-16 17:05:53.000000000","message":"the sphinx role (in zuul-jobs) uses sphinx_build_dir instead. Should we use the same var or use a different one?","commit_id":"d52fea73060e07b44cc1229200f173bfd3f87fd3"},{"author":{"_account_id":6547,"name":"Andreas Jaeger","email":"jaegerandi@gmail.com","username":"jaegerandi"},"change_message_id":"2bacc00ef76e6db6cb689d00e9364cb493beecc6","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Sitemap Generation"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"This role is intended update a project\u0027s sitemaps any time new documentation is built and created."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":".. zuul:rolevar::src_project_root"},{"line_number":6,"context_line":"   :default: {{ zuul.project.src_dir }}"}],"source_content_type":"text/x-rst","patch_set":33,"id":"3fa0c359_4a6cc435","line":3,"updated":"2018-02-17 18:55:27.000000000","message":"this is an overlong line, let\u0027s wrap it around.","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"aa12dcafe722d59bfb971c6f281689d48b238386","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Sitemap Generation"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"This role is intended update a project\u0027s sitemaps any time new documentation is built and created."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":".. zuul:rolevar::src_project_root"},{"line_number":6,"context_line":"   :default: {{ zuul.project.src_dir }}"}],"source_content_type":"text/x-rst","patch_set":33,"id":"3fa0c359_954acf24","line":3,"in_reply_to":"3fa0c359_4a6cc435","updated":"2018-02-19 20:56:30.000000000","message":"Done","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"},{"author":{"_account_id":6547,"name":"Andreas Jaeger","email":"jaegerandi@gmail.com","username":"jaegerandi"},"change_message_id":"2bacc00ef76e6db6cb689d00e9364cb493beecc6","unresolved":false,"context_lines":[{"line_number":9,"context_line":"   :default: {{ zuul.jobtags }}"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":".. zuul:rolevar::docs_hostname"},{"line_number":12,"context_line":"   :default: \"docs.openstack.org\""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":".. zuul:rolevar::docs_base_dir"},{"line_number":15,"context_line":"   :default: \"doc/build/html\""}],"source_content_type":"text/x-rst","patch_set":33,"id":"3fa0c359_6a674053","line":12,"updated":"2018-02-17 18:55:27.000000000","message":"default is \"https://...\"","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"aa12dcafe722d59bfb971c6f281689d48b238386","unresolved":false,"context_lines":[{"line_number":9,"context_line":"   :default: {{ zuul.jobtags }}"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":".. zuul:rolevar::docs_hostname"},{"line_number":12,"context_line":"   :default: \"docs.openstack.org\""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":".. zuul:rolevar::docs_base_dir"},{"line_number":15,"context_line":"   :default: \"doc/build/html\""}],"source_content_type":"text/x-rst","patch_set":33,"id":"3fa0c359_555447ca","line":12,"in_reply_to":"3fa0c359_6a674053","updated":"2018-02-19 20:56:30.000000000","message":"Done","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"}],"roles/sitemap-generation/defaults/main.yaml":[{"author":{"_account_id":6547,"name":"Andreas Jaeger","email":"jaegerandi@gmail.com","username":"jaegerandi"},"change_message_id":"c81ea7f90bc240e02a026a1e3c0b2fb8394f6b5f","unresolved":false,"context_lines":[{"line_number":3,"context_line":"src_project_root: \"{{ zuul.project.src_dir }}\""},{"line_number":4,"context_line":"release_tag: \"{{ zuul.jobtags }}\""},{"line_number":5,"context_line":"docs_hostname: \"docs.openstack.org\""},{"line_number":6,"context_line":"docs_base_dir: \"doc/build/html\" "}],"source_content_type":"text/x-yaml","patch_set":19,"id":"7f96bb07_3cba98c0","line":6,"range":{"start_line":6,"start_character":31,"end_line":6,"end_character":32},"updated":"2018-01-16 17:05:53.000000000","message":"nit: extra whitespace at EOL","commit_id":"d52fea73060e07b44cc1229200f173bfd3f87fd3"},{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"0194f5ae5810327a59bf14434dd4fda0526402d9","unresolved":false,"context_lines":[{"line_number":3,"context_line":"src_project_root: \"{{ zuul.project.src_dir }}\""},{"line_number":4,"context_line":"release_tag: \"{{ zuul.jobtags }}\""},{"line_number":5,"context_line":"docs_hostname: \"docs.openstack.org\""},{"line_number":6,"context_line":"docs_base_dir: \"doc/build/html\" "}],"source_content_type":"text/x-yaml","patch_set":20,"id":"5f93b717_09bf15aa","line":6,"range":{"start_line":6,"start_character":31,"end_line":6,"end_character":32},"updated":"2018-02-01 23:17:54.000000000","message":"nit","commit_id":"4c7ce503cc78d7e9c146a477a73ab3b2d00babbd"}],"roles/sitemap-generation/files/sitemap_gen.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":18,"context_line":"def get_lastmod(root, path, link):"},{"line_number":19,"context_line":"    # get the path of the file in question"},{"line_number":20,"context_line":"    file_suffix \u003d path.split(\u0027.\u0027)[-1]"},{"line_number":21,"context_line":"    file_src_path \u003d path.replace(\u0027build\u0027, \u0027source\u0027).replace(file_suffix, \u0027rst\u0027)"},{"line_number":22,"context_line":"    if not os.path.isfile(file_src_path):"},{"line_number":23,"context_line":"        file_src_path \u003d path"},{"line_number":24,"context_line":"    # get the time at which the file was last modified"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_987d7670","line":21,"updated":"2017-12-02 20:31:49.000000000","message":"As written now a path like /build/html/my-html-build-instructions.html will end up looking for /source/html/my-rst-source-instructions.rst which is not likely to exist (or might be something else entirely).\n\nIt would be safer to use os.path.splitext(), replace \u0027/build/html/\u0027 with \u0027/source/\u0027 and then append the new extension. Or better yet, to tell the script to scan \u0027doc/build/html\u0027 and then remove that prefix from the filenames so the \u0027doc/source\u0027 prefix can just be added.","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"46e055f7e0d92921b3cb62760bda71cc8e4d4707","unresolved":false,"context_lines":[{"line_number":18,"context_line":"def get_lastmod(root, path, link):"},{"line_number":19,"context_line":"    # get the path of the file in question"},{"line_number":20,"context_line":"    file_suffix \u003d path.split(\u0027.\u0027)[-1]"},{"line_number":21,"context_line":"    file_src_path \u003d path.replace(\u0027build\u0027, \u0027source\u0027).replace(file_suffix, \u0027rst\u0027)"},{"line_number":22,"context_line":"    if not os.path.isfile(file_src_path):"},{"line_number":23,"context_line":"        file_src_path \u003d path"},{"line_number":24,"context_line":"    # get the time at which the file was last modified"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_37e6a346","line":21,"in_reply_to":"df87a7cf_987d7670","updated":"2017-12-29 06:53:15.000000000","message":"ended up overhauling the entirety of how the last modified time of a given file is found, so this didn\u0027t end up getting addressed, but it ended up being replaced by more functional methodology regardless, so this shouldn\u0027t end up being an issue","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    if not os.path.isfile(file_src_path):"},{"line_number":23,"context_line":"        file_src_path \u003d path"},{"line_number":24,"context_line":"    # get the time at which the file was last modified"},{"line_number":25,"context_line":"    stat \u003d os.stat(file_src_path)"},{"line_number":26,"context_line":"    lastmod_timestamp \u003d stat.st_mtime"},{"line_number":27,"context_line":"    lastmod \u003d datetime.fromtimestamp(lastmod_timestamp)"},{"line_number":28,"context_line":"    lastmod \u003d lastmod.strftime(\"%Y-%m-%dT%H:%M:%S\u003d0000\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_7894328c","line":25,"updated":"2017-12-02 20:31:49.000000000","message":"Will this time reflect when the file was checked out from the git repo or the last time a commit modified the source file?","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"46e055f7e0d92921b3cb62760bda71cc8e4d4707","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    if not os.path.isfile(file_src_path):"},{"line_number":23,"context_line":"        file_src_path \u003d path"},{"line_number":24,"context_line":"    # get the time at which the file was last modified"},{"line_number":25,"context_line":"    stat \u003d os.stat(file_src_path)"},{"line_number":26,"context_line":"    lastmod_timestamp \u003d stat.st_mtime"},{"line_number":27,"context_line":"    lastmod \u003d datetime.fromtimestamp(lastmod_timestamp)"},{"line_number":28,"context_line":"    lastmod \u003d lastmod.strftime(\"%Y-%m-%dT%H:%M:%S\u003d0000\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_97c20f85","line":25,"in_reply_to":"df87a7cf_7894328c","updated":"2017-12-29 06:53:15.000000000","message":"because the build file is not tracked by git, ended up finding the corresponding source file, and then using git log to find the date of the last commit that touched that file. Unfortunately, gitpython is awful at performing actions in another git repo, I ended up shelling out because I wasn\u0027t aware of a better solution to this problem, but if there\u0027s a known solution that is more optimal, I\u0027d be glad to use it.","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    return lastmod"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def get_url_data(root, path, link):"},{"line_number":33,"context_line":"    supported \u003d [\u0027/newton/\u0027, \u0027/ocata/\u0027, \u0027/pike/\u0027, \u0027/latest/\u0027]"},{"line_number":34,"context_line":"    unsupported \u003d [\u0027/trunk/\u0027, \u0027/draft/\u0027, \u0027/austin/\u0027, \u0027/bexar/\u0027,"},{"line_number":35,"context_line":"                   \u0027/cactus/\u0027, \u0027/diablo/\u0027, \u0027/essex/\u0027, \u0027/folsom/\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_7838b2d2","line":32,"updated":"2017-12-02 20:31:49.000000000","message":"Having this hard-coded here for now is OK, but long term we don\u0027t want to have yet another place where we store the \"status\" of a given release series. We already maintain this information in the openstack-manuals repo and to some degree in the releases repo, so it would be good for us to figure out a way to centralize all of that in one location and reuse the data. We can address that later once we have the first version of the tool working.","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"46e055f7e0d92921b3cb62760bda71cc8e4d4707","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    return lastmod"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def get_url_data(root, path, link):"},{"line_number":33,"context_line":"    supported \u003d [\u0027/newton/\u0027, \u0027/ocata/\u0027, \u0027/pike/\u0027, \u0027/latest/\u0027]"},{"line_number":34,"context_line":"    unsupported \u003d [\u0027/trunk/\u0027, \u0027/draft/\u0027, \u0027/austin/\u0027, \u0027/bexar/\u0027,"},{"line_number":35,"context_line":"                   \u0027/cactus/\u0027, \u0027/diablo/\u0027, \u0027/essex/\u0027, \u0027/folsom/\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_d2f745f5","line":32,"in_reply_to":"df87a7cf_7838b2d2","updated":"2017-12-29 06:53:15.000000000","message":"I tried to think of a way to do this without needing live access, but nothing came to mind","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    # get the \"last modified date\" for the file"},{"line_number":39,"context_line":"    lastmod \u003d get_lastmod(root, path, link)"},{"line_number":40,"context_line":"    # now find the data we need to determin priority and chgfreq"},{"line_number":41,"context_line":"    response \u003d requests.get(link)"},{"line_number":42,"context_line":"    if response.status_code \u003d\u003d 200:"},{"line_number":43,"context_line":"        if response.url !\u003d link:"},{"line_number":44,"context_line":"            link \u003d response.url"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_58404e36","line":41,"updated":"2017-12-02 20:31:49.000000000","message":"We should not need to do any live web access for this job. The sitemap being built will only contain files that are about to be copied to the web server as a later step in the job. They all exist and will all return 200 when accessed after the sync. They may not exist on the web server at the time the job runs, though, because pages can be added to the docs.","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"a1aca8377ef5392cddf4c702aecb4c819fdb2582","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    # get the \"last modified date\" for the file"},{"line_number":39,"context_line":"    lastmod \u003d get_lastmod(root, path, link)"},{"line_number":40,"context_line":"    # now find the data we need to determin priority and chgfreq"},{"line_number":41,"context_line":"    response \u003d requests.get(link)"},{"line_number":42,"context_line":"    if response.status_code \u003d\u003d 200:"},{"line_number":43,"context_line":"        if response.url !\u003d link:"},{"line_number":44,"context_line":"            link \u003d response.url"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_b710d201","line":41,"in_reply_to":"df87a7cf_58404e36","updated":"2017-12-20 20:20:56.000000000","message":"Done","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    if response.status_code \u003d\u003d 200:"},{"line_number":43,"context_line":"        if response.url !\u003d link:"},{"line_number":44,"context_line":"            link \u003d response.url"},{"line_number":45,"context_line":"        release \u003d link.split(\u0027/\u0027)[4]"},{"line_number":46,"context_line":"        if release in supported:"},{"line_number":47,"context_line":"            priority \u003d \u00271.0\u0027"},{"line_number":48,"context_line":"            changefreq \u003d \u0027weekly\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_783d12ba","line":45,"updated":"2017-12-02 20:31:49.000000000","message":"The release series can be determined by examining the branch on which the job is running. That\u0027s something we\u0027ll need to pass through from zuul to this script, so the script doesn\u0027t need to figure it out for itself.","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"a1aca8377ef5392cddf4c702aecb4c819fdb2582","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    if response.status_code \u003d\u003d 200:"},{"line_number":43,"context_line":"        if response.url !\u003d link:"},{"line_number":44,"context_line":"            link \u003d response.url"},{"line_number":45,"context_line":"        release \u003d link.split(\u0027/\u0027)[4]"},{"line_number":46,"context_line":"        if release in supported:"},{"line_number":47,"context_line":"            priority \u003d \u00271.0\u0027"},{"line_number":48,"context_line":"            changefreq \u003d \u0027weekly\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_b10a701d","line":45,"in_reply_to":"df87a7cf_783d12ba","updated":"2017-12-20 20:20:56.000000000","message":"Done","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        release \u003d link.split(\u0027/\u0027)[4]"},{"line_number":46,"context_line":"        if release in supported:"},{"line_number":47,"context_line":"            priority \u003d \u00271.0\u0027"},{"line_number":48,"context_line":"            changefreq \u003d \u0027weekly\u0027"},{"line_number":49,"context_line":"        elif release in unsupported:"},{"line_number":50,"context_line":"            priority \u003d \u00270.5\u0027"},{"line_number":51,"context_line":"            changefreq \u003d \u0027daily\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_1863a6de","line":48,"updated":"2017-12-02 20:31:49.000000000","message":"The use of weekly and daily for update frequency feels backwards in this section. Content being actively maintained feels more likely to be updated more often, doesn\u0027t it?","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"a1aca8377ef5392cddf4c702aecb4c819fdb2582","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        release \u003d link.split(\u0027/\u0027)[4]"},{"line_number":46,"context_line":"        if release in supported:"},{"line_number":47,"context_line":"            priority \u003d \u00271.0\u0027"},{"line_number":48,"context_line":"            changefreq \u003d \u0027weekly\u0027"},{"line_number":49,"context_line":"        elif release in unsupported:"},{"line_number":50,"context_line":"            priority \u003d \u00270.5\u0027"},{"line_number":51,"context_line":"            changefreq \u003d \u0027daily\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_a9e1c12c","line":48,"in_reply_to":"df87a7cf_1863a6de","updated":"2017-12-20 20:20:56.000000000","message":"Done","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":68,"context_line":"         \"xmlns\u003d\\\"http://www.sitemaps.org/schemas/sitemap/0.9\\\"\""},{"line_number":69,"context_line":"         \"xsi:schemaLocation\u003d\\\"http://www.sitemaps.org/schemas/sitemap/0.9 \""},{"line_number":70,"context_line":"         \"http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\\\"\u003e\")"},{"line_number":71,"context_line":"    with open(sitemap_file, \u0027w+\u0027) as sitemap:"},{"line_number":72,"context_line":"        sitemap.write(urlset)"},{"line_number":73,"context_line":"        for path, link in zip(doc_paths, doc_links):"},{"line_number":74,"context_line":"            link, lastmod, priority, changefreq \u003d get_url_data("}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_d8753e9a","line":71,"updated":"2017-12-02 20:31:49.000000000","message":"I think we just want the mode to be \u0027w\u0027 and we probably need to be setting the encoding for the output to be safe.","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"a1aca8377ef5392cddf4c702aecb4c819fdb2582","unresolved":false,"context_lines":[{"line_number":68,"context_line":"         \"xmlns\u003d\\\"http://www.sitemaps.org/schemas/sitemap/0.9\\\"\""},{"line_number":69,"context_line":"         \"xsi:schemaLocation\u003d\\\"http://www.sitemaps.org/schemas/sitemap/0.9 \""},{"line_number":70,"context_line":"         \"http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\\\"\u003e\")"},{"line_number":71,"context_line":"    with open(sitemap_file, \u0027w+\u0027) as sitemap:"},{"line_number":72,"context_line":"        sitemap.write(urlset)"},{"line_number":73,"context_line":"        for path, link in zip(doc_paths, doc_links):"},{"line_number":74,"context_line":"            link, lastmod, priority, changefreq \u003d get_url_data("}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_49d2755e","line":71,"in_reply_to":"df87a7cf_d8753e9a","updated":"2017-12-20 20:20:56.000000000","message":"Done","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                }"},{"line_number":83,"context_line":"            }"},{"line_number":84,"context_line":"            entry_list.append(entry_json)"},{"line_number":85,"context_line":"        entry_dict \u003d json.loads(json.dumps(entry_list))"},{"line_number":86,"context_line":"        sitemap_xml \u003d dict2xml(entry_dict, indent\u003d\"  \")"},{"line_number":87,"context_line":"        sitemap.write(sitemap_xml)"},{"line_number":88,"context_line":"        sitemap.write(\"\u003c/urlset\u003e\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_8418b281","line":85,"updated":"2017-12-02 20:31:49.000000000","message":"This appears to be turning the data into a JSON string then parsing it again. Why is that necessary?","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"a1aca8377ef5392cddf4c702aecb4c819fdb2582","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                }"},{"line_number":83,"context_line":"            }"},{"line_number":84,"context_line":"            entry_list.append(entry_json)"},{"line_number":85,"context_line":"        entry_dict \u003d json.loads(json.dumps(entry_list))"},{"line_number":86,"context_line":"        sitemap_xml \u003d dict2xml(entry_dict, indent\u003d\"  \")"},{"line_number":87,"context_line":"        sitemap.write(sitemap_xml)"},{"line_number":88,"context_line":"        sitemap.write(\"\u003c/urlset\u003e\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_13fbe578","line":85,"in_reply_to":"df87a7cf_8418b281","updated":"2017-12-20 20:20:56.000000000","message":"Done","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    site_links \u003d []"},{"line_number":93,"context_line":"    doc_paths \u003d []"},{"line_number":94,"context_line":"    # get html files"},{"line_number":95,"context_line":"    docs_dir \u003d os.path.join(git_root, \u0027doc\u0027)"},{"line_number":96,"context_line":"    for root, dirs, files in os.walk(docs_dir):"},{"line_number":97,"context_line":"        for file in files:"},{"line_number":98,"context_line":"            if file.endswith((\u0027.html\u0027, \u0027.pdf\u0027, \u0027.xml\u0027, \u0027.txt\u0027)):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_240d263e","line":95,"updated":"2017-12-02 20:31:49.000000000","message":"I think we probably only want to scan doc/build/html and not doc/source.","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"a1aca8377ef5392cddf4c702aecb4c819fdb2582","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    site_links \u003d []"},{"line_number":93,"context_line":"    doc_paths \u003d []"},{"line_number":94,"context_line":"    # get html files"},{"line_number":95,"context_line":"    docs_dir \u003d os.path.join(git_root, \u0027doc\u0027)"},{"line_number":96,"context_line":"    for root, dirs, files in os.walk(docs_dir):"},{"line_number":97,"context_line":"        for file in files:"},{"line_number":98,"context_line":"            if file.endswith((\u0027.html\u0027, \u0027.pdf\u0027, \u0027.xml\u0027, \u0027.txt\u0027)):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_33cf0957","line":95,"in_reply_to":"df87a7cf_240d263e","updated":"2017-12-20 20:20:56.000000000","message":"Done","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                page_url \u003d \u0027/\u0027.join([base_url, file])"},{"line_number":100,"context_line":"                site_links.append(page_url)"},{"line_number":101,"context_line":"                doc_paths.append(root + \u0027/\u0027 + file)"},{"line_number":102,"context_line":"    return site_links, doc_paths"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_d8fe9e04","line":102,"updated":"2017-12-02 20:31:49.000000000","message":"Since the main user of the data zips it together to iterate over it in one loop, perhaps this function should return a single list of tuples instead of 2 separate lists.","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"a1aca8377ef5392cddf4c702aecb4c819fdb2582","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                page_url \u003d \u0027/\u0027.join([base_url, file])"},{"line_number":100,"context_line":"                site_links.append(page_url)"},{"line_number":101,"context_line":"                doc_paths.append(root + \u0027/\u0027 + file)"},{"line_number":102,"context_line":"    return site_links, doc_paths"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_13cd2565","line":102,"in_reply_to":"df87a7cf_d8fe9e04","updated":"2017-12-20 20:20:56.000000000","message":"Done","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6382a8908c82178fa0a45ed67f39bf8c79a1b027","unresolved":false,"context_lines":[{"line_number":12,"context_line":"import subprocess"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"def find_src_file(root, path):"},{"line_number":16,"context_line":"    src_base \u003d path.split(\u0027/\u0027)[-1].split(\u0027.\u0027)[0]"},{"line_number":17,"context_line":"    docs_dir \u003d os.path.join(root, \u0027doc/source\u0027)"},{"line_number":18,"context_line":"    for root, dirs, files in os.walk(docs_dir):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_47b5bd30","line":15,"updated":"2018-01-02 14:23:25.000000000","message":"This now assumes that files are named uniquely even if they appear in different directories. That won\u0027t be the case for any of the index.rst files that turn into index.html.\n\nIf the purpose of this function is to convert the path to a built file back to its source name, it should be possible to do that without scanning the filesystem just by applying transformations to the input path name.\n\nSee below for a suggestion on how to do that based on the initial file scan.","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6382a8908c82178fa0a45ed67f39bf8c79a1b027","unresolved":false,"context_lines":[{"line_number":28,"context_line":"                       \u0027--pretty\u003dformat:%ct\u0027, \u0027--\u0027, str(src_path)]"},{"line_number":29,"context_line":"        git_log_output \u003d subprocess.Popen("},{"line_number":30,"context_line":"            git_log_cmd, cwd\u003droot, stdout\u003dsubprocess.PIPE)"},{"line_number":31,"context_line":"        lastmod_timestamp \u003d git_log_output.communicate()[0]"},{"line_number":32,"context_line":"        if lastmod_timestamp:"},{"line_number":33,"context_line":"            lastmod \u003d datetime.fromtimestamp(int(lastmod_timestamp))"},{"line_number":34,"context_line":"            lastmod \u003d lastmod.strftime(\"%Y-%m-%dT%H:%M:%S\u003d0000\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_2791999a","line":31,"updated":"2018-01-02 14:23:25.000000000","message":"Under python 3 we will need to decode the output to convert from encoded bytes to a unicode string. It\u0027s safe to do that under python 2 as well, so you could add \".decode(\u0027utf-8\u0027)\" to the end of line 31 to be future-proof.","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"61d9a100612cc5fb40531269ed7437c3e373764b","unresolved":false,"context_lines":[{"line_number":28,"context_line":"                       \u0027--pretty\u003dformat:%ct\u0027, \u0027--\u0027, str(src_path)]"},{"line_number":29,"context_line":"        git_log_output \u003d subprocess.Popen("},{"line_number":30,"context_line":"            git_log_cmd, cwd\u003droot, stdout\u003dsubprocess.PIPE)"},{"line_number":31,"context_line":"        lastmod_timestamp \u003d git_log_output.communicate()[0]"},{"line_number":32,"context_line":"        if lastmod_timestamp:"},{"line_number":33,"context_line":"            lastmod \u003d datetime.fromtimestamp(int(lastmod_timestamp))"},{"line_number":34,"context_line":"            lastmod \u003d lastmod.strftime(\"%Y-%m-%dT%H:%M:%S\u003d0000\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_4276fea6","line":31,"in_reply_to":"9f91af0f_2791999a","updated":"2018-01-03 06:22:18.000000000","message":"Done","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6382a8908c82178fa0a45ed67f39bf8c79a1b027","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            return lastmod"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def get_file_data(root, release, release_eol, path):"},{"line_number":39,"context_line":"    lastmod \u003d get_lastmod(root, path)"},{"line_number":40,"context_line":"    if not release:"},{"line_number":41,"context_line":"        # unversioned documentation"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_073c9591","line":38,"updated":"2018-01-02 14:23:25.000000000","message":"It seems like the priority and changefreq values aren\u0027t really tied to the file (they apply to all files based on release and release_eol, right?). Would it make sense to move those to a separate function that is called once from create_sitemap() to get those values?","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"61d9a100612cc5fb40531269ed7437c3e373764b","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            return lastmod"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def get_file_data(root, release, release_eol, path):"},{"line_number":39,"context_line":"    lastmod \u003d get_lastmod(root, path)"},{"line_number":40,"context_line":"    if not release:"},{"line_number":41,"context_line":"        # unversioned documentation"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_22f89ae3","line":38,"in_reply_to":"9f91af0f_073c9591","updated":"2018-01-03 06:22:18.000000000","message":"I\u0027m actually not quite sure that the way I\u0027m going about this is quite comprehensive enought. The commit that triggers this process does not necessarily touch all of the files in the sitemap, so to update all of their sitemap entries is, I think, perhaps incorrect. I may have it touch only the entries pertaining to files that have been updated, rather than having it write over all of them and generate them anew.","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4ccd07f7430eb1f68892f44f26a6925f43042843","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            return lastmod"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def get_file_data(root, release, release_eol, path):"},{"line_number":39,"context_line":"    lastmod \u003d get_lastmod(root, path)"},{"line_number":40,"context_line":"    if not release:"},{"line_number":41,"context_line":"        # unversioned documentation"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_bb3dacbc","line":38,"in_reply_to":"9f91af0f_22f89ae3","updated":"2018-01-03 13:39:19.000000000","message":"Because of the way we publish content, it will be simpler to regenerate the entire sitemap rather than trying to update the file in place. It seems like more work for the program to do, but it makes it easier to reason about what the program is doing and it\u0027s just robot time not human time so it doesn\u0027t matter if it takes a few seconds longer.","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6a63f96a24a5acf75f4943de4501255deb1be4ac","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            return lastmod"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def get_file_data(root, release, release_eol, path):"},{"line_number":39,"context_line":"    lastmod \u003d get_lastmod(root, path)"},{"line_number":40,"context_line":"    if not release:"},{"line_number":41,"context_line":"        # unversioned documentation"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_5246ab7e","line":38,"in_reply_to":"9f91af0f_23464d51","updated":"2018-01-04 14:18:05.000000000","message":"Keep in mind that we\u0027re not rebuilding the entire sitemap for docs.o.o every time. We are only building a sub-sitemap for the content being published out of the current repo, which will end up in a docs.o.o/$project/$series directory when it is published. We can make a lot of simplifying assumptions because of that reduction in scope.","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"abbcfd1953193f81efcbf3e52b6807f2c057f4aa","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            return lastmod"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def get_file_data(root, release, release_eol, path):"},{"line_number":39,"context_line":"    lastmod \u003d get_lastmod(root, path)"},{"line_number":40,"context_line":"    if not release:"},{"line_number":41,"context_line":"        # unversioned documentation"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_23464d51","line":38,"in_reply_to":"9f91af0f_bb3dacbc","updated":"2018-01-03 21:36:56.000000000","message":"That is true, but my thought here is that not all of the files are being modified, so we probably shouldn\u0027t be applying the release tag pertaining to this particular branch to all of them. Thus we end up needing to do the in-place modification after all, or so it seems to me","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6382a8908c82178fa0a45ed67f39bf8c79a1b027","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        # unversioned documentation"},{"line_number":42,"context_line":"        priority \u003d 1.0"},{"line_number":43,"context_line":"        changefreq \u003d \u0027weekly\u0027"},{"line_number":44,"context_line":"    if release_eol:"},{"line_number":45,"context_line":"        # documentation tied to an EOL release"},{"line_number":46,"context_line":"        priority \u003d \u00270.5\u0027,"},{"line_number":47,"context_line":"        changefreq \u003d \u0027weekly\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_07d7b54d","line":44,"updated":"2018-01-02 14:23:25.000000000","message":"Should this be elif? Can we have an empty release version and a valid release_eol value?","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"61d9a100612cc5fb40531269ed7437c3e373764b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        # unversioned documentation"},{"line_number":42,"context_line":"        priority \u003d 1.0"},{"line_number":43,"context_line":"        changefreq \u003d \u0027weekly\u0027"},{"line_number":44,"context_line":"    if release_eol:"},{"line_number":45,"context_line":"        # documentation tied to an EOL release"},{"line_number":46,"context_line":"        priority \u003d \u00270.5\u0027,"},{"line_number":47,"context_line":"        changefreq \u003d \u0027weekly\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_e2d95283","line":44,"in_reply_to":"9f91af0f_07d7b54d","updated":"2018-01-03 06:22:18.000000000","message":"Done","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6382a8908c82178fa0a45ed67f39bf8c79a1b027","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def create_sitemap(root, release, release_eol, project_name, doc_locations):"},{"line_number":56,"context_line":"    entry_list \u003d []"},{"line_number":57,"context_line":"    sitemap_file \u003d \u0027\u0027.join([root, \u0027/\u0027, project_name, \u0027_sitemap.xml\u0027])"},{"line_number":58,"context_line":"    urlset \u003d \\"},{"line_number":59,"context_line":"        (\"\u003curlset xmlns:xsi\u003d\\\"http://www.w3.org/2001/XMLSchema-instance\\\" \""},{"line_number":60,"context_line":"         \"xmlns\u003d\\\"http://www.sitemaps.org/schemas/sitemap/0.9\\\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_47bcdd04","line":57,"updated":"2018-01-02 14:23:25.000000000","message":"Is there any reason to keep the project_name in the filename? The publish location will make the final filename unique on the web server, right?","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"61d9a100612cc5fb40531269ed7437c3e373764b","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def create_sitemap(root, release, release_eol, project_name, doc_locations):"},{"line_number":56,"context_line":"    entry_list \u003d []"},{"line_number":57,"context_line":"    sitemap_file \u003d \u0027\u0027.join([root, \u0027/\u0027, project_name, \u0027_sitemap.xml\u0027])"},{"line_number":58,"context_line":"    urlset \u003d \\"},{"line_number":59,"context_line":"        (\"\u003curlset xmlns:xsi\u003d\\\"http://www.w3.org/2001/XMLSchema-instance\\\" \""},{"line_number":60,"context_line":"         \"xmlns\u003d\\\"http://www.sitemaps.org/schemas/sitemap/0.9\\\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_82e64644","line":57,"in_reply_to":"9f91af0f_47bcdd04","updated":"2018-01-03 06:22:18.000000000","message":"Done","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6382a8908c82178fa0a45ed67f39bf8c79a1b027","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            entry_list.append(entry_tuple)"},{"line_number":78,"context_line":"            entry_dict \u003d dict(entry_list)"},{"line_number":79,"context_line":"            sitemap_xml \u003d dict2xml(entry_dict, indent\u003d\"  \")"},{"line_number":80,"context_line":"            sitemap.write(sitemap_xml + \"\\n\")"},{"line_number":81,"context_line":"        sitemap.write(\"\u003c/urlset\u003e\".encode(\u0027utf-8\u0027))"},{"line_number":82,"context_line":"        return sitemap_file"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_c75eade5","line":80,"updated":"2018-01-02 14:23:25.000000000","message":"It seems like the loop handling is a little off here. Each file is going to be added to entry_list and then the list is turned into a dictionary and written to the sitemap file. But the list is never reset to empty, so each time through the loop the list grows and all of the data is written to the file again.\n\nI think you can skip building the list and just write one dict to the file at a time by changing line 69 to build a dictionary instead of a tuple and dropping lines 77 and 78.","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"61d9a100612cc5fb40531269ed7437c3e373764b","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            entry_list.append(entry_tuple)"},{"line_number":78,"context_line":"            entry_dict \u003d dict(entry_list)"},{"line_number":79,"context_line":"            sitemap_xml \u003d dict2xml(entry_dict, indent\u003d\"  \")"},{"line_number":80,"context_line":"            sitemap.write(sitemap_xml + \"\\n\")"},{"line_number":81,"context_line":"        sitemap.write(\"\u003c/urlset\u003e\".encode(\u0027utf-8\u0027))"},{"line_number":82,"context_line":"        return sitemap_file"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_02cc76ba","line":80,"in_reply_to":"9f91af0f_c75eade5","updated":"2018-01-03 06:22:18.000000000","message":"Done","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6382a8908c82178fa0a45ed67f39bf8c79a1b027","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        for file in files:"},{"line_number":90,"context_line":"            if file.endswith((\u0027.html\u0027)):"},{"line_number":91,"context_line":"                doc_url \u003d \u0027/\u0027.join([base_url, file])"},{"line_number":92,"context_line":"                doc_path \u003d \u0027/\u0027.join([root, file])"},{"line_number":93,"context_line":"                doc_locations.append((doc_path, doc_url))"},{"line_number":94,"context_line":"    return doc_locations"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_c72c6d49","line":92,"updated":"2018-01-02 14:23:25.000000000","message":"I think you could safely build the source file location right here using similar logic. Something like\n\n  src_path \u003d \u0027/\u0027.join([src_dir, file])\n\nwhere src_dir is set after line 87 as\n\n  src_dir \u003d os.path.join(git_root, \u0027doc/source\u0027)\n\nThat would eliminate the need for find_src_file() entirely.","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4ccd07f7430eb1f68892f44f26a6925f43042843","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        for file in files:"},{"line_number":90,"context_line":"            if file.endswith((\u0027.html\u0027)):"},{"line_number":91,"context_line":"                doc_url \u003d \u0027/\u0027.join([base_url, file])"},{"line_number":92,"context_line":"                doc_path \u003d \u0027/\u0027.join([root, file])"},{"line_number":93,"context_line":"                doc_locations.append((doc_path, doc_url))"},{"line_number":94,"context_line":"    return doc_locations"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_9bdc6875","line":92,"in_reply_to":"9f91af0f_7c07271e","updated":"2018-01-03 13:39:19.000000000","message":"I\u0027m not sure what you mean by \"sub-sourcefolders\". \n\nAs far as files not existing, remember that the tool is running in a copy of a source tree checked out from git. All of the HTML files that are built will come from one of 3 places: a .rst file checked into git, a .rst file generated as part of the build, some other sort of template for which there is no source file.\n\nThe timestamp for rst files checked into git should come from git. The timestamp for generated files should come from the source file\u0027s modification time on disk. The timestamp for files for which there is no source file should probably be datetime.datetime.now().","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"abbcfd1953193f81efcbf3e52b6807f2c057f4aa","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        for file in files:"},{"line_number":90,"context_line":"            if file.endswith((\u0027.html\u0027)):"},{"line_number":91,"context_line":"                doc_url \u003d \u0027/\u0027.join([base_url, file])"},{"line_number":92,"context_line":"                doc_path \u003d \u0027/\u0027.join([root, file])"},{"line_number":93,"context_line":"                doc_locations.append((doc_path, doc_url))"},{"line_number":94,"context_line":"    return doc_locations"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_c39be1c6","line":92,"in_reply_to":"9f91af0f_9bdc6875","updated":"2018-01-03 21:36:56.000000000","message":"Can do. I actually ended up coming across this myself while handling another issue shortly after sending these comments, and straightened it out along the way. Thank you for your feedback.","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"61d9a100612cc5fb40531269ed7437c3e373764b","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        for file in files:"},{"line_number":90,"context_line":"            if file.endswith((\u0027.html\u0027)):"},{"line_number":91,"context_line":"                doc_url \u003d \u0027/\u0027.join([base_url, file])"},{"line_number":92,"context_line":"                doc_path \u003d \u0027/\u0027.join([root, file])"},{"line_number":93,"context_line":"                doc_locations.append((doc_path, doc_url))"},{"line_number":94,"context_line":"    return doc_locations"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_7c07271e","line":92,"in_reply_to":"9f91af0f_c72c6d49","updated":"2018-01-03 06:22:18.000000000","message":"This would work quite well, except that many projects divide their docs into many sub-sourcefolders, which would lead us to look for the date of the last commit that touched a file at a location which doesn\u0027t exist, which is problematic for obvious reasons. I had considered the above while I was overhauling this script, but discarded it as a solution when it failed to yield any none \"None\"  lastmod dates.","commit_id":"c1791c46510ec16e2012ad03c90c3d7c8d75e99e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"e65a24a252522f2f85f015f36e689810a88e21aa","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                       \u0027--pretty\u003dformat:%ct\u0027, \u0027--\u0027, str(path)]"},{"line_number":35,"context_line":"        git_log_output \u003d subprocess.Popen("},{"line_number":36,"context_line":"            git_log_cmd, cwd\u003droot, stdout\u003dsubprocess.PIPE)"},{"line_number":37,"context_line":"        lastmod_timestamp \u003d git_log_output.communicate()[0].decode(\u0027utf-8\u0027)"},{"line_number":38,"context_line":"        if lastmod_timestamp:"},{"line_number":39,"context_line":"            lastmod \u003d datetime.fromtimestamp(int(lastmod_timestamp))"},{"line_number":40,"context_line":"            lastmod \u003d lastmod.strftime(\"%Y-%m-%dT%H:%M:%S\u003d0000\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f91af0f_d938853e","line":37,"updated":"2018-01-05 16:23:59.000000000","message":"If you use subprocess.check_output() here you can catch the exception thrown when the command returns an error and handle the case for files not in git. Alternatively you can check the return code yourself but that\u0027s why the wrapper function exists.","commit_id":"4c9d8b070578546d743a6448ebb88a8eca884d3b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"e65a24a252522f2f85f015f36e689810a88e21aa","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        root \u003d tree.getroot()"},{"line_number":127,"context_line":"    os.remove(sitemap_path)"},{"line_number":128,"context_line":"    with open(sitemap_path, \"w+\") as sitemap:"},{"line_number":129,"context_line":"        for modified in mod_files:"},{"line_number":130,"context_line":"            # get data pertaining to this file"},{"line_number":131,"context_line":"            lastmod \u003d get_lastmod(project_root, modified)"},{"line_number":132,"context_line":"            priority, changefreq \u003d get_release_details(release_data[0],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f91af0f_f979c9fb","line":129,"updated":"2018-01-05 16:23:59.000000000","message":"Is this now going to build the sitemap to contain only files modified in a given commit?","commit_id":"4c9d8b070578546d743a6448ebb88a8eca884d3b"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a7b641b7263a0ddf75f29a361041449d2ccd052d","unresolved":false,"context_lines":[{"line_number":22,"context_line":"        if lastmod_timestamp:"},{"line_number":23,"context_line":"            lastmod \u003d datetime.fromtimestamp(int(lastmod_timestamp))"},{"line_number":24,"context_line":"            lastmod \u003d lastmod.strftime(\"%Y-%m-%dT%H:%M:%S\u003d0000\")"},{"line_number":25,"context_line":"            return lastmod"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def get_release_data(tags):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f91af0f_df734015","line":25,"updated":"2018-01-09 16:29:22.000000000","message":"This is a good start for handling files that do appear in git. Not all of them will, though, because we generate some from the source code. In those cases, returning the file modification time seems like a reasonable alternative.","commit_id":"c585453ca11499901bf66532237f2ffa23694216"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"55aff31869c7c452c0a7346ed639a3b1f89db133","unresolved":false,"context_lines":[{"line_number":22,"context_line":"        if lastmod_timestamp:"},{"line_number":23,"context_line":"            lastmod \u003d datetime.fromtimestamp(int(lastmod_timestamp))"},{"line_number":24,"context_line":"            lastmod \u003d lastmod.strftime(\"%Y-%m-%dT%H:%M:%S\u003d0000\")"},{"line_number":25,"context_line":"            return lastmod"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def get_release_data(tags):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_904f7abc","line":25,"in_reply_to":"9f91af0f_df734015","updated":"2018-02-15 23:29:50.000000000","message":"Done","commit_id":"c585453ca11499901bf66532237f2ffa23694216"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a7b641b7263a0ddf75f29a361041449d2ccd052d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    return (priority, changefreq, release_name)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"def get_modified_files(project_name, root):"},{"line_number":55,"context_line":"    if os.path.isdir(root):"},{"line_number":56,"context_line":"        # git show --name-only"},{"line_number":57,"context_line":"        git_show_cmd \u003d [\u0027git\u0027, \u0027-C\u0027, root, \u0027show\u0027, \u0027--name-only\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f91af0f_dfa9007c","line":54,"updated":"2018-01-09 16:29:22.000000000","message":"This function is no longer being used.","commit_id":"c585453ca11499901bf66532237f2ffa23694216"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"55aff31869c7c452c0a7346ed639a3b1f89db133","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    return (priority, changefreq, release_name)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"def get_modified_files(project_name, root):"},{"line_number":55,"context_line":"    if os.path.isdir(root):"},{"line_number":56,"context_line":"        # git show --name-only"},{"line_number":57,"context_line":"        git_show_cmd \u003d [\u0027git\u0027, \u0027-C\u0027, root, \u0027show\u0027, \u0027--name-only\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_10d12ace","line":54,"in_reply_to":"9f91af0f_dfa9007c","updated":"2018-02-15 23:29:50.000000000","message":"Done","commit_id":"c585453ca11499901bf66532237f2ffa23694216"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a7b641b7263a0ddf75f29a361041449d2ccd052d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    return url"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def prettify(elem, level\u003d0):"},{"line_number":82,"context_line":"    i \u003d \"\\n\" + level * \"  \""},{"line_number":83,"context_line":"    j \u003d \"\\n\" + (level - 1) * \"  \""},{"line_number":84,"context_line":"    if len(elem):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f91af0f_9fde180f","line":81,"updated":"2018-01-09 16:29:22.000000000","message":"What is this doing? What is elem, an XML node?","commit_id":"c585453ca11499901bf66532237f2ffa23694216"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a7b641b7263a0ddf75f29a361041449d2ccd052d","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        \"xsi:schemaLocation\": schema_loc"},{"line_number":116,"context_line":"    }"},{"line_number":117,"context_line":"    root \u003d xml.Element(\"urlset\", attrib\u003dns)"},{"line_number":118,"context_line":"    os.remove(sitemap_path)"},{"line_number":119,"context_line":"    with open(sitemap_path, \"w+\") as sitemap:"},{"line_number":120,"context_line":"        for doc_src in doc_files:"},{"line_number":121,"context_line":"            # get data pertaining to this file"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f91af0f_bf0c3ca5","line":118,"updated":"2018-01-09 16:29:22.000000000","message":"The cleanup here and on lines 103-105 seem to be doing redundant work. I don\u0027t think any of these steps are necessary if the file is opened with mode \"w\" instead of \"w+\".","commit_id":"c585453ca11499901bf66532237f2ffa23694216"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"55aff31869c7c452c0a7346ed639a3b1f89db133","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        \"xsi:schemaLocation\": schema_loc"},{"line_number":116,"context_line":"    }"},{"line_number":117,"context_line":"    root \u003d xml.Element(\"urlset\", attrib\u003dns)"},{"line_number":118,"context_line":"    os.remove(sitemap_path)"},{"line_number":119,"context_line":"    with open(sitemap_path, \"w+\") as sitemap:"},{"line_number":120,"context_line":"        for doc_src in doc_files:"},{"line_number":121,"context_line":"            # get data pertaining to this file"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_b0fab63f","line":118,"in_reply_to":"9f91af0f_bf0c3ca5","updated":"2018-02-15 23:29:50.000000000","message":"Done","commit_id":"c585453ca11499901bf66532237f2ffa23694216"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a7b641b7263a0ddf75f29a361041449d2ccd052d","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    source_files \u003d []"},{"line_number":139,"context_line":"    for root, dirs, files in os.walk(source_dir):"},{"line_number":140,"context_line":"        for file in files:"},{"line_number":141,"context_line":"            if file.endswith((\u0027.rst\u0027, \u0027.pdf\u0027, \u0027.txt\u0027)) \\"},{"line_number":142,"context_line":"                    and \"doc/source\" in root:"},{"line_number":143,"context_line":"                doc_path \u003d \u0027/\u0027.join([root, file])"},{"line_number":144,"context_line":"                source_files.append(doc_path)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f91af0f_df56e02a","line":141,"updated":"2018-01-09 16:29:22.000000000","message":"There won\u0027t be pdf files in the source tree (I hope). And if there are .txt files they may not correspond to .html files in the output.\n\nI\u0027m curious about why this function scans doc/source instead of doc/build/html?","commit_id":"c585453ca11499901bf66532237f2ffa23694216"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"55aff31869c7c452c0a7346ed639a3b1f89db133","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    source_files \u003d []"},{"line_number":139,"context_line":"    for root, dirs, files in os.walk(source_dir):"},{"line_number":140,"context_line":"        for file in files:"},{"line_number":141,"context_line":"            if file.endswith((\u0027.rst\u0027, \u0027.pdf\u0027, \u0027.txt\u0027)) \\"},{"line_number":142,"context_line":"                    and \"doc/source\" in root:"},{"line_number":143,"context_line":"                doc_path \u003d \u0027/\u0027.join([root, file])"},{"line_number":144,"context_line":"                source_files.append(doc_path)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_93da2415","line":141,"in_reply_to":"9f91af0f_df56e02a","updated":"2018-02-15 23:29:50.000000000","message":"Done","commit_id":"c585453ca11499901bf66532237f2ffa23694216"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a7b641b7263a0ddf75f29a361041449d2ccd052d","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    for root, dirs, files in os.walk(source_dir):"},{"line_number":140,"context_line":"        for file in files:"},{"line_number":141,"context_line":"            if file.endswith((\u0027.rst\u0027, \u0027.pdf\u0027, \u0027.txt\u0027)) \\"},{"line_number":142,"context_line":"                    and \"doc/source\" in root:"},{"line_number":143,"context_line":"                doc_path \u003d \u0027/\u0027.join([root, file])"},{"line_number":144,"context_line":"                source_files.append(doc_path)"},{"line_number":145,"context_line":"    return source_files"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f91af0f_bf699cf9","line":142,"updated":"2018-01-09 16:29:22.000000000","message":"If the scan starts from a source_dir that always ends in doc/source is there ever a time when \u0027doc/source\u0027 will not appear in the root variable\u0027s value?","commit_id":"c585453ca11499901bf66532237f2ffa23694216"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"55aff31869c7c452c0a7346ed639a3b1f89db133","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    for root, dirs, files in os.walk(source_dir):"},{"line_number":140,"context_line":"        for file in files:"},{"line_number":141,"context_line":"            if file.endswith((\u0027.rst\u0027, \u0027.pdf\u0027, \u0027.txt\u0027)) \\"},{"line_number":142,"context_line":"                    and \"doc/source\" in root:"},{"line_number":143,"context_line":"                doc_path \u003d \u0027/\u0027.join([root, file])"},{"line_number":144,"context_line":"                source_files.append(doc_path)"},{"line_number":145,"context_line":"    return source_files"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_b3d720ee","line":142,"in_reply_to":"9f91af0f_bf699cf9","updated":"2018-02-15 23:29:50.000000000","message":"Done","commit_id":"c585453ca11499901bf66532237f2ffa23694216"},{"author":{"_account_id":6547,"name":"Andreas Jaeger","email":"jaegerandi@gmail.com","username":"jaegerandi"},"change_message_id":"2bacc00ef76e6db6cb689d00e9364cb493beecc6","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                \u0027mitaka\u0027, \u0027liberty\u0027, \u0027kilo\u0027, \u0027juno\u0027,"},{"line_number":51,"context_line":"                \u0027icehouse\u0027, \u0027havana\u0027, \u0027grizzly\u0027, \u0027folsom\u0027,"},{"line_number":52,"context_line":"                \u0027essex\u0027, \u0027diablo\u0027, \u0027cactus\u0027, \u0027bexar\u0027,"},{"line_number":53,"context_line":"                \u0027austin\u0027, \u0027draft\u0027, \u0027trunk\u0027]"},{"line_number":54,"context_line":"    release_tag \u003d next(iter([release for release in releases"},{"line_number":55,"context_line":"                             if release in tags]), None)"},{"line_number":56,"context_line":"    if not release_tag:"}],"source_content_type":"text/x-python","patch_set":33,"id":"3fa0c359_ca78d4f9","line":53,"range":{"start_line":53,"start_character":27,"end_line":53,"end_character":32},"updated":"2018-02-17 18:55:27.000000000","message":"we should not have draft anymore - and thus should not handle it.","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"aa12dcafe722d59bfb971c6f281689d48b238386","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                \u0027mitaka\u0027, \u0027liberty\u0027, \u0027kilo\u0027, \u0027juno\u0027,"},{"line_number":51,"context_line":"                \u0027icehouse\u0027, \u0027havana\u0027, \u0027grizzly\u0027, \u0027folsom\u0027,"},{"line_number":52,"context_line":"                \u0027essex\u0027, \u0027diablo\u0027, \u0027cactus\u0027, \u0027bexar\u0027,"},{"line_number":53,"context_line":"                \u0027austin\u0027, \u0027draft\u0027, \u0027trunk\u0027]"},{"line_number":54,"context_line":"    release_tag \u003d next(iter([release for release in releases"},{"line_number":55,"context_line":"                             if release in tags]), None)"},{"line_number":56,"context_line":"    if not release_tag:"}],"source_content_type":"text/x-python","patch_set":33,"id":"3fa0c359_1560ffa4","line":53,"range":{"start_line":53,"start_character":27,"end_line":53,"end_character":32},"in_reply_to":"3fa0c359_ca78d4f9","updated":"2018-02-19 20:56:30.000000000","message":"Done","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"},{"author":{"_account_id":6547,"name":"Andreas Jaeger","email":"jaegerandi@gmail.com","username":"jaegerandi"},"change_message_id":"2bacc00ef76e6db6cb689d00e9364cb493beecc6","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def create_sitemap(project_root, release_data, project, doc_files, base_url):"},{"line_number":110,"context_line":"    sitemap_path \u003d \"/\".join([project_root, \"doc/build/html/sitemap.xml\"])"},{"line_number":111,"context_line":"    priority \u003d release_data[0]"},{"line_number":112,"context_line":"    changefreq \u003d release_data[1]"},{"line_number":113,"context_line":"    print(\u0027writing to {}\u0027.format(sitemap_path))"}],"source_content_type":"text/x-python","patch_set":33,"id":"3fa0c359_8a82ccc7","line":110,"range":{"start_line":110,"start_character":44,"end_line":110,"end_character":70},"updated":"2018-02-17 18:55:27.000000000","message":"what happens with releasenotes, api-ref/api-guide and openstack-manuals? None of them use doc/build/html.","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"ab49e57b2d7e204c4edc6431d8ad6046b85c7f20","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def create_sitemap(project_root, release_data, project, doc_files, base_url):"},{"line_number":110,"context_line":"    sitemap_path \u003d \"/\".join([project_root, \"doc/build/html/sitemap.xml\"])"},{"line_number":111,"context_line":"    priority \u003d release_data[0]"},{"line_number":112,"context_line":"    changefreq \u003d release_data[1]"},{"line_number":113,"context_line":"    print(\u0027writing to {}\u0027.format(sitemap_path))"}],"source_content_type":"text/x-python","patch_set":33,"id":"3fa0c359_3863b2b3","line":110,"range":{"start_line":110,"start_character":44,"end_line":110,"end_character":70},"in_reply_to":"3fa0c359_35089bd7","updated":"2018-02-19 21:12:29.000000000","message":"Projects that use reno for release notes will have a separate job to build those notes in releasenotes/build/html. Projects that have an api-ref or api-guide will similarly have separate jobs to build those documents with different output directories.\n\nWe will handle openstack-manuals with a change in that repository.\n\nFor those others, let\u0027s get one step at a time working. We can extend this script to take an input directory as an argument so we can reuse it in the other jobs, but I would like to have some sitemaps in place by the end of the PTG if we can so let\u0027s worry about those cases later.","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"2c7978841624797814dec13672f57bc732708c59","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def create_sitemap(project_root, release_data, project, doc_files, base_url):"},{"line_number":110,"context_line":"    sitemap_path \u003d \"/\".join([project_root, \"doc/build/html/sitemap.xml\"])"},{"line_number":111,"context_line":"    priority \u003d release_data[0]"},{"line_number":112,"context_line":"    changefreq \u003d release_data[1]"},{"line_number":113,"context_line":"    print(\u0027writing to {}\u0027.format(sitemap_path))"}],"source_content_type":"text/x-python","patch_set":33,"id":"3fa0c359_49d6f229","line":110,"range":{"start_line":110,"start_character":44,"end_line":110,"end_character":70},"in_reply_to":"3fa0c359_3863b2b3","updated":"2018-02-19 23:45:34.000000000","message":"Thank you for the feedback, it\u0027s been very helpful. For the time being, I will just focus on the case already implemented and move forward with the other cases later.","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"aa12dcafe722d59bfb971c6f281689d48b238386","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def create_sitemap(project_root, release_data, project, doc_files, base_url):"},{"line_number":110,"context_line":"    sitemap_path \u003d \"/\".join([project_root, \"doc/build/html/sitemap.xml\"])"},{"line_number":111,"context_line":"    priority \u003d release_data[0]"},{"line_number":112,"context_line":"    changefreq \u003d release_data[1]"},{"line_number":113,"context_line":"    print(\u0027writing to {}\u0027.format(sitemap_path))"}],"source_content_type":"text/x-python","patch_set":33,"id":"3fa0c359_35089bd7","line":110,"range":{"start_line":110,"start_character":44,"end_line":110,"end_character":70},"in_reply_to":"3fa0c359_8a82ccc7","updated":"2018-02-19 20:56:30.000000000","message":"I believe (any onlookers please correct me if I\u0027m wrong)  we were planning on having a separate patch for openstack-manuals that indexed all of the other sitemaps as well\n\nAs for the other two, I\u0027ll take a look and find a way to handle those outlying use cases if at all possible, but to clarify- which repos do these codebases lie in? upon a precursory lookup, I wasn\u0027t finding anything by those names. Apologies if I\u0027m being obtuse, I just figured I\u0027d ask to see if I was missing anything.","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"ac830e520ebf719b4b32b93be4b8320b7cc0dad5","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                \u0027mitaka\u0027, \u0027liberty\u0027, \u0027kilo\u0027, \u0027juno\u0027,"},{"line_number":50,"context_line":"                \u0027icehouse\u0027, \u0027havana\u0027, \u0027grizzly\u0027, \u0027folsom\u0027,"},{"line_number":51,"context_line":"                \u0027essex\u0027, \u0027diablo\u0027, \u0027cactus\u0027, \u0027bexar\u0027,"},{"line_number":52,"context_line":"                \u0027austin\u0027, \u0027trunk\u0027]"},{"line_number":53,"context_line":"    release_tag \u003d next(iter([release for release in releases"},{"line_number":54,"context_line":"                             if release in tags]), None)"},{"line_number":55,"context_line":"    if not release_tag:"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f7c97a3_53848d5d","line":52,"updated":"2018-07-12 19:01:13.000000000","message":"What sorts of tags is zuul passing? I expected version numbers, not series names like this. We may need to look in the .gitreview file to find the branch name to determine the series name.","commit_id":"0e03e5b43e6d1f1dece9354a5eacc5283af61968"}],"roles/sitemap-generation/files/sitemap_gen.py.old":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7802f155ddd94440c165cf3c527313671f32d87e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"7f96bb07_a279c42f","updated":"2018-01-15 20:48:51.000000000","message":"We probably don\u0027t want this file checked in.","commit_id":"47f4ca2854cf28c954a7dbfd653585ee3d98b4bf"},{"author":{"_account_id":7822,"name":"Chris Hoge (not involved in upstream development)","email":"chris@hogepodge.com","username":"hogepodge"},"change_message_id":"0194f5ae5810327a59bf14434dd4fda0526402d9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/python"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# should build a sitemap that maps the docs for this project"},{"line_number":4,"context_line":"# only. There will be another script that will generate an"}],"source_content_type":"application/octet-stream","patch_set":20,"id":"5f93b717_49ce7d5a","line":1,"updated":"2018-02-01 23:17:54.000000000","message":"I\u0027m assuming this file will be removed once we\u0027re ready to merge?","commit_id":"4c7ce503cc78d7e9c146a477a73ab3b2d00babbd"}],"roles/sitemap-generation/tasks/main.yml":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"73cf6d03248b3fd9307013657c3b7e2d34e9f5ce","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"# tasks file for sitemap-generation"},{"line_number":3,"context_line":"- name: Generate updated project docs sitemap"},{"line_number":4,"context_line":"  command: ./sitemap_gen.py \"{{ project_root }}\" \"{{ destination_host }}\""},{"line_number":5,"context_line":"  when: "},{"line_number":6,"context_line":"    - project_root is defined"},{"line_number":7,"context_line":"    - destination_host is defined"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"df87a7cf_1891669a","line":4,"updated":"2017-12-02 20:31:49.000000000","message":"Under what conditions will project_root not be same as the workspace for the job?","commit_id":"a27b05ef542540f82430a0e635e480114f16dc91"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"b355001e96ac194c4604500159850699f4a7ea72","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"# tasks file for sitemap-generation"},{"line_number":3,"context_line":"- name: Generate updated project docs sitemap"},{"line_number":4,"context_line":"  script: \"{{role_path}}/sitemap_gen.py\" \"{{ src_project_root }}\" \"{{ docs_hostname }}\" \"{{ release_tag }}\" \"{{ docs_base_dir }}\""}],"source_content_type":"text/x-yaml","patch_set":11,"id":"7f96bb07_9d23cd05","line":4,"updated":"2018-01-15 20:53:27.000000000","message":"After some discussion in #openstack-infra today I\u0027m experimenting with changing this to \"script\" instead of \"command\" to see if it correctly copies the script over before running it.","commit_id":"c3efbf20980727bc109f4246ec0d3c18afa212f1"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a4a240f5a4c43146ce0a9b1897739cc6b8bd46bd","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"# tasks file for sitemap-generation"},{"line_number":3,"context_line":"- name: Generate updated project docs sitemap"},{"line_number":4,"context_line":"  command: ./sitemap_gen.py \"{{ src_project_root }}\" \"{{ docs_hostname }}\" \"{{ release_tag }}\" \"{{ docs_base_dir }}\""}],"source_content_type":"text/x-yaml","patch_set":21,"id":"5f93b717_2b3993f0","line":4,"range":{"start_line":4,"start_character":11,"end_line":4,"end_character":13},"updated":"2018-02-02 17:12:53.000000000","message":"I think you want to remove the \"./\" here. The command plugin should find the script in the search path, which includes the \"files\" subdirectory of the role. Then it copies the file over to the remote server and executes the copy it makes, which won\u0027t be in \".\" in that context.","commit_id":"2e3fee7737f0d7ea9f43587f2f8e128a002b6bc9"}],"zuul.d/jobs.yaml":[{"author":{"_account_id":6547,"name":"Andreas Jaeger","email":"jaegerandi@gmail.com","username":"jaegerandi"},"change_message_id":"2bacc00ef76e6db6cb689d00e9364cb493beecc6","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    pre-run: playbooks/sphinx-docs/neutron-horizon-hack.yaml"},{"line_number":209,"context_line":"    roles:"},{"line_number":210,"context_line":"      - zuul: openstack-infra/zuul-jobs"},{"line_number":211,"context_line":"    post-run: playbooks/sphinx-docs/generate-sitemap.yaml"},{"line_number":212,"context_line":"    vars:"},{"line_number":213,"context_line":"      constraints_file: \u0027{{ ansible_user_dir }}/src/git.openstack.org/openstack/requirements/upper-constraints.txt\u0027"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":33,"id":"3fa0c359_4a27e413","line":211,"updated":"2018-02-17 18:55:27.000000000","message":"wrong job to add to. This is the build job, it does not publish anywhere. The publication job is defined in project-config.\n\nthis is useful only for testing that it works","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"},{"author":{"_account_id":24728,"name":"megan guiney","email":"meganmguiney@gmail.com","username":"mguiney"},"change_message_id":"aa12dcafe722d59bfb971c6f281689d48b238386","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    pre-run: playbooks/sphinx-docs/neutron-horizon-hack.yaml"},{"line_number":209,"context_line":"    roles:"},{"line_number":210,"context_line":"      - zuul: openstack-infra/zuul-jobs"},{"line_number":211,"context_line":"    post-run: playbooks/sphinx-docs/generate-sitemap.yaml"},{"line_number":212,"context_line":"    vars:"},{"line_number":213,"context_line":"      constraints_file: \u0027{{ ansible_user_dir }}/src/git.openstack.org/openstack/requirements/upper-constraints.txt\u0027"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":33,"id":"3fa0c359_15631f1c","line":211,"in_reply_to":"3fa0c359_4a27e413","updated":"2018-02-19 20:56:30.000000000","message":"apologies, I misunderstood how this worked. Will get a new patch pushed immediately","commit_id":"368b2c337ba33eee1febf371a8b27518d8d52189"}]}
