{"action":"created","comment":{"url":"https://api.github.com/repos/tardis-sn/tardis/pulls/comments/62842356","id":62842356,"diff_hunk":"@@ -0,0 +1,175 @@\n+import os\n+import yaml\n+import h5py\n+import numpy as np\n+import pytest\n+from numpy.testing import assert_allclose\n+from astropy import units as u\n+\n+from tardis.simulation.base import Simulation\n+from tardis.model import Radial1DModel\n+from tardis.io.config_reader import Configuration\n+\n+\n+def data_path(fname):\n+    return os.path.join(os.path.dirname(os.path.realpath(__file__)), \"w7\", fname)\n+\n+\n+@pytest.mark.skipif(not pytest.config.getoption(\"--slow\"),\n+                    reason=\"slow tests can only be run using --slow\")\n+@pytest.mark.skipif(not pytest.config.getvalue(\"slow-test-data\"),\n+                    reason=\"--slow-test-data was not specified\")\n+@pytest.mark.skipif(not pytest.config.getvalue(\"atomic-dataset\"),\n+                    reason=\"--atomic-dataset was not specified\")\n+class TestW7(object):\n+    \"\"\"\n+    Slow integration test for Stratified W7 setup.\n+\n+    Assumed two compressed binaries (.npz) are placed in `slow-test-data/w7`\n+    directory, whose path is provided by command line argument:\n+\n+    * ndarrays.npz                       | * quantities.npz\n+    Contents (all (.npy)):               | Contents (all (.npy)):\n+        * last_interaction_type          |     * t_rads\n+        * last_line_interaction_out_id   |     * luminosity_inner\n+        * last_line_interaction_in_id    |     * montecarlo_luminosity\n+        * j_estimators                   |     * montecarlo_virtual_luminousity\n+        * j_blue_estimators              |     * time_of_simulation\n+        * last_line_interaction_shell_id |     * montecarlo_nu\n+        * nubar_estimators               |     * last_line_interaction_angstrom\n+        * ws                             |     * j_blues_norm_factor\n+    \"\"\"\n+\n+    @classmethod\n+    @pytest.fixture(scope=\"class\", autouse=True)\n+    def setup(self):\n+        \"\"\"\n+        This method does initial setup of creating configuration and performing\n+        a single run of integration test.\n+        \"\"\"\n+        self.config_file = data_path(\"config_w7.yml\")\n+        self.abundances = data_path(\"abundancies_w7.dat\")\n+        self.densities = data_path(\"densities_w7.dat\")\n+\n+        # First we check whether atom data file exists at desired path.\n+        self.atom_data_filename = os.path.expanduser(os.path.expandvars(\n+                                    pytest.config.getvalue('atomic-dataset')))\n+        assert os.path.exists(self.atom_data_filename), \\\n+            \"{0} atom data file does not exist\".format(self.atom_data_filename)\n+\n+        # We now check that the baseline data for slow tests was obtained using\n+        # the same atomic dataset as the one used in current test run.\n+        # TODO: This is a quick workaround, generalize it.\n+\n+        kurucz_data_file_uuid = \"5ca3035ca8b311e3bb684437e69d75d7\"","path":"tardis/tests/tests_slow/test_w7.py","position":64,"original_position":64,"commit_id":"1119315c733d728a1c49ea64ce00ecfeaf684983","original_commit_id":"1119315c733d728a1c49ea64ce00ecfeaf684983","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":"Oh, so after the run, I obtain the `radial1d_model` and that would enable comparison, right ? But wouldn't it be a bit time expensive ? Waiting for twenty minutes or more and finally seeing that the test failed because atom data files weren't same ? Is it fine ?","created_at":"2016-05-11T12:56:43Z","updated_at":"2016-05-11T12:56:43Z","html_url":"https://github.com/tardis-sn/tardis/pull/558#discussion_r62842356","pull_request_url":"https://api.github.com/repos/tardis-sn/tardis/pulls/558","_links":{"self":{"href":"https://api.github.com/repos/tardis-sn/tardis/pulls/comments/62842356"},"html":{"href":"https://github.com/tardis-sn/tardis/pull/558#discussion_r62842356"},"pull_request":{"href":"https://api.github.com/repos/tardis-sn/tardis/pulls/558"}}},"pull_request":{"url":"https://api.github.com/repos/tardis-sn/tardis/pulls/558","id":69290656,"html_url":"https://github.com/tardis-sn/tardis/pull/558","diff_url":"https://github.com/tardis-sn/tardis/pull/558.diff","patch_url":"https://github.com/tardis-sn/tardis/pull/558.patch","issue_url":"https://api.github.com/repos/tardis-sn/tardis/issues/558","number":558,"state":"open","locked":false,"title":"Integration Test class for Stratified W7 setup.","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 addition and proper functioning of an integration test class for Stratified W7 setup. This test is classified as a **slow test** due to its time taken for a run on single core.\r\n\r\nImportant components added:\r\n- [X] **Configuration file**: `tardis/tests/tests_slow/w7/config_w7.yml`\r\n- [X] **Abundances profile**: `tardis/tests/tests_slow/w7/abundances_w7.dat`\r\n- [X] **Densities profile**: `tardis/tests/tests_slow/w7/densities_w7.dat`\r\n- [X] **Integration test class**: `tardis/tests/tests_slow/test_w7.py`\r\n\r\nOther relevant documentation is added in Integration test itself.","created_at":"2016-05-09T03:07:18Z","updated_at":"2016-05-11T12:56:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"348240b24b7dec4e71114e241a49d5d455e83daf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tardis-sn/tardis/pulls/558/commits","review_comments_url":"https://api.github.com/repos/tardis-sn/tardis/pulls/558/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/558/comments","statuses_url":"https://api.github.com/repos/tardis-sn/tardis/statuses/1119315c733d728a1c49ea64ce00ecfeaf684983","head":{"label":"karandesai-96:w7-integration-test-class","ref":"w7-integration-test-class","sha":"1119315c733d728a1c49ea64ce00ecfeaf684983","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-05-11T12:40:22Z","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":17640,"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":"356f2dcfe4bffa52c5d43d57fe01c19a267d27a0","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-03-28T13:53:14Z","pushed_at":"2016-05-11T12:40:22Z","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":194395,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":112,"mirror_url":null,"open_issues_count":83,"forks":112,"open_issues":83,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tardis-sn/tardis/pulls/558"},"html":{"href":"https://github.com/tardis-sn/tardis/pull/558"},"issue":{"href":"https://api.github.com/repos/tardis-sn/tardis/issues/558"},"comments":{"href":"https://api.github.com/repos/tardis-sn/tardis/issues/558/comments"},"review_comments":{"href":"https://api.github.com/repos/tardis-sn/tardis/pulls/558/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/558/commits"},"statuses":{"href":"https://api.github.com/repos/tardis-sn/tardis/statuses/1119315c733d728a1c49ea64ce00ecfeaf684983"}}}}