{"action":"created","comment":{"url":"https://api.github.com/repos/diana-hep/pyhf/pulls/comments/212498666","pull_request_review_id":149147593,"id":212498666,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjQ5ODY2Ng==","diff_hunk":"@@ -11,6 +11,7 @@ def import_root_histogram(rootdir, filename, path, name):\n     #import pdb; pdb.set_trace()\n     #assert path == ''\n     # strip leading slashes as uproot doesn't use \"/\" for top-level\n+    if path is None: path = ''","path":"pyhf/readxml.py","position":17,"original_position":4,"commit_id":"6a2883672b642aa00bd4a3857f9e5e6280a92f2e","original_commit_id":"6a2883672b642aa00bd4a3857f9e5e6280a92f2e","user":{"login":"kratsg","id":761483,"node_id":"MDQ6VXNlcjc2MTQ4Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/761483?v=4","gravatar_id":"","url":"https://api.github.com/users/kratsg","html_url":"https://github.com/kratsg","followers_url":"https://api.github.com/users/kratsg/followers","following_url":"https://api.github.com/users/kratsg/following{/other_user}","gists_url":"https://api.github.com/users/kratsg/gists{/gist_id}","starred_url":"https://api.github.com/users/kratsg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kratsg/subscriptions","organizations_url":"https://api.github.com/users/kratsg/orgs","repos_url":"https://api.github.com/users/kratsg/repos","events_url":"https://api.github.com/users/kratsg/events{/privacy}","received_events_url":"https://api.github.com/users/kratsg/received_events","type":"User","site_admin":false},"body":"This was needed to handle situations where `HistoPath` wasn't included -- and in these cases, it's equivalent to `''`. This code does need to be fixed up more to normalize the XMLs better...","created_at":"2018-08-24T01:11:06Z","updated_at":"2018-08-24T01:11:06Z","html_url":"https://github.com/diana-hep/pyhf/pull/197#discussion_r212498666","pull_request_url":"https://api.github.com/repos/diana-hep/pyhf/pulls/197","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/diana-hep/pyhf/pulls/comments/212498666"},"html":{"href":"https://github.com/diana-hep/pyhf/pull/197#discussion_r212498666"},"pull_request":{"href":"https://api.github.com/repos/diana-hep/pyhf/pulls/197"}}},"pull_request":{"url":"https://api.github.com/repos/diana-hep/pyhf/pulls/197","id":210525431,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwNTI1NDMx","html_url":"https://github.com/diana-hep/pyhf/pull/197","diff_url":"https://github.com/diana-hep/pyhf/pull/197.diff","patch_url":"https://github.com/diana-hep/pyhf/pull/197.patch","issue_url":"https://api.github.com/repos/diana-hep/pyhf/issues/197","number":197,"state":"open","locked":false,"title":"Feature: command line parse xml","user":{"login":"kratsg","id":761483,"node_id":"MDQ6VXNlcjc2MTQ4Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/761483?v=4","gravatar_id":"","url":"https://api.github.com/users/kratsg","html_url":"https://github.com/kratsg","followers_url":"https://api.github.com/users/kratsg/followers","following_url":"https://api.github.com/users/kratsg/following{/other_user}","gists_url":"https://api.github.com/users/kratsg/gists{/gist_id}","starred_url":"https://api.github.com/users/kratsg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kratsg/subscriptions","organizations_url":"https://api.github.com/users/kratsg/orgs","repos_url":"https://api.github.com/users/kratsg/repos","events_url":"https://api.github.com/users/kratsg/events{/privacy}","received_events_url":"https://api.github.com/users/kratsg/received_events","type":"User","site_admin":false},"body":"# Description\r\n\r\nThis allows someone to use `pyhf` from command-line to parse the XML workspaces using the `readxml.parse` functionality. This uses `click` to set up options/arguments.\r\n\r\nThis also updates `readxml` with some slight reorganization to allow for a `tqdm` progress bar that can be enabled (default: disabled) for reading in the channels in various XML files.\r\n\r\n```\r\npyhf_xml2json --entrypoint-xml validation/multibin_multibjets/config/NormalMeasurement.xml --workspace validation/multibin_multibjets/ --output_file test.json\r\n```\r\n\r\n![screenshot 2018-08-23 10 45 23](https://user-images.githubusercontent.com/761483/44542454-b1ff5600-a6c1-11e8-8c72-78bf0d36d95e.png)\r\n\r\nNB: both `click` and `tqdm` are already installed via our dependencies, but I've explicitly listed them in `setup.py` now.\r\n\r\n# Checklist Before Requesting Approver\r\n\r\n- [x] Tests are passing\r\n- [x] \"WIP\" removed from the title of the pull request\r\n","created_at":"2018-08-23T17:46:18Z","updated_at":"2018-08-24T01:11:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a726c725025ba1a99a3f1e464fa30c6be08afaf1","assignee":null,"assignees":[],"requested_reviewers":[{"login":"matthewfeickert","id":5142394,"node_id":"MDQ6VXNlcjUxNDIzOTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5142394?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewfeickert","html_url":"https://github.com/matthewfeickert","followers_url":"https://api.github.com/users/matthewfeickert/followers","following_url":"https://api.github.com/users/matthewfeickert/following{/other_user}","gists_url":"https://api.github.com/users/matthewfeickert/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewfeickert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewfeickert/subscriptions","organizations_url":"https://api.github.com/users/matthewfeickert/orgs","repos_url":"https://api.github.com/users/matthewfeickert/repos","events_url":"https://api.github.com/users/matthewfeickert/events{/privacy}","received_events_url":"https://api.github.com/users/matthewfeickert/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":815282411,"node_id":"MDU6TGFiZWw4MTUyODI0MTE=","url":"https://api.github.com/repos/diana-hep/pyhf/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/diana-hep/pyhf/pulls/197/commits","review_comments_url":"https://api.github.com/repos/diana-hep/pyhf/pulls/197/comments","review_comment_url":"https://api.github.com/repos/diana-hep/pyhf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diana-hep/pyhf/issues/197/comments","statuses_url":"https://api.github.com/repos/diana-hep/pyhf/statuses/6a2883672b642aa00bd4a3857f9e5e6280a92f2e","head":{"label":"diana-hep:feature/commandLineParseXML","ref":"feature/commandLineParseXML","sha":"6a2883672b642aa00bd4a3857f9e5e6280a92f2e","user":{"login":"diana-hep","id":12378600,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMzc4NjAw","avatar_url":"https://avatars3.githubusercontent.com/u/12378600?v=4","gravatar_id":"","url":"https://api.github.com/users/diana-hep","html_url":"https://github.com/diana-hep","followers_url":"https://api.github.com/users/diana-hep/followers","following_url":"https://api.github.com/users/diana-hep/following{/other_user}","gists_url":"https://api.github.com/users/diana-hep/gists{/gist_id}","starred_url":"https://api.github.com/users/diana-hep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diana-hep/subscriptions","organizations_url":"https://api.github.com/users/diana-hep/orgs","repos_url":"https://api.github.com/users/diana-hep/repos","events_url":"https://api.github.com/users/diana-hep/events{/privacy}","received_events_url":"https://api.github.com/users/diana-hep/received_events","type":"Organization","site_admin":false},"repo":{"id":118789569,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg3ODk1Njk=","name":"pyhf","full_name":"diana-hep/pyhf","owner":{"login":"diana-hep","id":12378600,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMzc4NjAw","avatar_url":"https://avatars3.githubusercontent.com/u/12378600?v=4","gravatar_id":"","url":"https://api.github.com/users/diana-hep","html_url":"https://github.com/diana-hep","followers_url":"https://api.github.com/users/diana-hep/followers","following_url":"https://api.github.com/users/diana-hep/following{/other_user}","gists_url":"https://api.github.com/users/diana-hep/gists{/gist_id}","starred_url":"https://api.github.com/users/diana-hep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diana-hep/subscriptions","organizations_url":"https://api.github.com/users/diana-hep/orgs","repos_url":"https://api.github.com/users/diana-hep/repos","events_url":"https://api.github.com/users/diana-hep/events{/privacy}","received_events_url":"https://api.github.com/users/diana-hep/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diana-hep/pyhf","description":"pure-python implementation of some (maybe someday all?) HistFactory models","fork":false,"url":"https://api.github.com/repos/diana-hep/pyhf","forks_url":"https://api.github.com/repos/diana-hep/pyhf/forks","keys_url":"https://api.github.com/repos/diana-hep/pyhf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diana-hep/pyhf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diana-hep/pyhf/teams","hooks_url":"https://api.github.com/repos/diana-hep/pyhf/hooks","issue_events_url":"https://api.github.com/repos/diana-hep/pyhf/issues/events{/number}","events_url":"https://api.github.com/repos/diana-hep/pyhf/events","assignees_url":"https://api.github.com/repos/diana-hep/pyhf/assignees{/user}","branches_url":"https://api.github.com/repos/diana-hep/pyhf/branches{/branch}","tags_url":"https://api.github.com/repos/diana-hep/pyhf/tags","blobs_url":"https://api.github.com/repos/diana-hep/pyhf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diana-hep/pyhf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diana-hep/pyhf/git/refs{/sha}","trees_url":"https://api.github.com/repos/diana-hep/pyhf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diana-hep/pyhf/statuses/{sha}","languages_url":"https://api.github.com/repos/diana-hep/pyhf/languages","stargazers_url":"https://api.github.com/repos/diana-hep/pyhf/stargazers","contributors_url":"https://api.github.com/repos/diana-hep/pyhf/contributors","subscribers_url":"https://api.github.com/repos/diana-hep/pyhf/subscribers","subscription_url":"https://api.github.com/repos/diana-hep/pyhf/subscription","commits_url":"https://api.github.com/repos/diana-hep/pyhf/commits{/sha}","git_commits_url":"https://api.github.com/repos/diana-hep/pyhf/git/commits{/sha}","comments_url":"https://api.github.com/repos/diana-hep/pyhf/comments{/number}","issue_comment_url":"https://api.github.com/repos/diana-hep/pyhf/issues/comments{/number}","contents_url":"https://api.github.com/repos/diana-hep/pyhf/contents/{+path}","compare_url":"https://api.github.com/repos/diana-hep/pyhf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diana-hep/pyhf/merges","archive_url":"https://api.github.com/repos/diana-hep/pyhf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diana-hep/pyhf/downloads","issues_url":"https://api.github.com/repos/diana-hep/pyhf/issues{/number}","pulls_url":"https://api.github.com/repos/diana-hep/pyhf/pulls{/number}","milestones_url":"https://api.github.com/repos/diana-hep/pyhf/milestones{/number}","notifications_url":"https://api.github.com/repos/diana-hep/pyhf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diana-hep/pyhf/labels{/name}","releases_url":"https://api.github.com/repos/diana-hep/pyhf/releases{/id}","deployments_url":"https://api.github.com/repos/diana-hep/pyhf/deployments","created_at":"2018-01-24T16:14:39Z","updated_at":"2018-08-23T18:00:00Z","pushed_at":"2018-08-24T01:07:31Z","git_url":"git://github.com/diana-hep/pyhf.git","ssh_url":"git@github.com:diana-hep/pyhf.git","clone_url":"https://github.com/diana-hep/pyhf.git","svn_url":"https://github.com/diana-hep/pyhf","homepage":"http://diana-hep.github.io/pyhf","size":19098,"stargazers_count":19,"watchers_count":19,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":7,"open_issues":34,"watchers":19,"default_branch":"master"}},"base":{"label":"diana-hep:master","ref":"master","sha":"4b04b0192fba1b446f1d3965f322e3b5a5201c42","user":{"login":"diana-hep","id":12378600,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMzc4NjAw","avatar_url":"https://avatars3.githubusercontent.com/u/12378600?v=4","gravatar_id":"","url":"https://api.github.com/users/diana-hep","html_url":"https://github.com/diana-hep","followers_url":"https://api.github.com/users/diana-hep/followers","following_url":"https://api.github.com/users/diana-hep/following{/other_user}","gists_url":"https://api.github.com/users/diana-hep/gists{/gist_id}","starred_url":"https://api.github.com/users/diana-hep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diana-hep/subscriptions","organizations_url":"https://api.github.com/users/diana-hep/orgs","repos_url":"https://api.github.com/users/diana-hep/repos","events_url":"https://api.github.com/users/diana-hep/events{/privacy}","received_events_url":"https://api.github.com/users/diana-hep/received_events","type":"Organization","site_admin":false},"repo":{"id":118789569,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg3ODk1Njk=","name":"pyhf","full_name":"diana-hep/pyhf","owner":{"login":"diana-hep","id":12378600,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMzc4NjAw","avatar_url":"https://avatars3.githubusercontent.com/u/12378600?v=4","gravatar_id":"","url":"https://api.github.com/users/diana-hep","html_url":"https://github.com/diana-hep","followers_url":"https://api.github.com/users/diana-hep/followers","following_url":"https://api.github.com/users/diana-hep/following{/other_user}","gists_url":"https://api.github.com/users/diana-hep/gists{/gist_id}","starred_url":"https://api.github.com/users/diana-hep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diana-hep/subscriptions","organizations_url":"https://api.github.com/users/diana-hep/orgs","repos_url":"https://api.github.com/users/diana-hep/repos","events_url":"https://api.github.com/users/diana-hep/events{/privacy}","received_events_url":"https://api.github.com/users/diana-hep/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diana-hep/pyhf","description":"pure-python implementation of some (maybe someday all?) HistFactory models","fork":false,"url":"https://api.github.com/repos/diana-hep/pyhf","forks_url":"https://api.github.com/repos/diana-hep/pyhf/forks","keys_url":"https://api.github.com/repos/diana-hep/pyhf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diana-hep/pyhf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diana-hep/pyhf/teams","hooks_url":"https://api.github.com/repos/diana-hep/pyhf/hooks","issue_events_url":"https://api.github.com/repos/diana-hep/pyhf/issues/events{/number}","events_url":"https://api.github.com/repos/diana-hep/pyhf/events","assignees_url":"https://api.github.com/repos/diana-hep/pyhf/assignees{/user}","branches_url":"https://api.github.com/repos/diana-hep/pyhf/branches{/branch}","tags_url":"https://api.github.com/repos/diana-hep/pyhf/tags","blobs_url":"https://api.github.com/repos/diana-hep/pyhf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diana-hep/pyhf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diana-hep/pyhf/git/refs{/sha}","trees_url":"https://api.github.com/repos/diana-hep/pyhf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diana-hep/pyhf/statuses/{sha}","languages_url":"https://api.github.com/repos/diana-hep/pyhf/languages","stargazers_url":"https://api.github.com/repos/diana-hep/pyhf/stargazers","contributors_url":"https://api.github.com/repos/diana-hep/pyhf/contributors","subscribers_url":"https://api.github.com/repos/diana-hep/pyhf/subscribers","subscription_url":"https://api.github.com/repos/diana-hep/pyhf/subscription","commits_url":"https://api.github.com/repos/diana-hep/pyhf/commits{/sha}","git_commits_url":"https://api.github.com/repos/diana-hep/pyhf/git/commits{/sha}","comments_url":"https://api.github.com/repos/diana-hep/pyhf/comments{/number}","issue_comment_url":"https://api.github.com/repos/diana-hep/pyhf/issues/comments{/number}","contents_url":"https://api.github.com/repos/diana-hep/pyhf/contents/{+path}","compare_url":"https://api.github.com/repos/diana-hep/pyhf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diana-hep/pyhf/merges","archive_url":"https://api.github.com/repos/diana-hep/pyhf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diana-hep/pyhf/downloads","issues_url":"https://api.github.com/repos/diana-hep/pyhf/issues{/number}","pulls_url":"https://api.github.com/repos/diana-hep/pyhf/pulls{/number}","milestones_url":"https://api.github.com/repos/diana-hep/pyhf/milestones{/number}","notifications_url":"https://api.github.com/repos/diana-hep/pyhf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diana-hep/pyhf/labels{/name}","releases_url":"https://api.github.com/repos/diana-hep/pyhf/releases{/id}","deployments_url":"https://api.github.com/repos/diana-hep/pyhf/deployments","created_at":"2018-01-24T16:14:39Z","updated_at":"2018-08-23T18:00:00Z","pushed_at":"2018-08-24T01:07:31Z","git_url":"git://github.com/diana-hep/pyhf.git","ssh_url":"git@github.com:diana-hep/pyhf.git","clone_url":"https://github.com/diana-hep/pyhf.git","svn_url":"https://github.com/diana-hep/pyhf","homepage":"http://diana-hep.github.io/pyhf","size":19098,"stargazers_count":19,"watchers_count":19,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":7,"open_issues":34,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/diana-hep/pyhf/pulls/197"},"html":{"href":"https://github.com/diana-hep/pyhf/pull/197"},"issue":{"href":"https://api.github.com/repos/diana-hep/pyhf/issues/197"},"comments":{"href":"https://api.github.com/repos/diana-hep/pyhf/issues/197/comments"},"review_comments":{"href":"https://api.github.com/repos/diana-hep/pyhf/pulls/197/comments"},"review_comment":{"href":"https://api.github.com/repos/diana-hep/pyhf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diana-hep/pyhf/pulls/197/commits"},"statuses":{"href":"https://api.github.com/repos/diana-hep/pyhf/statuses/6a2883672b642aa00bd4a3857f9e5e6280a92f2e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kratsg"}}