{"action":"created","comment":{"url":"https://api.github.com/repos/innolitics/hdat/pulls/comments/207273593","pull_request_review_id":142852122,"id":207273593,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzI3MzU5Mw==","diff_hunk":"@@ -50,20 +56,30 @@ def select_recent(self, i, *args):\n         else:\n             return self.read_result(os.path.join(top_directory, recent_id))\n \n-    def select_recents_suite(self, *args):\n+    def select_recents_suite(self, suites, *args):\n+        \"\"\"Return the most recent result of each case within a specified suite.\n+        *args -- suite ID selector ['a']\"\"\"\n         top_directory = os.path.join(self.root, *args)\n         if not os.path.isdir(top_directory):\n             msg = \"Selected suite directory {} does not exist or is not a directory\"\n             raise AbortError(msg.format(top_directory))\n-\n+        # catch unused cases within a suite when resultspec is an entire suite\n+        for case in suites[str(args[0])].collect().keys():\n+            if case not in os.listdir(top_directory):\n+                msg = 'The case \"{}\" exists within suite \"{}\", ' + \\\n+                      'but has no result recorded. ' + \\\n+                      'Please run the case or suite first.'\n+                raise AbortError(msg.format(case, args[0]))\n         for entry in os.listdir(top_directory):\n-            if not entry.startswith('.') and os.path.isdir(os.path.join(top_directory, entry)):\n-                yield self.select_recent(-1, *(args+(entry,)))\n+            if (not entry.startswith('.') and","path":"hdat/archive.py","position":62,"original_position":62,"commit_id":"d9412278a85b77d0c25c8d883a92461feab37d75","original_commit_id":"d9412278a85b77d0c25c8d883a92461feab37d75","user":{"login":"johndgiese","id":1648754,"node_id":"MDQ6VXNlcjE2NDg3NTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1648754?v=4","gravatar_id":"","url":"https://api.github.com/users/johndgiese","html_url":"https://github.com/johndgiese","followers_url":"https://api.github.com/users/johndgiese/followers","following_url":"https://api.github.com/users/johndgiese/following{/other_user}","gists_url":"https://api.github.com/users/johndgiese/gists{/gist_id}","starred_url":"https://api.github.com/users/johndgiese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johndgiese/subscriptions","organizations_url":"https://api.github.com/users/johndgiese/orgs","repos_url":"https://api.github.com/users/johndgiese/repos","events_url":"https://api.github.com/users/johndgiese/events{/privacy}","received_events_url":"https://api.github.com/users/johndgiese/received_events","type":"User","site_admin":false},"body":"I would split this line into a few intermediate variables in order to avoid so much wrapping.","created_at":"2018-08-02T15:34:18Z","updated_at":"2018-08-02T15:34:18Z","html_url":"https://github.com/innolitics/hdat/pull/33#discussion_r207273593","pull_request_url":"https://api.github.com/repos/innolitics/hdat/pulls/33","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/innolitics/hdat/pulls/comments/207273593"},"html":{"href":"https://github.com/innolitics/hdat/pull/33#discussion_r207273593"},"pull_request":{"href":"https://api.github.com/repos/innolitics/hdat/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/innolitics/hdat/pulls/33","id":204652967,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjUyOTY3","html_url":"https://github.com/innolitics/hdat/pull/33","diff_url":"https://github.com/innolitics/hdat/pull/33.diff","patch_url":"https://github.com/innolitics/hdat/pull/33.patch","issue_url":"https://api.github.com/repos/innolitics/hdat/issues/33","number":33,"state":"open","locked":false,"title":"Fix Issue #26: show deleted cases (and new cases)","user":{"login":"russellkan","id":9055029,"node_id":"MDQ6VXNlcjkwNTUwMjk=","avatar_url":"https://avatars3.githubusercontent.com/u/9055029?v=4","gravatar_id":"","url":"https://api.github.com/users/russellkan","html_url":"https://github.com/russellkan","followers_url":"https://api.github.com/users/russellkan/followers","following_url":"https://api.github.com/users/russellkan/following{/other_user}","gists_url":"https://api.github.com/users/russellkan/gists{/gist_id}","starred_url":"https://api.github.com/users/russellkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russellkan/subscriptions","organizations_url":"https://api.github.com/users/russellkan/orgs","repos_url":"https://api.github.com/users/russellkan/repos","events_url":"https://api.github.com/users/russellkan/events{/privacy}","received_events_url":"https://api.github.com/users/russellkan/received_events","type":"User","site_admin":false},"body":"This properly handles removed and new cases when trying to execute any sort of command that involves a resultspec: `show`, `csv`, `diff`, etc.\r\n\r\nHowever, in order to get the exit code to change without immediately exiting, I had to change most of these functions to return the exit code and then call `sys.exit(exit_code)` after everything had run.\r\n\r\nIs there a better way to do this? I couldn't find any information online with other methods of setting an exit code but not exiting immediately.\r\n\r\nThis also includes some odd handling of `resolve_resultspec` since I made it such that an error would return an error message string in place of whatever should normally be returned, and then the calling function would call `isinstance` and print the message if a string was returned.\r\n\r\nI can probably just print a message to `stderr` and then `return` or something instead, but this would still require checking what was returned and skipping everything else if nothing is returned.\r\n\r\nIt's especially complicated since `resolve_resultspec` returns a generator, so for `csv`, the check occurs within `print_results`. Also, that the conditions and error message for a removed/nonexistent case is different from that of a new un-run case combined with the different function calls `select_recents_all`, `select_recents_suite`, and `select_recent` depending on the user input arguments makes handling all of this a mess.","created_at":"2018-07-29T17:40:26Z","updated_at":"2018-08-02T15:34:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d5c135b9fb74dfce2a6c8e770c7d1fab75275ca","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/innolitics/hdat/pulls/33/commits","review_comments_url":"https://api.github.com/repos/innolitics/hdat/pulls/33/comments","review_comment_url":"https://api.github.com/repos/innolitics/hdat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/innolitics/hdat/issues/33/comments","statuses_url":"https://api.github.com/repos/innolitics/hdat/statuses/d9412278a85b77d0c25c8d883a92461feab37d75","head":{"label":"innolitics:bug/26-show-deleted-cases","ref":"bug/26-show-deleted-cases","sha":"d9412278a85b77d0c25c8d883a92461feab37d75","user":{"login":"innolitics","id":4588626,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1ODg2MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/4588626?v=4","gravatar_id":"","url":"https://api.github.com/users/innolitics","html_url":"https://github.com/innolitics","followers_url":"https://api.github.com/users/innolitics/followers","following_url":"https://api.github.com/users/innolitics/following{/other_user}","gists_url":"https://api.github.com/users/innolitics/gists{/gist_id}","starred_url":"https://api.github.com/users/innolitics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/innolitics/subscriptions","organizations_url":"https://api.github.com/users/innolitics/orgs","repos_url":"https://api.github.com/users/innolitics/repos","events_url":"https://api.github.com/users/innolitics/events{/privacy}","received_events_url":"https://api.github.com/users/innolitics/received_events","type":"Organization","site_admin":false},"repo":{"id":119286188,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkyODYxODg=","name":"hdat","full_name":"innolitics/hdat","owner":{"login":"innolitics","id":4588626,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1ODg2MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/4588626?v=4","gravatar_id":"","url":"https://api.github.com/users/innolitics","html_url":"https://github.com/innolitics","followers_url":"https://api.github.com/users/innolitics/followers","following_url":"https://api.github.com/users/innolitics/following{/other_user}","gists_url":"https://api.github.com/users/innolitics/gists{/gist_id}","starred_url":"https://api.github.com/users/innolitics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/innolitics/subscriptions","organizations_url":"https://api.github.com/users/innolitics/orgs","repos_url":"https://api.github.com/users/innolitics/repos","events_url":"https://api.github.com/users/innolitics/events{/privacy}","received_events_url":"https://api.github.com/users/innolitics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/innolitics/hdat","description":"High dimensionality algorithm tester","fork":false,"url":"https://api.github.com/repos/innolitics/hdat","forks_url":"https://api.github.com/repos/innolitics/hdat/forks","keys_url":"https://api.github.com/repos/innolitics/hdat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/innolitics/hdat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/innolitics/hdat/teams","hooks_url":"https://api.github.com/repos/innolitics/hdat/hooks","issue_events_url":"https://api.github.com/repos/innolitics/hdat/issues/events{/number}","events_url":"https://api.github.com/repos/innolitics/hdat/events","assignees_url":"https://api.github.com/repos/innolitics/hdat/assignees{/user}","branches_url":"https://api.github.com/repos/innolitics/hdat/branches{/branch}","tags_url":"https://api.github.com/repos/innolitics/hdat/tags","blobs_url":"https://api.github.com/repos/innolitics/hdat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/innolitics/hdat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/innolitics/hdat/git/refs{/sha}","trees_url":"https://api.github.com/repos/innolitics/hdat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/innolitics/hdat/statuses/{sha}","languages_url":"https://api.github.com/repos/innolitics/hdat/languages","stargazers_url":"https://api.github.com/repos/innolitics/hdat/stargazers","contributors_url":"https://api.github.com/repos/innolitics/hdat/contributors","subscribers_url":"https://api.github.com/repos/innolitics/hdat/subscribers","subscription_url":"https://api.github.com/repos/innolitics/hdat/subscription","commits_url":"https://api.github.com/repos/innolitics/hdat/commits{/sha}","git_commits_url":"https://api.github.com/repos/innolitics/hdat/git/commits{/sha}","comments_url":"https://api.github.com/repos/innolitics/hdat/comments{/number}","issue_comment_url":"https://api.github.com/repos/innolitics/hdat/issues/comments{/number}","contents_url":"https://api.github.com/repos/innolitics/hdat/contents/{+path}","compare_url":"https://api.github.com/repos/innolitics/hdat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/innolitics/hdat/merges","archive_url":"https://api.github.com/repos/innolitics/hdat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/innolitics/hdat/downloads","issues_url":"https://api.github.com/repos/innolitics/hdat/issues{/number}","pulls_url":"https://api.github.com/repos/innolitics/hdat/pulls{/number}","milestones_url":"https://api.github.com/repos/innolitics/hdat/milestones{/number}","notifications_url":"https://api.github.com/repos/innolitics/hdat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/innolitics/hdat/labels{/name}","releases_url":"https://api.github.com/repos/innolitics/hdat/releases{/id}","deployments_url":"https://api.github.com/repos/innolitics/hdat/deployments","created_at":"2018-01-28T18:33:03Z","updated_at":"2018-07-25T20:56:59Z","pushed_at":"2018-08-02T15:12:29Z","git_url":"git://github.com/innolitics/hdat.git","ssh_url":"git@github.com:innolitics/hdat.git","clone_url":"https://github.com/innolitics/hdat.git","svn_url":"https://github.com/innolitics/hdat","homepage":null,"size":286,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":7,"watchers":4,"default_branch":"master"}},"base":{"label":"innolitics:master","ref":"master","sha":"88a7cd40d71ec19abf6571c53861c475d146b28c","user":{"login":"innolitics","id":4588626,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1ODg2MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/4588626?v=4","gravatar_id":"","url":"https://api.github.com/users/innolitics","html_url":"https://github.com/innolitics","followers_url":"https://api.github.com/users/innolitics/followers","following_url":"https://api.github.com/users/innolitics/following{/other_user}","gists_url":"https://api.github.com/users/innolitics/gists{/gist_id}","starred_url":"https://api.github.com/users/innolitics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/innolitics/subscriptions","organizations_url":"https://api.github.com/users/innolitics/orgs","repos_url":"https://api.github.com/users/innolitics/repos","events_url":"https://api.github.com/users/innolitics/events{/privacy}","received_events_url":"https://api.github.com/users/innolitics/received_events","type":"Organization","site_admin":false},"repo":{"id":119286188,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkyODYxODg=","name":"hdat","full_name":"innolitics/hdat","owner":{"login":"innolitics","id":4588626,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1ODg2MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/4588626?v=4","gravatar_id":"","url":"https://api.github.com/users/innolitics","html_url":"https://github.com/innolitics","followers_url":"https://api.github.com/users/innolitics/followers","following_url":"https://api.github.com/users/innolitics/following{/other_user}","gists_url":"https://api.github.com/users/innolitics/gists{/gist_id}","starred_url":"https://api.github.com/users/innolitics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/innolitics/subscriptions","organizations_url":"https://api.github.com/users/innolitics/orgs","repos_url":"https://api.github.com/users/innolitics/repos","events_url":"https://api.github.com/users/innolitics/events{/privacy}","received_events_url":"https://api.github.com/users/innolitics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/innolitics/hdat","description":"High dimensionality algorithm tester","fork":false,"url":"https://api.github.com/repos/innolitics/hdat","forks_url":"https://api.github.com/repos/innolitics/hdat/forks","keys_url":"https://api.github.com/repos/innolitics/hdat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/innolitics/hdat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/innolitics/hdat/teams","hooks_url":"https://api.github.com/repos/innolitics/hdat/hooks","issue_events_url":"https://api.github.com/repos/innolitics/hdat/issues/events{/number}","events_url":"https://api.github.com/repos/innolitics/hdat/events","assignees_url":"https://api.github.com/repos/innolitics/hdat/assignees{/user}","branches_url":"https://api.github.com/repos/innolitics/hdat/branches{/branch}","tags_url":"https://api.github.com/repos/innolitics/hdat/tags","blobs_url":"https://api.github.com/repos/innolitics/hdat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/innolitics/hdat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/innolitics/hdat/git/refs{/sha}","trees_url":"https://api.github.com/repos/innolitics/hdat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/innolitics/hdat/statuses/{sha}","languages_url":"https://api.github.com/repos/innolitics/hdat/languages","stargazers_url":"https://api.github.com/repos/innolitics/hdat/stargazers","contributors_url":"https://api.github.com/repos/innolitics/hdat/contributors","subscribers_url":"https://api.github.com/repos/innolitics/hdat/subscribers","subscription_url":"https://api.github.com/repos/innolitics/hdat/subscription","commits_url":"https://api.github.com/repos/innolitics/hdat/commits{/sha}","git_commits_url":"https://api.github.com/repos/innolitics/hdat/git/commits{/sha}","comments_url":"https://api.github.com/repos/innolitics/hdat/comments{/number}","issue_comment_url":"https://api.github.com/repos/innolitics/hdat/issues/comments{/number}","contents_url":"https://api.github.com/repos/innolitics/hdat/contents/{+path}","compare_url":"https://api.github.com/repos/innolitics/hdat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/innolitics/hdat/merges","archive_url":"https://api.github.com/repos/innolitics/hdat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/innolitics/hdat/downloads","issues_url":"https://api.github.com/repos/innolitics/hdat/issues{/number}","pulls_url":"https://api.github.com/repos/innolitics/hdat/pulls{/number}","milestones_url":"https://api.github.com/repos/innolitics/hdat/milestones{/number}","notifications_url":"https://api.github.com/repos/innolitics/hdat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/innolitics/hdat/labels{/name}","releases_url":"https://api.github.com/repos/innolitics/hdat/releases{/id}","deployments_url":"https://api.github.com/repos/innolitics/hdat/deployments","created_at":"2018-01-28T18:33:03Z","updated_at":"2018-07-25T20:56:59Z","pushed_at":"2018-08-02T15:12:29Z","git_url":"git://github.com/innolitics/hdat.git","ssh_url":"git@github.com:innolitics/hdat.git","clone_url":"https://github.com/innolitics/hdat.git","svn_url":"https://github.com/innolitics/hdat","homepage":null,"size":286,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":7,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/innolitics/hdat/pulls/33"},"html":{"href":"https://github.com/innolitics/hdat/pull/33"},"issue":{"href":"https://api.github.com/repos/innolitics/hdat/issues/33"},"comments":{"href":"https://api.github.com/repos/innolitics/hdat/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/innolitics/hdat/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/innolitics/hdat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/innolitics/hdat/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/innolitics/hdat/statuses/d9412278a85b77d0c25c8d883a92461feab37d75"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"johndgiese"}}