{"action":"created","comment":{"url":"https://api.github.com/repos/madeinussr/exop_props/pulls/comments/231910891","pull_request_review_id":172986160,"id":231910891,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTkxMDg5MQ==","diff_hunk":"@@ -0,0 +1,53 @@\n+defmodule ExopProps.CommonGenerators do\n+  @moduledoc \"\"\"\n+  Functions to create and combine generators.\n+  \"\"\"\n+\n+  alias StreamData.LazyTree\n+\n+  @rand_algorithm :exsp\n+\n+  @spec map([StreamData.t()], [atom()], [atom()]) :: StreamData.t()\n+  def map(map_generator, required_keys, optional_keys) do\n+    optional_keys_data = sublist(optional_keys)\n+\n+    new(fn seed, size ->\n+      {seed1, seed2} = split_seed(seed)\n+      subkeys_tree = call(optional_keys_data, seed1, size)\n+\n+      map_generator\n+      |> Map.take(required_keys ++ subkeys_tree.root)\n+      |> StreamData.fixed_map()\n+      |> call(seed2, size)\n+      |> LazyTree.map(fn fixed_map ->\n+        LazyTree.map(subkeys_tree, fn keys ->\n+          Map.take(fixed_map, required_keys ++ keys)\n+        end)\n+      end)\n+      |> LazyTree.flatten()\n+    end)\n+  end\n+\n+  defp sublist(list) do","path":"lib/exop_props/common_generators.ex","position":31,"original_position":31,"commit_id":"cfae72c06d66f18da40f639b3831d28daecba464","original_commit_id":"cfae72c06d66f18da40f639b3831d28daecba464","user":{"login":"madeinussr","id":1419763,"node_id":"MDQ6VXNlcjE0MTk3NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1419763?v=4","gravatar_id":"","url":"https://api.github.com/users/madeinussr","html_url":"https://github.com/madeinussr","followers_url":"https://api.github.com/users/madeinussr/followers","following_url":"https://api.github.com/users/madeinussr/following{/other_user}","gists_url":"https://api.github.com/users/madeinussr/gists{/gist_id}","starred_url":"https://api.github.com/users/madeinussr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madeinussr/subscriptions","organizations_url":"https://api.github.com/users/madeinussr/orgs","repos_url":"https://api.github.com/users/madeinussr/repos","events_url":"https://api.github.com/users/madeinussr/events{/privacy}","received_events_url":"https://api.github.com/users/madeinussr/received_events","type":"User","site_admin":false},"body":"spec plz","created_at":"2018-11-08T14:36:16Z","updated_at":"2018-11-08T14:37:21Z","html_url":"https://github.com/madeinussr/exop_props/pull/4#discussion_r231910891","pull_request_url":"https://api.github.com/repos/madeinussr/exop_props/pulls/4","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/madeinussr/exop_props/pulls/comments/231910891"},"html":{"href":"https://github.com/madeinussr/exop_props/pull/4#discussion_r231910891"},"pull_request":{"href":"https://api.github.com/repos/madeinussr/exop_props/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/madeinussr/exop_props/pulls/4","id":229385387,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5Mzg1Mzg3","html_url":"https://github.com/madeinussr/exop_props/pull/4","diff_url":"https://github.com/madeinussr/exop_props/pull/4.diff","patch_url":"https://github.com/madeinussr/exop_props/pull/4.patch","issue_url":"https://api.github.com/repos/madeinussr/exop_props/issues/4","number":4,"state":"open","locked":false,"title":"respect required opt","user":{"login":"llxff","id":866273,"node_id":"MDQ6VXNlcjg2NjI3Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/866273?v=4","gravatar_id":"","url":"https://api.github.com/users/llxff","html_url":"https://github.com/llxff","followers_url":"https://api.github.com/users/llxff/followers","following_url":"https://api.github.com/users/llxff/following{/other_user}","gists_url":"https://api.github.com/users/llxff/gists{/gist_id}","starred_url":"https://api.github.com/users/llxff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llxff/subscriptions","organizations_url":"https://api.github.com/users/llxff/orgs","repos_url":"https://api.github.com/users/llxff/repos","events_url":"https://api.github.com/users/llxff/events{/privacy}","received_events_url":"https://api.github.com/users/llxff/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-08T14:35:14Z","updated_at":"2018-11-08T14:37:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5dfacf2ee4fdf7e190b1dcab4e145631c36e1c21","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/madeinussr/exop_props/pulls/4/commits","review_comments_url":"https://api.github.com/repos/madeinussr/exop_props/pulls/4/comments","review_comment_url":"https://api.github.com/repos/madeinussr/exop_props/pulls/comments{/number}","comments_url":"https://api.github.com/repos/madeinussr/exop_props/issues/4/comments","statuses_url":"https://api.github.com/repos/madeinussr/exop_props/statuses/cfae72c06d66f18da40f639b3831d28daecba464","head":{"label":"madeinussr:respect_required_opt","ref":"respect_required_opt","sha":"cfae72c06d66f18da40f639b3831d28daecba464","user":{"login":"madeinussr","id":1419763,"node_id":"MDQ6VXNlcjE0MTk3NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1419763?v=4","gravatar_id":"","url":"https://api.github.com/users/madeinussr","html_url":"https://github.com/madeinussr","followers_url":"https://api.github.com/users/madeinussr/followers","following_url":"https://api.github.com/users/madeinussr/following{/other_user}","gists_url":"https://api.github.com/users/madeinussr/gists{/gist_id}","starred_url":"https://api.github.com/users/madeinussr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madeinussr/subscriptions","organizations_url":"https://api.github.com/users/madeinussr/orgs","repos_url":"https://api.github.com/users/madeinussr/repos","events_url":"https://api.github.com/users/madeinussr/events{/privacy}","received_events_url":"https://api.github.com/users/madeinussr/received_events","type":"User","site_admin":false},"repo":{"id":156375505,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYzNzU1MDU=","name":"exop_props","full_name":"madeinussr/exop_props","private":false,"owner":{"login":"madeinussr","id":1419763,"node_id":"MDQ6VXNlcjE0MTk3NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1419763?v=4","gravatar_id":"","url":"https://api.github.com/users/madeinussr","html_url":"https://github.com/madeinussr","followers_url":"https://api.github.com/users/madeinussr/followers","following_url":"https://api.github.com/users/madeinussr/following{/other_user}","gists_url":"https://api.github.com/users/madeinussr/gists{/gist_id}","starred_url":"https://api.github.com/users/madeinussr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madeinussr/subscriptions","organizations_url":"https://api.github.com/users/madeinussr/orgs","repos_url":"https://api.github.com/users/madeinussr/repos","events_url":"https://api.github.com/users/madeinussr/events{/privacy}","received_events_url":"https://api.github.com/users/madeinussr/received_events","type":"User","site_admin":false},"html_url":"https://github.com/madeinussr/exop_props","description":null,"fork":false,"url":"https://api.github.com/repos/madeinussr/exop_props","forks_url":"https://api.github.com/repos/madeinussr/exop_props/forks","keys_url":"https://api.github.com/repos/madeinussr/exop_props/keys{/key_id}","collaborators_url":"https://api.github.com/repos/madeinussr/exop_props/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/madeinussr/exop_props/teams","hooks_url":"https://api.github.com/repos/madeinussr/exop_props/hooks","issue_events_url":"https://api.github.com/repos/madeinussr/exop_props/issues/events{/number}","events_url":"https://api.github.com/repos/madeinussr/exop_props/events","assignees_url":"https://api.github.com/repos/madeinussr/exop_props/assignees{/user}","branches_url":"https://api.github.com/repos/madeinussr/exop_props/branches{/branch}","tags_url":"https://api.github.com/repos/madeinussr/exop_props/tags","blobs_url":"https://api.github.com/repos/madeinussr/exop_props/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/madeinussr/exop_props/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/madeinussr/exop_props/git/refs{/sha}","trees_url":"https://api.github.com/repos/madeinussr/exop_props/git/trees{/sha}","statuses_url":"https://api.github.com/repos/madeinussr/exop_props/statuses/{sha}","languages_url":"https://api.github.com/repos/madeinussr/exop_props/languages","stargazers_url":"https://api.github.com/repos/madeinussr/exop_props/stargazers","contributors_url":"https://api.github.com/repos/madeinussr/exop_props/contributors","subscribers_url":"https://api.github.com/repos/madeinussr/exop_props/subscribers","subscription_url":"https://api.github.com/repos/madeinussr/exop_props/subscription","commits_url":"https://api.github.com/repos/madeinussr/exop_props/commits{/sha}","git_commits_url":"https://api.github.com/repos/madeinussr/exop_props/git/commits{/sha}","comments_url":"https://api.github.com/repos/madeinussr/exop_props/comments{/number}","issue_comment_url":"https://api.github.com/repos/madeinussr/exop_props/issues/comments{/number}","contents_url":"https://api.github.com/repos/madeinussr/exop_props/contents/{+path}","compare_url":"https://api.github.com/repos/madeinussr/exop_props/compare/{base}...{head}","merges_url":"https://api.github.com/repos/madeinussr/exop_props/merges","archive_url":"https://api.github.com/repos/madeinussr/exop_props/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/madeinussr/exop_props/downloads","issues_url":"https://api.github.com/repos/madeinussr/exop_props/issues{/number}","pulls_url":"https://api.github.com/repos/madeinussr/exop_props/pulls{/number}","milestones_url":"https://api.github.com/repos/madeinussr/exop_props/milestones{/number}","notifications_url":"https://api.github.com/repos/madeinussr/exop_props/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/madeinussr/exop_props/labels{/name}","releases_url":"https://api.github.com/repos/madeinussr/exop_props/releases{/id}","deployments_url":"https://api.github.com/repos/madeinussr/exop_props/deployments","created_at":"2018-11-06T11:47:12Z","updated_at":"2018-11-08T12:47:07Z","pushed_at":"2018-11-08T14:35:15Z","git_url":"git://github.com/madeinussr/exop_props.git","ssh_url":"git@github.com:madeinussr/exop_props.git","clone_url":"https://github.com/madeinussr/exop_props.git","svn_url":"https://github.com/madeinussr/exop_props","homepage":null,"size":42,"stargazers_count":2,"watchers_count":2,"language":"Elixir","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":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"madeinussr:master","ref":"master","sha":"f5d48d78edca5f4c6d423cd47a3f1ffca291359c","user":{"login":"madeinussr","id":1419763,"node_id":"MDQ6VXNlcjE0MTk3NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1419763?v=4","gravatar_id":"","url":"https://api.github.com/users/madeinussr","html_url":"https://github.com/madeinussr","followers_url":"https://api.github.com/users/madeinussr/followers","following_url":"https://api.github.com/users/madeinussr/following{/other_user}","gists_url":"https://api.github.com/users/madeinussr/gists{/gist_id}","starred_url":"https://api.github.com/users/madeinussr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madeinussr/subscriptions","organizations_url":"https://api.github.com/users/madeinussr/orgs","repos_url":"https://api.github.com/users/madeinussr/repos","events_url":"https://api.github.com/users/madeinussr/events{/privacy}","received_events_url":"https://api.github.com/users/madeinussr/received_events","type":"User","site_admin":false},"repo":{"id":156375505,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYzNzU1MDU=","name":"exop_props","full_name":"madeinussr/exop_props","private":false,"owner":{"login":"madeinussr","id":1419763,"node_id":"MDQ6VXNlcjE0MTk3NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1419763?v=4","gravatar_id":"","url":"https://api.github.com/users/madeinussr","html_url":"https://github.com/madeinussr","followers_url":"https://api.github.com/users/madeinussr/followers","following_url":"https://api.github.com/users/madeinussr/following{/other_user}","gists_url":"https://api.github.com/users/madeinussr/gists{/gist_id}","starred_url":"https://api.github.com/users/madeinussr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madeinussr/subscriptions","organizations_url":"https://api.github.com/users/madeinussr/orgs","repos_url":"https://api.github.com/users/madeinussr/repos","events_url":"https://api.github.com/users/madeinussr/events{/privacy}","received_events_url":"https://api.github.com/users/madeinussr/received_events","type":"User","site_admin":false},"html_url":"https://github.com/madeinussr/exop_props","description":null,"fork":false,"url":"https://api.github.com/repos/madeinussr/exop_props","forks_url":"https://api.github.com/repos/madeinussr/exop_props/forks","keys_url":"https://api.github.com/repos/madeinussr/exop_props/keys{/key_id}","collaborators_url":"https://api.github.com/repos/madeinussr/exop_props/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/madeinussr/exop_props/teams","hooks_url":"https://api.github.com/repos/madeinussr/exop_props/hooks","issue_events_url":"https://api.github.com/repos/madeinussr/exop_props/issues/events{/number}","events_url":"https://api.github.com/repos/madeinussr/exop_props/events","assignees_url":"https://api.github.com/repos/madeinussr/exop_props/assignees{/user}","branches_url":"https://api.github.com/repos/madeinussr/exop_props/branches{/branch}","tags_url":"https://api.github.com/repos/madeinussr/exop_props/tags","blobs_url":"https://api.github.com/repos/madeinussr/exop_props/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/madeinussr/exop_props/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/madeinussr/exop_props/git/refs{/sha}","trees_url":"https://api.github.com/repos/madeinussr/exop_props/git/trees{/sha}","statuses_url":"https://api.github.com/repos/madeinussr/exop_props/statuses/{sha}","languages_url":"https://api.github.com/repos/madeinussr/exop_props/languages","stargazers_url":"https://api.github.com/repos/madeinussr/exop_props/stargazers","contributors_url":"https://api.github.com/repos/madeinussr/exop_props/contributors","subscribers_url":"https://api.github.com/repos/madeinussr/exop_props/subscribers","subscription_url":"https://api.github.com/repos/madeinussr/exop_props/subscription","commits_url":"https://api.github.com/repos/madeinussr/exop_props/commits{/sha}","git_commits_url":"https://api.github.com/repos/madeinussr/exop_props/git/commits{/sha}","comments_url":"https://api.github.com/repos/madeinussr/exop_props/comments{/number}","issue_comment_url":"https://api.github.com/repos/madeinussr/exop_props/issues/comments{/number}","contents_url":"https://api.github.com/repos/madeinussr/exop_props/contents/{+path}","compare_url":"https://api.github.com/repos/madeinussr/exop_props/compare/{base}...{head}","merges_url":"https://api.github.com/repos/madeinussr/exop_props/merges","archive_url":"https://api.github.com/repos/madeinussr/exop_props/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/madeinussr/exop_props/downloads","issues_url":"https://api.github.com/repos/madeinussr/exop_props/issues{/number}","pulls_url":"https://api.github.com/repos/madeinussr/exop_props/pulls{/number}","milestones_url":"https://api.github.com/repos/madeinussr/exop_props/milestones{/number}","notifications_url":"https://api.github.com/repos/madeinussr/exop_props/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/madeinussr/exop_props/labels{/name}","releases_url":"https://api.github.com/repos/madeinussr/exop_props/releases{/id}","deployments_url":"https://api.github.com/repos/madeinussr/exop_props/deployments","created_at":"2018-11-06T11:47:12Z","updated_at":"2018-11-08T12:47:07Z","pushed_at":"2018-11-08T14:35:15Z","git_url":"git://github.com/madeinussr/exop_props.git","ssh_url":"git@github.com:madeinussr/exop_props.git","clone_url":"https://github.com/madeinussr/exop_props.git","svn_url":"https://github.com/madeinussr/exop_props","homepage":null,"size":42,"stargazers_count":2,"watchers_count":2,"language":"Elixir","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":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/madeinussr/exop_props/pulls/4"},"html":{"href":"https://github.com/madeinussr/exop_props/pull/4"},"issue":{"href":"https://api.github.com/repos/madeinussr/exop_props/issues/4"},"comments":{"href":"https://api.github.com/repos/madeinussr/exop_props/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/madeinussr/exop_props/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/madeinussr/exop_props/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/madeinussr/exop_props/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/madeinussr/exop_props/statuses/cfae72c06d66f18da40f639b3831d28daecba464"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"madeinussr"}}