{"action":"created","comment":{"url":"https://api.github.com/repos/tardis-sn/tardis/pulls/comments/75441940","id":75441940,"diff_hunk":"@@ -29,14 +32,31 @@ def setup(self, request, reference, data_path, atomic_data_fname):\n \n         self.config_file = os.path.join(data_path['config_dirpath'], \"config.yml\")\n \n+        # A quick hack to use atom data per setup. Atom data is ingested from\n+        # local HDF or downloaded and cached from a url, depending on data_path\n+        # keys.\n+        atom_data_name = yaml.load(open(self.config_file))['atom_data']\n+\n+        # Get the path to HDF file:\n+        if 'atom_data_url' in data_path:\n+            # If the atom data is to be ingested from url:\n+            atom_data_filepath = download_file(\"{url}/{name}\".format(\n+                url=data_path['atom_data_url'], name=atom_data_name), cache=True\n+            )\n+        else:\n+            # If the atom data is to be ingested from local file:\n+            atom_data_filepath = \"{dirpath}/{name}\".format(","path":"tardis/tests/integration_tests/test_integration.py","position":38,"original_position":38,"commit_id":"8d8de89d7e57bef1895b3b2100d133c45af97256","original_commit_id":"8d8de89d7e57bef1895b3b2100d133c45af97256","user":{"login":"yeganer","id":6164110,"avatar_url":"https://avatars.githubusercontent.com/u/6164110?v=3","gravatar_id":"","url":"https://api.github.com/users/yeganer","html_url":"https://github.com/yeganer","followers_url":"https://api.github.com/users/yeganer/followers","following_url":"https://api.github.com/users/yeganer/following{/other_user}","gists_url":"https://api.github.com/users/yeganer/gists{/gist_id}","starred_url":"https://api.github.com/users/yeganer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeganer/subscriptions","organizations_url":"https://api.github.com/users/yeganer/orgs","repos_url":"https://api.github.com/users/yeganer/repos","events_url":"https://api.github.com/users/yeganer/events{/privacy}","received_events_url":"https://api.github.com/users/yeganer/received_events","type":"User","site_admin":false},"body":"Please use `os.path.join` instead of string formatting for the filepath.","created_at":"2016-08-19T08:02:05Z","updated_at":"2016-08-19T08:02:05Z","html_url":"https://github.com/tardis-sn/tardis/pull/653#discussion_r75441940","pull_request_url":"https://api.github.com/repos/tardis-sn/tardis/pulls/653","_links":{"self":{"href":"https://api.github.com/repos/tardis-sn/tardis/pulls/comments/75441940"},"html":{"href":"https://github.com/tardis-sn/tardis/pull/653#discussion_r75441940"},"pull_request":{"href":"https://api.github.com/repos/tardis-sn/tardis/pulls/653"}}},"pull_request":{"url":"https://api.github.com/repos/tardis-sn/tardis/pulls/653","id":81925411,"html_url":"https://github.com/tardis-sn/tardis/pull/653","diff_url":"https://github.com/tardis-sn/tardis/pull/653.diff","patch_url":"https://github.com/tardis-sn/tardis/pull/653.patch","issue_url":"https://api.github.com/repos/tardis-sn/tardis/issues/653","number":653,"state":"open","locked":false,"title":"Facility to provide per-setup atom data as well as save report locally.","user":{"login":"karandesai-96","id":10494087,"avatar_url":"https://avatars.githubusercontent.com/u/10494087?v=3","gravatar_id":"","url":"https://api.github.com/users/karandesai-96","html_url":"https://github.com/karandesai-96","followers_url":"https://api.github.com/users/karandesai-96/followers","following_url":"https://api.github.com/users/karandesai-96/following{/other_user}","gists_url":"https://api.github.com/users/karandesai-96/gists{/gist_id}","starred_url":"https://api.github.com/users/karandesai-96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karandesai-96/subscriptions","organizations_url":"https://api.github.com/users/karandesai-96/orgs","repos_url":"https://api.github.com/users/karandesai-96/repos","events_url":"https://api.github.com/users/karandesai-96/events{/privacy}","received_events_url":"https://api.github.com/users/karandesai-96/received_events","type":"User","site_admin":false},"body":"This PR focuses on adding flexibility to current integration testing infrastructure.\r\n\r\n### Facility for Atom Data files;\r\n* Till now only one atom data file ( generally `kurucz_cd23_chianti_H_He.h5` ) could be provided using the `--atomic-dataset` flag. Instead of this, the integration tests can now use the atom data file specified in the YAML config of a particular setup used for integration tests (in the sub directories of `tardis/tests/integration_tests` ).\r\n\r\n* The user has to put all the atom data files specified in config files of various setups in one directory and provide the directory path in integration tests YAML config file. Alternatively, these files can be served at a URL and that URL can also be provided.\r\n\r\n* The block schema in integration tests YAML config file looks like this:\r\n```yml\r\natom_data:\r\n    fetch: \"local\" # has two choices: \"local\" or \"remote\"\r\n    url: \"http://urlservingfiles.com\"\r\n    dirpath: \"/path/to/directory\"\r\n```\r\n* If `fetch` is set to local, then files will be taken from `dirpath` and `url` field will be ignored. Even writing it in isn't necessary in those cases. It will be the opposite case if `fetch: \"remote\"`.\r\n* Do add astropy's `--remote-data` flag as argument.\r\n* Example of URL serving atom data files: http://opensupernova.org/~karandesai96/atom_data\r\n\r\n### TO-DO: Local saving of report","created_at":"2016-08-19T04:35:47Z","updated_at":"2016-08-19T08:02:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a59e59ae235b2deeb1d8ff5036126f19c0a3f297","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tardis-sn/tardis/pulls/653/commits","review_comments_url":"https://api.github.com/repos/tardis-sn/tardis/pulls/653/comments","review_comment_url":"https://api.github.com/repos/tardis-sn/tardis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tardis-sn/tardis/issues/653/comments","statuses_url":"https://api.github.com/repos/tardis-sn/tardis/statuses/8d8de89d7e57bef1895b3b2100d133c45af97256","head":{"label":"karandesai-96:atom-data-and-report-local","ref":"atom-data-and-report-local","sha":"8d8de89d7e57bef1895b3b2100d133c45af97256","user":{"login":"karandesai-96","id":10494087,"avatar_url":"https://avatars.githubusercontent.com/u/10494087?v=3","gravatar_id":"","url":"https://api.github.com/users/karandesai-96","html_url":"https://github.com/karandesai-96","followers_url":"https://api.github.com/users/karandesai-96/followers","following_url":"https://api.github.com/users/karandesai-96/following{/other_user}","gists_url":"https://api.github.com/users/karandesai-96/gists{/gist_id}","starred_url":"https://api.github.com/users/karandesai-96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karandesai-96/subscriptions","organizations_url":"https://api.github.com/users/karandesai-96/orgs","repos_url":"https://api.github.com/users/karandesai-96/repos","events_url":"https://api.github.com/users/karandesai-96/events{/privacy}","received_events_url":"https://api.github.com/users/karandesai-96/received_events","type":"User","site_admin":false},"repo":{"id":51657654,"name":"tardis","full_name":"karandesai-96/tardis","owner":{"login":"karandesai-96","id":10494087,"avatar_url":"https://avatars.githubusercontent.com/u/10494087?v=3","gravatar_id":"","url":"https://api.github.com/users/karandesai-96","html_url":"https://github.com/karandesai-96","followers_url":"https://api.github.com/users/karandesai-96/followers","following_url":"https://api.github.com/users/karandesai-96/following{/other_user}","gists_url":"https://api.github.com/users/karandesai-96/gists{/gist_id}","starred_url":"https://api.github.com/users/karandesai-96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karandesai-96/subscriptions","organizations_url":"https://api.github.com/users/karandesai-96/orgs","repos_url":"https://api.github.com/users/karandesai-96/repos","events_url":"https://api.github.com/users/karandesai-96/events{/privacy}","received_events_url":"https://api.github.com/users/karandesai-96/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karandesai-96/tardis","description":"TARDIS - Temperature And Radiative Diffusion In Supernovae","fork":true,"url":"https://api.github.com/repos/karandesai-96/tardis","forks_url":"https://api.github.com/repos/karandesai-96/tardis/forks","keys_url":"https://api.github.com/repos/karandesai-96/tardis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karandesai-96/tardis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karandesai-96/tardis/teams","hooks_url":"https://api.github.com/repos/karandesai-96/tardis/hooks","issue_events_url":"https://api.github.com/repos/karandesai-96/tardis/issues/events{/number}","events_url":"https://api.github.com/repos/karandesai-96/tardis/events","assignees_url":"https://api.github.com/repos/karandesai-96/tardis/assignees{/user}","branches_url":"https://api.github.com/repos/karandesai-96/tardis/branches{/branch}","tags_url":"https://api.github.com/repos/karandesai-96/tardis/tags","blobs_url":"https://api.github.com/repos/karandesai-96/tardis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karandesai-96/tardis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karandesai-96/tardis/git/refs{/sha}","trees_url":"https://api.github.com/repos/karandesai-96/tardis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karandesai-96/tardis/statuses/{sha}","languages_url":"https://api.github.com/repos/karandesai-96/tardis/languages","stargazers_url":"https://api.github.com/repos/karandesai-96/tardis/stargazers","contributors_url":"https://api.github.com/repos/karandesai-96/tardis/contributors","subscribers_url":"https://api.github.com/repos/karandesai-96/tardis/subscribers","subscription_url":"https://api.github.com/repos/karandesai-96/tardis/subscription","commits_url":"https://api.github.com/repos/karandesai-96/tardis/commits{/sha}","git_commits_url":"https://api.github.com/repos/karandesai-96/tardis/git/commits{/sha}","comments_url":"https://api.github.com/repos/karandesai-96/tardis/comments{/number}","issue_comment_url":"https://api.github.com/repos/karandesai-96/tardis/issues/comments{/number}","contents_url":"https://api.github.com/repos/karandesai-96/tardis/contents/{+path}","compare_url":"https://api.github.com/repos/karandesai-96/tardis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karandesai-96/tardis/merges","archive_url":"https://api.github.com/repos/karandesai-96/tardis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karandesai-96/tardis/downloads","issues_url":"https://api.github.com/repos/karandesai-96/tardis/issues{/number}","pulls_url":"https://api.github.com/repos/karandesai-96/tardis/pulls{/number}","milestones_url":"https://api.github.com/repos/karandesai-96/tardis/milestones{/number}","notifications_url":"https://api.github.com/repos/karandesai-96/tardis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karandesai-96/tardis/labels{/name}","releases_url":"https://api.github.com/repos/karandesai-96/tardis/releases{/id}","deployments_url":"https://api.github.com/repos/karandesai-96/tardis/deployments","created_at":"2016-02-13T17:50:23Z","updated_at":"2016-02-13T17:50:24Z","pushed_at":"2016-08-19T04:18:42Z","git_url":"git://github.com/karandesai-96/tardis.git","ssh_url":"git@github.com:karandesai-96/tardis.git","clone_url":"https://github.com/karandesai-96/tardis.git","svn_url":"https://github.com/karandesai-96/tardis","homepage":"","size":21810,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tardis-sn:master","ref":"master","sha":"3e55c131b553494db736bf6a97f427565a547ca2","user":{"login":"tardis-sn","id":6108234,"avatar_url":"https://avatars.githubusercontent.com/u/6108234?v=3","gravatar_id":"","url":"https://api.github.com/users/tardis-sn","html_url":"https://github.com/tardis-sn","followers_url":"https://api.github.com/users/tardis-sn/followers","following_url":"https://api.github.com/users/tardis-sn/following{/other_user}","gists_url":"https://api.github.com/users/tardis-sn/gists{/gist_id}","starred_url":"https://api.github.com/users/tardis-sn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tardis-sn/subscriptions","organizations_url":"https://api.github.com/users/tardis-sn/orgs","repos_url":"https://api.github.com/users/tardis-sn/repos","events_url":"https://api.github.com/users/tardis-sn/events{/privacy}","received_events_url":"https://api.github.com/users/tardis-sn/received_events","type":"Organization","site_admin":false},"repo":{"id":2938270,"name":"tardis","full_name":"tardis-sn/tardis","owner":{"login":"tardis-sn","id":6108234,"avatar_url":"https://avatars.githubusercontent.com/u/6108234?v=3","gravatar_id":"","url":"https://api.github.com/users/tardis-sn","html_url":"https://github.com/tardis-sn","followers_url":"https://api.github.com/users/tardis-sn/followers","following_url":"https://api.github.com/users/tardis-sn/following{/other_user}","gists_url":"https://api.github.com/users/tardis-sn/gists{/gist_id}","starred_url":"https://api.github.com/users/tardis-sn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tardis-sn/subscriptions","organizations_url":"https://api.github.com/users/tardis-sn/orgs","repos_url":"https://api.github.com/users/tardis-sn/repos","events_url":"https://api.github.com/users/tardis-sn/events{/privacy}","received_events_url":"https://api.github.com/users/tardis-sn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tardis-sn/tardis","description":"TARDIS - Temperature And Radiative Diffusion In Supernovae","fork":false,"url":"https://api.github.com/repos/tardis-sn/tardis","forks_url":"https://api.github.com/repos/tardis-sn/tardis/forks","keys_url":"https://api.github.com/repos/tardis-sn/tardis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tardis-sn/tardis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tardis-sn/tardis/teams","hooks_url":"https://api.github.com/repos/tardis-sn/tardis/hooks","issue_events_url":"https://api.github.com/repos/tardis-sn/tardis/issues/events{/number}","events_url":"https://api.github.com/repos/tardis-sn/tardis/events","assignees_url":"https://api.github.com/repos/tardis-sn/tardis/assignees{/user}","branches_url":"https://api.github.com/repos/tardis-sn/tardis/branches{/branch}","tags_url":"https://api.github.com/repos/tardis-sn/tardis/tags","blobs_url":"https://api.github.com/repos/tardis-sn/tardis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tardis-sn/tardis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tardis-sn/tardis/git/refs{/sha}","trees_url":"https://api.github.com/repos/tardis-sn/tardis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tardis-sn/tardis/statuses/{sha}","languages_url":"https://api.github.com/repos/tardis-sn/tardis/languages","stargazers_url":"https://api.github.com/repos/tardis-sn/tardis/stargazers","contributors_url":"https://api.github.com/repos/tardis-sn/tardis/contributors","subscribers_url":"https://api.github.com/repos/tardis-sn/tardis/subscribers","subscription_url":"https://api.github.com/repos/tardis-sn/tardis/subscription","commits_url":"https://api.github.com/repos/tardis-sn/tardis/commits{/sha}","git_commits_url":"https://api.github.com/repos/tardis-sn/tardis/git/commits{/sha}","comments_url":"https://api.github.com/repos/tardis-sn/tardis/comments{/number}","issue_comment_url":"https://api.github.com/repos/tardis-sn/tardis/issues/comments{/number}","contents_url":"https://api.github.com/repos/tardis-sn/tardis/contents/{+path}","compare_url":"https://api.github.com/repos/tardis-sn/tardis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tardis-sn/tardis/merges","archive_url":"https://api.github.com/repos/tardis-sn/tardis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tardis-sn/tardis/downloads","issues_url":"https://api.github.com/repos/tardis-sn/tardis/issues{/number}","pulls_url":"https://api.github.com/repos/tardis-sn/tardis/pulls{/number}","milestones_url":"https://api.github.com/repos/tardis-sn/tardis/milestones{/number}","notifications_url":"https://api.github.com/repos/tardis-sn/tardis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tardis-sn/tardis/labels{/name}","releases_url":"https://api.github.com/repos/tardis-sn/tardis/releases{/id}","deployments_url":"https://api.github.com/repos/tardis-sn/tardis/deployments","created_at":"2011-12-08T06:20:19Z","updated_at":"2016-07-19T08:30:58Z","pushed_at":"2016-08-19T04:35:47Z","git_url":"git://github.com/tardis-sn/tardis.git","ssh_url":"git@github.com:tardis-sn/tardis.git","clone_url":"https://github.com/tardis-sn/tardis.git","svn_url":"https://github.com/tardis-sn/tardis","homepage":"","size":199043,"stargazers_count":33,"watchers_count":33,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":110,"mirror_url":null,"open_issues_count":92,"forks":110,"open_issues":92,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tardis-sn/tardis/pulls/653"},"html":{"href":"https://github.com/tardis-sn/tardis/pull/653"},"issue":{"href":"https://api.github.com/repos/tardis-sn/tardis/issues/653"},"comments":{"href":"https://api.github.com/repos/tardis-sn/tardis/issues/653/comments"},"review_comments":{"href":"https://api.github.com/repos/tardis-sn/tardis/pulls/653/comments"},"review_comment":{"href":"https://api.github.com/repos/tardis-sn/tardis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tardis-sn/tardis/pulls/653/commits"},"statuses":{"href":"https://api.github.com/repos/tardis-sn/tardis/statuses/8d8de89d7e57bef1895b3b2100d133c45af97256"}}}}
{"actor":{"display_login":"yeganer"}}