{"action":"created","comment":{"url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments/232794306","pull_request_review_id":174071588,"id":232794306,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjc5NDMwNg==","diff_hunk":"@@ -85,79 +103,108 @@ static_assert(\n                              VariablesTestTags_detail::vector>>>::value,\n     \"Missing move semantics in Variables.\");\n \n-SPECTRE_TEST_CASE(\"Unit.DataStructures.Variables\", \"[DataStructures][Unit]\") {\n-  Variables<tmpl::list<VariablesTestTags_detail::vector,\n-                       VariablesTestTags_detail::scalar,\n-                       VariablesTestTags_detail::scalar2>>\n-      v(1, -3.0);\n-  decltype(v) v_initialize;\n-  v_initialize.initialize(1, -3.0);\n-  CHECK(v == v_initialize);\n-\n-  CHECK(v.size() ==\n-        v.number_of_grid_points() * v.number_of_independent_components);\n-\n-  CHECK(1 == v.number_of_grid_points());\n-  CHECK(5 == v.size());\n-\n-  auto& vector_in_v = get<VariablesTestTags_detail::vector>(v);\n+template <typename VectorType>\n+void test_variables_construction_and_access() noexcept {\n+  MAKE_GENERATOR(gen);\n+  UniformCustomDistribution<\n+      typename tt::get_fundamental_type_t<typename VectorType::value_type>>\n+      dist{-100, 100};\n+\n+  size_t number_of_grid_points = 1;","path":"tests/Unit/DataStructures/Test_Variables.cpp","position":99,"original_position":85,"commit_id":"dfa16dad8c4490914c97d5cfc0dfa0564785f068","original_commit_id":"9820eb91c0fa6ca5fa0dcbe4f631808d4cb0f6a9","user":{"login":"nilsdeppe","id":13531030,"node_id":"MDQ6VXNlcjEzNTMxMDMw","avatar_url":"https://avatars3.githubusercontent.com/u/13531030?v=4","gravatar_id":"","url":"https://api.github.com/users/nilsdeppe","html_url":"https://github.com/nilsdeppe","followers_url":"https://api.github.com/users/nilsdeppe/followers","following_url":"https://api.github.com/users/nilsdeppe/following{/other_user}","gists_url":"https://api.github.com/users/nilsdeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/nilsdeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilsdeppe/subscriptions","organizations_url":"https://api.github.com/users/nilsdeppe/orgs","repos_url":"https://api.github.com/users/nilsdeppe/repos","events_url":"https://api.github.com/users/nilsdeppe/events{/privacy}","received_events_url":"https://api.github.com/users/nilsdeppe/received_events","type":"User","site_admin":false},"body":"Okay, maybe we should have a 2 point vector for the stream test, and 5 for the others then :) Just to make sure stream is working correctly with multiple grid points.","created_at":"2018-11-12T20:03:35Z","updated_at":"2018-11-12T20:03:35Z","html_url":"https://github.com/sxs-collaboration/spectre/pull/1139#discussion_r232794306","pull_request_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1139","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments/232794306"},"html":{"href":"https://github.com/sxs-collaboration/spectre/pull/1139#discussion_r232794306"},"pull_request":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1139"}},"in_reply_to_id":232771616},"pull_request":{"url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1139","id":228451328,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NDUxMzI4","html_url":"https://github.com/sxs-collaboration/spectre/pull/1139","diff_url":"https://github.com/sxs-collaboration/spectre/pull/1139.diff","patch_url":"https://github.com/sxs-collaboration/spectre/pull/1139.patch","issue_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/1139","number":1139,"state":"open","locked":false,"title":"Template Variables on contained type","user":{"login":"moxcodes","id":32072858,"node_id":"MDQ6VXNlcjMyMDcyODU4","avatar_url":"https://avatars0.githubusercontent.com/u/32072858?v=4","gravatar_id":"","url":"https://api.github.com/users/moxcodes","html_url":"https://github.com/moxcodes","followers_url":"https://api.github.com/users/moxcodes/followers","following_url":"https://api.github.com/users/moxcodes/following{/other_user}","gists_url":"https://api.github.com/users/moxcodes/gists{/gist_id}","starred_url":"https://api.github.com/users/moxcodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moxcodes/subscriptions","organizations_url":"https://api.github.com/users/moxcodes/orgs","repos_url":"https://api.github.com/users/moxcodes/repos","events_url":"https://api.github.com/users/moxcodes/events{/privacy}","received_events_url":"https://api.github.com/users/moxcodes/received_events","type":"User","site_admin":false},"body":"## Proposed changes\r\n\r\n- Tensor is templated on type, so Variables can easily be templated on the type\r\n  to be stored in the Tensor.\r\n- Necessary for usage of extensions such as ComplexDataVector\r\n- Update tests to be a single test case and to use random variables where\r\n  possible\r\n\r\nNew data structures which take advantage of this templating should add tests to the Variables test case, as well as extending the Tensor static_asserts. I will do this for ComplexDataVector, and include additional documentation in the datavectorimpl PR explaining these extra implications.  \r\n\r\nNote: the type inference from the tags now requires there to be at least 1 tag for the variables class. I understand it was deliberately permitted to have a tagless variables type, but the only thing that broke when I added that `static_assert` was the empty variables test case. So, unless there is a compelling reason to add extra syntax (probably SFINAE) around an empty variables, I think it seems cleaner to just demand non-empty variables.\r\n\r\n### Types of changes:\r\n\r\n- [ ] New feature\r\n\r\n### Component:\r\n\r\n- [ ] Code\r\n\r\n### Code review checklist\r\n\r\n- [ ] The PR passes all checks, including unit tests, `clang-tidy` and `IWYU`. For\r\n  instructions on how to perform the CI checks locally refer to the [Dev guide\r\n  on the Travis CI](https://spectre-code.org/travis_guide.html).\r\n- [ ] The code is documented and the documentation renders correctly. Run `make doc`\r\n  to generate the documentation locally into `BUILD_DIR/docs/html`. Then open\r\n  `index.html`.\r\n- [ ] The code follows the stylistic and code quality guidelines listed in the\r\n  [code review guide](https://spectre-code.org/code_review_guide.html).\r\n","created_at":"2018-11-05T18:41:09Z","updated_at":"2018-11-12T20:03:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"daf838be7c8d7d3a29f6f4d29c178fd6eb126b45","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1139/commits","review_comments_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1139/comments","review_comment_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/1139/comments","statuses_url":"https://api.github.com/repos/sxs-collaboration/spectre/statuses/dfa16dad8c4490914c97d5cfc0dfa0564785f068","head":{"label":"moxcodes:templatevariables","ref":"templatevariables","sha":"dfa16dad8c4490914c97d5cfc0dfa0564785f068","user":{"login":"moxcodes","id":32072858,"node_id":"MDQ6VXNlcjMyMDcyODU4","avatar_url":"https://avatars0.githubusercontent.com/u/32072858?v=4","gravatar_id":"","url":"https://api.github.com/users/moxcodes","html_url":"https://github.com/moxcodes","followers_url":"https://api.github.com/users/moxcodes/followers","following_url":"https://api.github.com/users/moxcodes/following{/other_user}","gists_url":"https://api.github.com/users/moxcodes/gists{/gist_id}","starred_url":"https://api.github.com/users/moxcodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moxcodes/subscriptions","organizations_url":"https://api.github.com/users/moxcodes/orgs","repos_url":"https://api.github.com/users/moxcodes/repos","events_url":"https://api.github.com/users/moxcodes/events{/privacy}","received_events_url":"https://api.github.com/users/moxcodes/received_events","type":"User","site_admin":false},"repo":{"id":147872565,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc4NzI1NjU=","name":"spectre","full_name":"moxcodes/spectre","private":false,"owner":{"login":"moxcodes","id":32072858,"node_id":"MDQ6VXNlcjMyMDcyODU4","avatar_url":"https://avatars0.githubusercontent.com/u/32072858?v=4","gravatar_id":"","url":"https://api.github.com/users/moxcodes","html_url":"https://github.com/moxcodes","followers_url":"https://api.github.com/users/moxcodes/followers","following_url":"https://api.github.com/users/moxcodes/following{/other_user}","gists_url":"https://api.github.com/users/moxcodes/gists{/gist_id}","starred_url":"https://api.github.com/users/moxcodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moxcodes/subscriptions","organizations_url":"https://api.github.com/users/moxcodes/orgs","repos_url":"https://api.github.com/users/moxcodes/repos","events_url":"https://api.github.com/users/moxcodes/events{/privacy}","received_events_url":"https://api.github.com/users/moxcodes/received_events","type":"User","site_admin":false},"html_url":"https://github.com/moxcodes/spectre","description":"SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.","fork":true,"url":"https://api.github.com/repos/moxcodes/spectre","forks_url":"https://api.github.com/repos/moxcodes/spectre/forks","keys_url":"https://api.github.com/repos/moxcodes/spectre/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moxcodes/spectre/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moxcodes/spectre/teams","hooks_url":"https://api.github.com/repos/moxcodes/spectre/hooks","issue_events_url":"https://api.github.com/repos/moxcodes/spectre/issues/events{/number}","events_url":"https://api.github.com/repos/moxcodes/spectre/events","assignees_url":"https://api.github.com/repos/moxcodes/spectre/assignees{/user}","branches_url":"https://api.github.com/repos/moxcodes/spectre/branches{/branch}","tags_url":"https://api.github.com/repos/moxcodes/spectre/tags","blobs_url":"https://api.github.com/repos/moxcodes/spectre/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moxcodes/spectre/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moxcodes/spectre/git/refs{/sha}","trees_url":"https://api.github.com/repos/moxcodes/spectre/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moxcodes/spectre/statuses/{sha}","languages_url":"https://api.github.com/repos/moxcodes/spectre/languages","stargazers_url":"https://api.github.com/repos/moxcodes/spectre/stargazers","contributors_url":"https://api.github.com/repos/moxcodes/spectre/contributors","subscribers_url":"https://api.github.com/repos/moxcodes/spectre/subscribers","subscription_url":"https://api.github.com/repos/moxcodes/spectre/subscription","commits_url":"https://api.github.com/repos/moxcodes/spectre/commits{/sha}","git_commits_url":"https://api.github.com/repos/moxcodes/spectre/git/commits{/sha}","comments_url":"https://api.github.com/repos/moxcodes/spectre/comments{/number}","issue_comment_url":"https://api.github.com/repos/moxcodes/spectre/issues/comments{/number}","contents_url":"https://api.github.com/repos/moxcodes/spectre/contents/{+path}","compare_url":"https://api.github.com/repos/moxcodes/spectre/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moxcodes/spectre/merges","archive_url":"https://api.github.com/repos/moxcodes/spectre/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moxcodes/spectre/downloads","issues_url":"https://api.github.com/repos/moxcodes/spectre/issues{/number}","pulls_url":"https://api.github.com/repos/moxcodes/spectre/pulls{/number}","milestones_url":"https://api.github.com/repos/moxcodes/spectre/milestones{/number}","notifications_url":"https://api.github.com/repos/moxcodes/spectre/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moxcodes/spectre/labels{/name}","releases_url":"https://api.github.com/repos/moxcodes/spectre/releases{/id}","deployments_url":"https://api.github.com/repos/moxcodes/spectre/deployments","created_at":"2018-09-07T20:39:07Z","updated_at":"2018-10-09T16:59:35Z","pushed_at":"2018-11-12T17:58:37Z","git_url":"git://github.com/moxcodes/spectre.git","ssh_url":"git@github.com:moxcodes/spectre.git","clone_url":"https://github.com/moxcodes/spectre.git","svn_url":"https://github.com/moxcodes/spectre","homepage":"","size":12055,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"sxs-collaboration:develop","ref":"develop","sha":"8448edaf8e9994f214d4d4e7285d2392a8af390c","user":{"login":"sxs-collaboration","id":26882595,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2ODgyNTk1","avatar_url":"https://avatars2.githubusercontent.com/u/26882595?v=4","gravatar_id":"","url":"https://api.github.com/users/sxs-collaboration","html_url":"https://github.com/sxs-collaboration","followers_url":"https://api.github.com/users/sxs-collaboration/followers","following_url":"https://api.github.com/users/sxs-collaboration/following{/other_user}","gists_url":"https://api.github.com/users/sxs-collaboration/gists{/gist_id}","starred_url":"https://api.github.com/users/sxs-collaboration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sxs-collaboration/subscriptions","organizations_url":"https://api.github.com/users/sxs-collaboration/orgs","repos_url":"https://api.github.com/users/sxs-collaboration/repos","events_url":"https://api.github.com/users/sxs-collaboration/events{/privacy}","received_events_url":"https://api.github.com/users/sxs-collaboration/received_events","type":"Organization","site_admin":false},"repo":{"id":87570510,"node_id":"MDEwOlJlcG9zaXRvcnk4NzU3MDUxMA==","name":"spectre","full_name":"sxs-collaboration/spectre","private":false,"owner":{"login":"sxs-collaboration","id":26882595,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2ODgyNTk1","avatar_url":"https://avatars2.githubusercontent.com/u/26882595?v=4","gravatar_id":"","url":"https://api.github.com/users/sxs-collaboration","html_url":"https://github.com/sxs-collaboration","followers_url":"https://api.github.com/users/sxs-collaboration/followers","following_url":"https://api.github.com/users/sxs-collaboration/following{/other_user}","gists_url":"https://api.github.com/users/sxs-collaboration/gists{/gist_id}","starred_url":"https://api.github.com/users/sxs-collaboration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sxs-collaboration/subscriptions","organizations_url":"https://api.github.com/users/sxs-collaboration/orgs","repos_url":"https://api.github.com/users/sxs-collaboration/repos","events_url":"https://api.github.com/users/sxs-collaboration/events{/privacy}","received_events_url":"https://api.github.com/users/sxs-collaboration/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/sxs-collaboration/spectre","description":"SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.","fork":false,"url":"https://api.github.com/repos/sxs-collaboration/spectre","forks_url":"https://api.github.com/repos/sxs-collaboration/spectre/forks","keys_url":"https://api.github.com/repos/sxs-collaboration/spectre/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sxs-collaboration/spectre/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sxs-collaboration/spectre/teams","hooks_url":"https://api.github.com/repos/sxs-collaboration/spectre/hooks","issue_events_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/events{/number}","events_url":"https://api.github.com/repos/sxs-collaboration/spectre/events","assignees_url":"https://api.github.com/repos/sxs-collaboration/spectre/assignees{/user}","branches_url":"https://api.github.com/repos/sxs-collaboration/spectre/branches{/branch}","tags_url":"https://api.github.com/repos/sxs-collaboration/spectre/tags","blobs_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/refs{/sha}","trees_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sxs-collaboration/spectre/statuses/{sha}","languages_url":"https://api.github.com/repos/sxs-collaboration/spectre/languages","stargazers_url":"https://api.github.com/repos/sxs-collaboration/spectre/stargazers","contributors_url":"https://api.github.com/repos/sxs-collaboration/spectre/contributors","subscribers_url":"https://api.github.com/repos/sxs-collaboration/spectre/subscribers","subscription_url":"https://api.github.com/repos/sxs-collaboration/spectre/subscription","commits_url":"https://api.github.com/repos/sxs-collaboration/spectre/commits{/sha}","git_commits_url":"https://api.github.com/repos/sxs-collaboration/spectre/git/commits{/sha}","comments_url":"https://api.github.com/repos/sxs-collaboration/spectre/comments{/number}","issue_comment_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues/comments{/number}","contents_url":"https://api.github.com/repos/sxs-collaboration/spectre/contents/{+path}","compare_url":"https://api.github.com/repos/sxs-collaboration/spectre/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sxs-collaboration/spectre/merges","archive_url":"https://api.github.com/repos/sxs-collaboration/spectre/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sxs-collaboration/spectre/downloads","issues_url":"https://api.github.com/repos/sxs-collaboration/spectre/issues{/number}","pulls_url":"https://api.github.com/repos/sxs-collaboration/spectre/pulls{/number}","milestones_url":"https://api.github.com/repos/sxs-collaboration/spectre/milestones{/number}","notifications_url":"https://api.github.com/repos/sxs-collaboration/spectre/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sxs-collaboration/spectre/labels{/name}","releases_url":"https://api.github.com/repos/sxs-collaboration/spectre/releases{/id}","deployments_url":"https://api.github.com/repos/sxs-collaboration/spectre/deployments","created_at":"2017-04-07T17:28:20Z","updated_at":"2018-11-12T18:40:30Z","pushed_at":"2018-11-12T19:36:21Z","git_url":"git://github.com/sxs-collaboration/spectre.git","ssh_url":"git@github.com:sxs-collaboration/spectre.git","clone_url":"https://github.com/sxs-collaboration/spectre.git","svn_url":"https://github.com/sxs-collaboration/spectre","homepage":"","size":13074,"stargazers_count":29,"watchers_count":29,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":34,"mirror_url":null,"archived":false,"open_issues_count":181,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":34,"open_issues":181,"watchers":29,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1139"},"html":{"href":"https://github.com/sxs-collaboration/spectre/pull/1139"},"issue":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/issues/1139"},"comments":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/issues/1139/comments"},"review_comments":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1139/comments"},"review_comment":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/pulls/1139/commits"},"statuses":{"href":"https://api.github.com/repos/sxs-collaboration/spectre/statuses/dfa16dad8c4490914c97d5cfc0dfa0564785f068"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nilsdeppe"}}