{"action":"created","comment":{"url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/comments/179973111","pull_request_review_id":110312691,"id":179973111,"diff_hunk":"@@ -140,16 +154,20 @@ def __init__(self, params):\n         \"\"\"\n         # Make this a bit easier to get right by checking for parameters by unexpected\n         # names.\n-        supported_params = {\n-            'epoch', 'state_vector', 'originator', 'object_name', 'object_id', 'mass',\n-            'solar_rad_area', 'solar_rad_coeff', 'drag_area', 'drag_coeff',\n-            'covariance', 'perturbation', 'hypercube'}\n+        supported_params = {'epoch', 'state_vector', 'keplerian_elements', 'originator',\n+                            'object_name', 'object_id', 'mass', 'solar_rad_area',\n+                            'solar_rad_coeff', 'drag_area', 'drag_coeff', 'covariance',\n+                            'perturbation', 'hypercube'}\n         extra_params = params.keys() - supported_params\n         if len(extra_params) > 0:\n             raise KeyError(\"Unexpected parameters provided: %s\" % (extra_params))\n \n         self._epoch = params['epoch']  # Required.\n-        self._state_vector = params['state_vector']  # Required.\n+\n+        if 'state_vector' not in params and 'keplerian_elements' not in params:\n+            raise KeyError(\"Either state_vector or keplerian_elements must be provided.\")\n+        self._state_vector = params.get('state_vector') or [0, 0, 0, 0, 0, 0]  # Required in OPM.","path":"adam/batch.py","position":48,"original_position":48,"commit_id":"53e435dba884e10752aa728a4c4d15e8bd06303d","original_commit_id":"53e435dba884e10752aa728a4c4d15e8bd06303d","user":{"login":"HoodedCrow","id":3947167,"avatar_url":"https://avatars0.githubusercontent.com/u/3947167?v=4","gravatar_id":"","url":"https://api.github.com/users/HoodedCrow","html_url":"https://github.com/HoodedCrow","followers_url":"https://api.github.com/users/HoodedCrow/followers","following_url":"https://api.github.com/users/HoodedCrow/following{/other_user}","gists_url":"https://api.github.com/users/HoodedCrow/gists{/gist_id}","starred_url":"https://api.github.com/users/HoodedCrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HoodedCrow/subscriptions","organizations_url":"https://api.github.com/users/HoodedCrow/orgs","repos_url":"https://api.github.com/users/HoodedCrow/repos","events_url":"https://api.github.com/users/HoodedCrow/events{/privacy}","received_events_url":"https://api.github.com/users/HoodedCrow/received_events","type":"User","site_admin":false},"body":"Maybe not specify it and add an if in the OPM generator instead?","created_at":"2018-04-09T02:01:11Z","updated_at":"2018-04-09T02:02:30Z","html_url":"https://github.com/B612-Asteroid-Institute/adam/pull/34#discussion_r179973111","pull_request_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/34","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/comments/179973111"},"html":{"href":"https://github.com/B612-Asteroid-Institute/adam/pull/34#discussion_r179973111"},"pull_request":{"href":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/34","id":179783268,"html_url":"https://github.com/B612-Asteroid-Institute/adam/pull/34","diff_url":"https://github.com/B612-Asteroid-Institute/adam/pull/34.diff","patch_url":"https://github.com/B612-Asteroid-Institute/adam/pull/34.patch","issue_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/issues/34","number":34,"state":"open","locked":false,"title":"Support keplerian elements in client","user":{"login":"laurahlark","id":35230484,"avatar_url":"https://avatars0.githubusercontent.com/u/35230484?v=4","gravatar_id":"","url":"https://api.github.com/users/laurahlark","html_url":"https://github.com/laurahlark","followers_url":"https://api.github.com/users/laurahlark/followers","following_url":"https://api.github.com/users/laurahlark/following{/other_user}","gists_url":"https://api.github.com/users/laurahlark/gists{/gist_id}","starred_url":"https://api.github.com/users/laurahlark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurahlark/subscriptions","organizations_url":"https://api.github.com/users/laurahlark/orgs","repos_url":"https://api.github.com/users/laurahlark/repos","events_url":"https://api.github.com/users/laurahlark/events{/privacy}","received_events_url":"https://api.github.com/users/laurahlark/received_events","type":"User","site_admin":false},"body":"See if you like how this is supported. Basically OpmParams now allows specifying either 'state_vector': [...] or 'keplerian_elements': [...]. I made keplerian_elements an array to make it state-vector-like, but it may be better to make it a nested object with named fields, or to just have all the keplerian elements as top-level named fields. For now, I figure everyone who actually wants to do this will just be copy-pasting examples so it doesn't matter anyway.","created_at":"2018-04-05T20:10:20Z","updated_at":"2018-04-09T02:02:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c18e9f9f87d267bc2bef1a0cab1822008c12f32","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/34/commits","review_comments_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/34/comments","review_comment_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/issues/34/comments","statuses_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/statuses/53e435dba884e10752aa728a4c4d15e8bd06303d","head":{"label":"B612-Asteroid-Institute:ll-keplerian","ref":"ll-keplerian","sha":"53e435dba884e10752aa728a4c4d15e8bd06303d","user":{"login":"B612-Asteroid-Institute","id":32551062,"avatar_url":"https://avatars1.githubusercontent.com/u/32551062?v=4","gravatar_id":"","url":"https://api.github.com/users/B612-Asteroid-Institute","html_url":"https://github.com/B612-Asteroid-Institute","followers_url":"https://api.github.com/users/B612-Asteroid-Institute/followers","following_url":"https://api.github.com/users/B612-Asteroid-Institute/following{/other_user}","gists_url":"https://api.github.com/users/B612-Asteroid-Institute/gists{/gist_id}","starred_url":"https://api.github.com/users/B612-Asteroid-Institute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/B612-Asteroid-Institute/subscriptions","organizations_url":"https://api.github.com/users/B612-Asteroid-Institute/orgs","repos_url":"https://api.github.com/users/B612-Asteroid-Institute/repos","events_url":"https://api.github.com/users/B612-Asteroid-Institute/events{/privacy}","received_events_url":"https://api.github.com/users/B612-Asteroid-Institute/received_events","type":"Organization","site_admin":false},"repo":{"id":122532890,"name":"adam","full_name":"B612-Asteroid-Institute/adam","owner":{"login":"B612-Asteroid-Institute","id":32551062,"avatar_url":"https://avatars1.githubusercontent.com/u/32551062?v=4","gravatar_id":"","url":"https://api.github.com/users/B612-Asteroid-Institute","html_url":"https://github.com/B612-Asteroid-Institute","followers_url":"https://api.github.com/users/B612-Asteroid-Institute/followers","following_url":"https://api.github.com/users/B612-Asteroid-Institute/following{/other_user}","gists_url":"https://api.github.com/users/B612-Asteroid-Institute/gists{/gist_id}","starred_url":"https://api.github.com/users/B612-Asteroid-Institute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/B612-Asteroid-Institute/subscriptions","organizations_url":"https://api.github.com/users/B612-Asteroid-Institute/orgs","repos_url":"https://api.github.com/users/B612-Asteroid-Institute/repos","events_url":"https://api.github.com/users/B612-Asteroid-Institute/events{/privacy}","received_events_url":"https://api.github.com/users/B612-Asteroid-Institute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/B612-Asteroid-Institute/adam","description":"Asteroid Decision And Analysis Machine Client","fork":false,"url":"https://api.github.com/repos/B612-Asteroid-Institute/adam","forks_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/forks","keys_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/teams","hooks_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/hooks","issue_events_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/issues/events{/number}","events_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/events","assignees_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/assignees{/user}","branches_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/branches{/branch}","tags_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/tags","blobs_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/git/refs{/sha}","trees_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/statuses/{sha}","languages_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/languages","stargazers_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/stargazers","contributors_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/contributors","subscribers_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/subscribers","subscription_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/subscription","commits_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/commits{/sha}","git_commits_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/git/commits{/sha}","comments_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/comments{/number}","issue_comment_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/issues/comments{/number}","contents_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/contents/{+path}","compare_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/merges","archive_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/downloads","issues_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/issues{/number}","pulls_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls{/number}","milestones_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/milestones{/number}","notifications_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/labels{/name}","releases_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/releases{/id}","deployments_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/deployments","created_at":"2018-02-22T20:42:25Z","updated_at":"2018-04-07T02:53:03Z","pushed_at":"2018-04-05T20:19:24Z","git_url":"git://github.com/B612-Asteroid-Institute/adam.git","ssh_url":"git@github.com:B612-Asteroid-Institute/adam.git","clone_url":"https://github.com/B612-Asteroid-Institute/adam.git","svn_url":"https://github.com/B612-Asteroid-Institute/adam","homepage":null,"size":1686,"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":1,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":1,"open_issues":5,"watchers":4,"default_branch":"master"}},"base":{"label":"B612-Asteroid-Institute:master","ref":"master","sha":"e39094633d720253ebf92fbb2bceeaade21c6578","user":{"login":"B612-Asteroid-Institute","id":32551062,"avatar_url":"https://avatars1.githubusercontent.com/u/32551062?v=4","gravatar_id":"","url":"https://api.github.com/users/B612-Asteroid-Institute","html_url":"https://github.com/B612-Asteroid-Institute","followers_url":"https://api.github.com/users/B612-Asteroid-Institute/followers","following_url":"https://api.github.com/users/B612-Asteroid-Institute/following{/other_user}","gists_url":"https://api.github.com/users/B612-Asteroid-Institute/gists{/gist_id}","starred_url":"https://api.github.com/users/B612-Asteroid-Institute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/B612-Asteroid-Institute/subscriptions","organizations_url":"https://api.github.com/users/B612-Asteroid-Institute/orgs","repos_url":"https://api.github.com/users/B612-Asteroid-Institute/repos","events_url":"https://api.github.com/users/B612-Asteroid-Institute/events{/privacy}","received_events_url":"https://api.github.com/users/B612-Asteroid-Institute/received_events","type":"Organization","site_admin":false},"repo":{"id":122532890,"name":"adam","full_name":"B612-Asteroid-Institute/adam","owner":{"login":"B612-Asteroid-Institute","id":32551062,"avatar_url":"https://avatars1.githubusercontent.com/u/32551062?v=4","gravatar_id":"","url":"https://api.github.com/users/B612-Asteroid-Institute","html_url":"https://github.com/B612-Asteroid-Institute","followers_url":"https://api.github.com/users/B612-Asteroid-Institute/followers","following_url":"https://api.github.com/users/B612-Asteroid-Institute/following{/other_user}","gists_url":"https://api.github.com/users/B612-Asteroid-Institute/gists{/gist_id}","starred_url":"https://api.github.com/users/B612-Asteroid-Institute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/B612-Asteroid-Institute/subscriptions","organizations_url":"https://api.github.com/users/B612-Asteroid-Institute/orgs","repos_url":"https://api.github.com/users/B612-Asteroid-Institute/repos","events_url":"https://api.github.com/users/B612-Asteroid-Institute/events{/privacy}","received_events_url":"https://api.github.com/users/B612-Asteroid-Institute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/B612-Asteroid-Institute/adam","description":"Asteroid Decision And Analysis Machine Client","fork":false,"url":"https://api.github.com/repos/B612-Asteroid-Institute/adam","forks_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/forks","keys_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/teams","hooks_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/hooks","issue_events_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/issues/events{/number}","events_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/events","assignees_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/assignees{/user}","branches_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/branches{/branch}","tags_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/tags","blobs_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/git/refs{/sha}","trees_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/statuses/{sha}","languages_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/languages","stargazers_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/stargazers","contributors_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/contributors","subscribers_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/subscribers","subscription_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/subscription","commits_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/commits{/sha}","git_commits_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/git/commits{/sha}","comments_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/comments{/number}","issue_comment_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/issues/comments{/number}","contents_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/contents/{+path}","compare_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/merges","archive_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/downloads","issues_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/issues{/number}","pulls_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls{/number}","milestones_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/milestones{/number}","notifications_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/labels{/name}","releases_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/releases{/id}","deployments_url":"https://api.github.com/repos/B612-Asteroid-Institute/adam/deployments","created_at":"2018-02-22T20:42:25Z","updated_at":"2018-04-07T02:53:03Z","pushed_at":"2018-04-05T20:19:24Z","git_url":"git://github.com/B612-Asteroid-Institute/adam.git","ssh_url":"git@github.com:B612-Asteroid-Institute/adam.git","clone_url":"https://github.com/B612-Asteroid-Institute/adam.git","svn_url":"https://github.com/B612-Asteroid-Institute/adam","homepage":null,"size":1686,"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":1,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":1,"open_issues":5,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/34"},"html":{"href":"https://github.com/B612-Asteroid-Institute/adam/pull/34"},"issue":{"href":"https://api.github.com/repos/B612-Asteroid-Institute/adam/issues/34"},"comments":{"href":"https://api.github.com/repos/B612-Asteroid-Institute/adam/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/B612-Asteroid-Institute/adam/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/B612-Asteroid-Institute/adam/statuses/53e435dba884e10752aa728a4c4d15e8bd06303d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"HoodedCrow"}}