{"action":"created","comment":{"url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/comments/47317214","id":47317214,"diff_hunk":"@@ -1,50 +1,57 @@\n package edu.berkeley.ce.rockslicing\n \n-/** A simple tool for parsing command line inputs\n-  * @constructor Create a new command reader\n-  */\n+/**\n+ * A simple wrapper for parsing command line inputs\n+ */\n object CommandReader {\n-  val usage =\n-    \"\"\"\n-       Usage: <spark arguments> sparkRocks-assembly-1.0.jar -inputFile <inputFile> -numberSeedJoints <Int> <output opts>\n-         where:\n-              <spark arguments>    See www.spark.apache.org for details on how to submit Spark applications\n-              <inputFile>          File that contains input information on the rock volume of interest and joint sets\n-              <Int>                Integer that specifies the number of joints to process before initiating parallel\n-                                   instances\n-         and <output opts> is one or all of the following\n-              -toVTK               Generate output that can be converted to VTK format by rockProcessor.\n-                                   Output file format is JSON.\n-              -toIE                Generate output that uses inequalities to represent rock blocks along with the\n-                                   blocks' center of mass. Output file format is JSON.\n-    \"\"\".stripMargin\n-\n-  type OptionMap = Map[Symbol, String]\n-\n-  def parseArguments(inputs: Array[String]): OptionMap = {\n-    if (inputs.length == 0) {\n-      println(usage)\n-      sys.exit(1)\n-    }\n+  case class Config(\n+    inputFile: String = \".\",\n+    numSeedJoints: Int = 25,\n+    minRadius: Double = Double.NegativeInfinity,","path":"src/main/scala/edu/berkeley/ce/rockslicing/CommandReader.scala","position":35,"original_position":35,"commit_id":"98c533798dc8dd884dd33aa50755f99b1a184bed","original_commit_id":"98c533798dc8dd884dd33aa50755f99b1a184bed","user":{"login":"jKolb1","id":9288575,"avatar_url":"https://avatars.githubusercontent.com/u/9288575?v=3","gravatar_id":"","url":"https://api.github.com/users/jKolb1","html_url":"https://github.com/jKolb1","followers_url":"https://api.github.com/users/jKolb1/followers","following_url":"https://api.github.com/users/jKolb1/following{/other_user}","gists_url":"https://api.github.com/users/jKolb1/gists{/gist_id}","starred_url":"https://api.github.com/users/jKolb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jKolb1/subscriptions","organizations_url":"https://api.github.com/users/jKolb1/orgs","repos_url":"https://api.github.com/users/jKolb1/repos","events_url":"https://api.github.com/users/jKolb1/events{/privacy}","received_events_url":"https://api.github.com/users/jKolb1/received_events","type":"User","site_admin":false},"body":"Sounds good. I've changed it.","created_at":"2015-12-11T02:55:01Z","updated_at":"2015-12-11T02:55:01Z","html_url":"https://github.com/jKolb1/sparkRocks/pull/20#discussion_r47317214","pull_request_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/comments/47317214"},"html":{"href":"https://github.com/jKolb1/sparkRocks/pull/20#discussion_r47317214"},"pull_request":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/20","id":51873653,"html_url":"https://github.com/jKolb1/sparkRocks/pull/20","diff_url":"https://github.com/jKolb1/sparkRocks/pull/20.diff","patch_url":"https://github.com/jKolb1/sparkRocks/pull/20.patch","issue_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/20","number":20,"state":"open","locked":false,"title":"Conditioning","user":{"login":"jKolb1","id":9288575,"avatar_url":"https://avatars.githubusercontent.com/u/9288575?v=3","gravatar_id":"","url":"https://api.github.com/users/jKolb1","html_url":"https://github.com/jKolb1","followers_url":"https://api.github.com/users/jKolb1/followers","following_url":"https://api.github.com/users/jKolb1/following{/other_user}","gists_url":"https://api.github.com/users/jKolb1/gists{/gist_id}","starred_url":"https://api.github.com/users/jKolb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jKolb1/subscriptions","organizations_url":"https://api.github.com/users/jKolb1/orgs","repos_url":"https://api.github.com/users/jKolb1/repos","events_url":"https://api.github.com/users/jKolb1/events{/privacy}","received_events_url":"https://api.github.com/users/jKolb1/received_events","type":"User","site_admin":false},"body":"Addresses issue #18 with an implementation of optional conditioning of child blocks based on two criteria:\r\n  1. The minimum radius of the largest possible inscribed sphere in a block\r\n  2. The maximum aspect ratio of the radius of a block's bounding sphere to its maximum inscribable radius.\r\n\r\nAlso includes a few other minor improvements:\r\n  * A new command line argument parser based on the `scopt` library\r\n  * Lazy values in the `Block` class to avoid expensive computation where possible\r\n  * Distance checking is now confined to `InputProcessor`\r\n  * Vector normalization is now confined to `InputProcessor`\r\n  * `InputProcessor` has been rewritten to fail more gracefully and provide the user with informative error messages\r\n  * A new test suite, `InputProcessorSpec`, to test `InputProcessor` ","created_at":"2015-11-26T05:22:26Z","updated_at":"2015-12-11T02:55:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49cc06250ca03226cc6264c6489f72d3a21cf8ba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/20/commits","review_comments_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/20/comments","review_comment_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/20/comments","statuses_url":"https://api.github.com/repos/jKolb1/sparkRocks/statuses/98c533798dc8dd884dd33aa50755f99b1a184bed","head":{"label":"jKolb1:conditioning","ref":"conditioning","sha":"98c533798dc8dd884dd33aa50755f99b1a184bed","user":{"login":"jKolb1","id":9288575,"avatar_url":"https://avatars.githubusercontent.com/u/9288575?v=3","gravatar_id":"","url":"https://api.github.com/users/jKolb1","html_url":"https://github.com/jKolb1","followers_url":"https://api.github.com/users/jKolb1/followers","following_url":"https://api.github.com/users/jKolb1/following{/other_user}","gists_url":"https://api.github.com/users/jKolb1/gists{/gist_id}","starred_url":"https://api.github.com/users/jKolb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jKolb1/subscriptions","organizations_url":"https://api.github.com/users/jKolb1/orgs","repos_url":"https://api.github.com/users/jKolb1/repos","events_url":"https://api.github.com/users/jKolb1/events{/privacy}","received_events_url":"https://api.github.com/users/jKolb1/received_events","type":"User","site_admin":false},"repo":{"id":36398369,"name":"sparkRocks","full_name":"jKolb1/sparkRocks","owner":{"login":"jKolb1","id":9288575,"avatar_url":"https://avatars.githubusercontent.com/u/9288575?v=3","gravatar_id":"","url":"https://api.github.com/users/jKolb1","html_url":"https://github.com/jKolb1","followers_url":"https://api.github.com/users/jKolb1/followers","following_url":"https://api.github.com/users/jKolb1/following{/other_user}","gists_url":"https://api.github.com/users/jKolb1/gists{/gist_id}","starred_url":"https://api.github.com/users/jKolb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jKolb1/subscriptions","organizations_url":"https://api.github.com/users/jKolb1/orgs","repos_url":"https://api.github.com/users/jKolb1/repos","events_url":"https://api.github.com/users/jKolb1/events{/privacy}","received_events_url":"https://api.github.com/users/jKolb1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jKolb1/sparkRocks","description":"Parallel rock slicing implementation on Apache Spark","fork":true,"url":"https://api.github.com/repos/jKolb1/sparkRocks","forks_url":"https://api.github.com/repos/jKolb1/sparkRocks/forks","keys_url":"https://api.github.com/repos/jKolb1/sparkRocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jKolb1/sparkRocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jKolb1/sparkRocks/teams","hooks_url":"https://api.github.com/repos/jKolb1/sparkRocks/hooks","issue_events_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/events{/number}","events_url":"https://api.github.com/repos/jKolb1/sparkRocks/events","assignees_url":"https://api.github.com/repos/jKolb1/sparkRocks/assignees{/user}","branches_url":"https://api.github.com/repos/jKolb1/sparkRocks/branches{/branch}","tags_url":"https://api.github.com/repos/jKolb1/sparkRocks/tags","blobs_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jKolb1/sparkRocks/statuses/{sha}","languages_url":"https://api.github.com/repos/jKolb1/sparkRocks/languages","stargazers_url":"https://api.github.com/repos/jKolb1/sparkRocks/stargazers","contributors_url":"https://api.github.com/repos/jKolb1/sparkRocks/contributors","subscribers_url":"https://api.github.com/repos/jKolb1/sparkRocks/subscribers","subscription_url":"https://api.github.com/repos/jKolb1/sparkRocks/subscription","commits_url":"https://api.github.com/repos/jKolb1/sparkRocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/jKolb1/sparkRocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/jKolb1/sparkRocks/contents/{+path}","compare_url":"https://api.github.com/repos/jKolb1/sparkRocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jKolb1/sparkRocks/merges","archive_url":"https://api.github.com/repos/jKolb1/sparkRocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jKolb1/sparkRocks/downloads","issues_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues{/number}","pulls_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls{/number}","milestones_url":"https://api.github.com/repos/jKolb1/sparkRocks/milestones{/number}","notifications_url":"https://api.github.com/repos/jKolb1/sparkRocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jKolb1/sparkRocks/labels{/name}","releases_url":"https://api.github.com/repos/jKolb1/sparkRocks/releases{/id}","created_at":"2015-05-27T21:58:52Z","updated_at":"2015-12-11T02:32:13Z","pushed_at":"2015-11-26T05:22:26Z","git_url":"git://github.com/jKolb1/sparkRocks.git","ssh_url":"git@github.com:jKolb1/sparkRocks.git","clone_url":"https://github.com/jKolb1/sparkRocks.git","svn_url":"https://github.com/jKolb1/sparkRocks","homepage":"","size":333,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"jKolb1:master","ref":"master","sha":"9284f3bf6457e3c1e1c6e2e27c927a75c5e0580f","user":{"login":"jKolb1","id":9288575,"avatar_url":"https://avatars.githubusercontent.com/u/9288575?v=3","gravatar_id":"","url":"https://api.github.com/users/jKolb1","html_url":"https://github.com/jKolb1","followers_url":"https://api.github.com/users/jKolb1/followers","following_url":"https://api.github.com/users/jKolb1/following{/other_user}","gists_url":"https://api.github.com/users/jKolb1/gists{/gist_id}","starred_url":"https://api.github.com/users/jKolb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jKolb1/subscriptions","organizations_url":"https://api.github.com/users/jKolb1/orgs","repos_url":"https://api.github.com/users/jKolb1/repos","events_url":"https://api.github.com/users/jKolb1/events{/privacy}","received_events_url":"https://api.github.com/users/jKolb1/received_events","type":"User","site_admin":false},"repo":{"id":36398369,"name":"sparkRocks","full_name":"jKolb1/sparkRocks","owner":{"login":"jKolb1","id":9288575,"avatar_url":"https://avatars.githubusercontent.com/u/9288575?v=3","gravatar_id":"","url":"https://api.github.com/users/jKolb1","html_url":"https://github.com/jKolb1","followers_url":"https://api.github.com/users/jKolb1/followers","following_url":"https://api.github.com/users/jKolb1/following{/other_user}","gists_url":"https://api.github.com/users/jKolb1/gists{/gist_id}","starred_url":"https://api.github.com/users/jKolb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jKolb1/subscriptions","organizations_url":"https://api.github.com/users/jKolb1/orgs","repos_url":"https://api.github.com/users/jKolb1/repos","events_url":"https://api.github.com/users/jKolb1/events{/privacy}","received_events_url":"https://api.github.com/users/jKolb1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jKolb1/sparkRocks","description":"Parallel rock slicing implementation on Apache Spark","fork":true,"url":"https://api.github.com/repos/jKolb1/sparkRocks","forks_url":"https://api.github.com/repos/jKolb1/sparkRocks/forks","keys_url":"https://api.github.com/repos/jKolb1/sparkRocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jKolb1/sparkRocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jKolb1/sparkRocks/teams","hooks_url":"https://api.github.com/repos/jKolb1/sparkRocks/hooks","issue_events_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/events{/number}","events_url":"https://api.github.com/repos/jKolb1/sparkRocks/events","assignees_url":"https://api.github.com/repos/jKolb1/sparkRocks/assignees{/user}","branches_url":"https://api.github.com/repos/jKolb1/sparkRocks/branches{/branch}","tags_url":"https://api.github.com/repos/jKolb1/sparkRocks/tags","blobs_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jKolb1/sparkRocks/statuses/{sha}","languages_url":"https://api.github.com/repos/jKolb1/sparkRocks/languages","stargazers_url":"https://api.github.com/repos/jKolb1/sparkRocks/stargazers","contributors_url":"https://api.github.com/repos/jKolb1/sparkRocks/contributors","subscribers_url":"https://api.github.com/repos/jKolb1/sparkRocks/subscribers","subscription_url":"https://api.github.com/repos/jKolb1/sparkRocks/subscription","commits_url":"https://api.github.com/repos/jKolb1/sparkRocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/jKolb1/sparkRocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/jKolb1/sparkRocks/contents/{+path}","compare_url":"https://api.github.com/repos/jKolb1/sparkRocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jKolb1/sparkRocks/merges","archive_url":"https://api.github.com/repos/jKolb1/sparkRocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jKolb1/sparkRocks/downloads","issues_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues{/number}","pulls_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls{/number}","milestones_url":"https://api.github.com/repos/jKolb1/sparkRocks/milestones{/number}","notifications_url":"https://api.github.com/repos/jKolb1/sparkRocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jKolb1/sparkRocks/labels{/name}","releases_url":"https://api.github.com/repos/jKolb1/sparkRocks/releases{/id}","created_at":"2015-05-27T21:58:52Z","updated_at":"2015-12-11T02:32:13Z","pushed_at":"2015-11-26T05:22:26Z","git_url":"git://github.com/jKolb1/sparkRocks.git","ssh_url":"git@github.com:jKolb1/sparkRocks.git","clone_url":"https://github.com/jKolb1/sparkRocks.git","svn_url":"https://github.com/jKolb1/sparkRocks","homepage":"","size":333,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/20"},"html":{"href":"https://github.com/jKolb1/sparkRocks/pull/20"},"issue":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/issues/20"},"comments":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/statuses/98c533798dc8dd884dd33aa50755f99b1a184bed"}}}}