{"action":"created","comment":{"url":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/comments/232096297","pull_request_review_id":173212950,"id":232096297,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjA5NjI5Nw==","diff_hunk":"@@ -0,0 +1,138 @@\n+import datetime as dt\n+import pandas as pd\n+from pandas.compat import lrange\n+from pandas import DataFrame\n+\n+from bgbb.sql.sql_utils import run_rec_freq_spk, to_s3_fmt\n+import pyspark\n+from pytest import fixture\n+\n+\n+spark = pyspark.sql.SparkSession.builder.appName(\"test\").getOrCreate()\n+\n+\n+def int2date(i):\n+    return model_start_date + dt.timedelta(days=i - 1)\n+\n+\n+model_start_date = dt.date(2018, 6, 1)\n+MAX_OPPORTUNITIES = 9\n+DURATION = 10\n+rfn_cols = [\"Recency\", \"Frequency\", \"N\"]\n+\n+\n+def generate_clients_daily():","path":"tests/test_rfn_query.py","position":24,"original_position":24,"commit_id":"63a1859d048622d1691e268c2648d878e0bafcb7","original_commit_id":"63a1859d048622d1691e268c2648d878e0bafcb7","user":{"login":"acmiyaguchi","id":3304040,"node_id":"MDQ6VXNlcjMzMDQwNDA=","avatar_url":"https://avatars1.githubusercontent.com/u/3304040?v=4","gravatar_id":"","url":"https://api.github.com/users/acmiyaguchi","html_url":"https://github.com/acmiyaguchi","followers_url":"https://api.github.com/users/acmiyaguchi/followers","following_url":"https://api.github.com/users/acmiyaguchi/following{/other_user}","gists_url":"https://api.github.com/users/acmiyaguchi/gists{/gist_id}","starred_url":"https://api.github.com/users/acmiyaguchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acmiyaguchi/subscriptions","organizations_url":"https://api.github.com/users/acmiyaguchi/orgs","repos_url":"https://api.github.com/users/acmiyaguchi/repos","events_url":"https://api.github.com/users/acmiyaguchi/events{/privacy}","received_events_url":"https://api.github.com/users/acmiyaguchi/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n@fixture\r\ndef generate_clients_daily():\r\n```\r\n\r\nThe decorator is common when writing pytest fixtures. ","created_at":"2018-11-08T23:20:25Z","updated_at":"2018-11-08T23:39:07Z","html_url":"https://github.com/wcbeard/bgbb_lib/pull/4#discussion_r232096297","pull_request_url":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/4","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/comments/232096297"},"html":{"href":"https://github.com/wcbeard/bgbb_lib/pull/4#discussion_r232096297"},"pull_request":{"href":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/4","id":229534203,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NTM0MjAz","html_url":"https://github.com/wcbeard/bgbb_lib/pull/4","diff_url":"https://github.com/wcbeard/bgbb_lib/pull/4.diff","patch_url":"https://github.com/wcbeard/bgbb_lib/pull/4.patch","issue_url":"https://api.github.com/repos/wcbeard/bgbb_lib/issues/4","number":4,"state":"open","locked":false,"title":"Develop tests and minor formatting changes","user":{"login":"wcbeard","id":379413,"node_id":"MDQ6VXNlcjM3OTQxMw==","avatar_url":"https://avatars0.githubusercontent.com/u/379413?v=4","gravatar_id":"","url":"https://api.github.com/users/wcbeard","html_url":"https://github.com/wcbeard","followers_url":"https://api.github.com/users/wcbeard/followers","following_url":"https://api.github.com/users/wcbeard/following{/other_user}","gists_url":"https://api.github.com/users/wcbeard/gists{/gist_id}","starred_url":"https://api.github.com/users/wcbeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcbeard/subscriptions","organizations_url":"https://api.github.com/users/wcbeard/orgs","repos_url":"https://api.github.com/users/wcbeard/repos","events_url":"https://api.github.com/users/wcbeard/events{/privacy}","received_events_url":"https://api.github.com/users/wcbeard/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-08T22:49:07Z","updated_at":"2018-11-08T23:39:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1098dd5e153eb9af196da40fed330dc77bb4a0f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/4/commits","review_comments_url":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/4/comments","review_comment_url":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wcbeard/bgbb_lib/issues/4/comments","statuses_url":"https://api.github.com/repos/wcbeard/bgbb_lib/statuses/63a1859d048622d1691e268c2648d878e0bafcb7","head":{"label":"wcbeard:develop","ref":"develop","sha":"63a1859d048622d1691e268c2648d878e0bafcb7","user":{"login":"wcbeard","id":379413,"node_id":"MDQ6VXNlcjM3OTQxMw==","avatar_url":"https://avatars0.githubusercontent.com/u/379413?v=4","gravatar_id":"","url":"https://api.github.com/users/wcbeard","html_url":"https://github.com/wcbeard","followers_url":"https://api.github.com/users/wcbeard/followers","following_url":"https://api.github.com/users/wcbeard/following{/other_user}","gists_url":"https://api.github.com/users/wcbeard/gists{/gist_id}","starred_url":"https://api.github.com/users/wcbeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcbeard/subscriptions","organizations_url":"https://api.github.com/users/wcbeard/orgs","repos_url":"https://api.github.com/users/wcbeard/repos","events_url":"https://api.github.com/users/wcbeard/events{/privacy}","received_events_url":"https://api.github.com/users/wcbeard/received_events","type":"User","site_admin":false},"repo":{"id":155568208,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU1NjgyMDg=","name":"bgbb_lib","full_name":"wcbeard/bgbb_lib","private":false,"owner":{"login":"wcbeard","id":379413,"node_id":"MDQ6VXNlcjM3OTQxMw==","avatar_url":"https://avatars0.githubusercontent.com/u/379413?v=4","gravatar_id":"","url":"https://api.github.com/users/wcbeard","html_url":"https://github.com/wcbeard","followers_url":"https://api.github.com/users/wcbeard/followers","following_url":"https://api.github.com/users/wcbeard/following{/other_user}","gists_url":"https://api.github.com/users/wcbeard/gists{/gist_id}","starred_url":"https://api.github.com/users/wcbeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcbeard/subscriptions","organizations_url":"https://api.github.com/users/wcbeard/orgs","repos_url":"https://api.github.com/users/wcbeard/repos","events_url":"https://api.github.com/users/wcbeard/events{/privacy}","received_events_url":"https://api.github.com/users/wcbeard/received_events","type":"User","site_admin":false},"html_url":"https://github.com/wcbeard/bgbb_lib","description":null,"fork":false,"url":"https://api.github.com/repos/wcbeard/bgbb_lib","forks_url":"https://api.github.com/repos/wcbeard/bgbb_lib/forks","keys_url":"https://api.github.com/repos/wcbeard/bgbb_lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wcbeard/bgbb_lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wcbeard/bgbb_lib/teams","hooks_url":"https://api.github.com/repos/wcbeard/bgbb_lib/hooks","issue_events_url":"https://api.github.com/repos/wcbeard/bgbb_lib/issues/events{/number}","events_url":"https://api.github.com/repos/wcbeard/bgbb_lib/events","assignees_url":"https://api.github.com/repos/wcbeard/bgbb_lib/assignees{/user}","branches_url":"https://api.github.com/repos/wcbeard/bgbb_lib/branches{/branch}","tags_url":"https://api.github.com/repos/wcbeard/bgbb_lib/tags","blobs_url":"https://api.github.com/repos/wcbeard/bgbb_lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wcbeard/bgbb_lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wcbeard/bgbb_lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/wcbeard/bgbb_lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wcbeard/bgbb_lib/statuses/{sha}","languages_url":"https://api.github.com/repos/wcbeard/bgbb_lib/languages","stargazers_url":"https://api.github.com/repos/wcbeard/bgbb_lib/stargazers","contributors_url":"https://api.github.com/repos/wcbeard/bgbb_lib/contributors","subscribers_url":"https://api.github.com/repos/wcbeard/bgbb_lib/subscribers","subscription_url":"https://api.github.com/repos/wcbeard/bgbb_lib/subscription","commits_url":"https://api.github.com/repos/wcbeard/bgbb_lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/wcbeard/bgbb_lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/wcbeard/bgbb_lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/wcbeard/bgbb_lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/wcbeard/bgbb_lib/contents/{+path}","compare_url":"https://api.github.com/repos/wcbeard/bgbb_lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wcbeard/bgbb_lib/merges","archive_url":"https://api.github.com/repos/wcbeard/bgbb_lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wcbeard/bgbb_lib/downloads","issues_url":"https://api.github.com/repos/wcbeard/bgbb_lib/issues{/number}","pulls_url":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls{/number}","milestones_url":"https://api.github.com/repos/wcbeard/bgbb_lib/milestones{/number}","notifications_url":"https://api.github.com/repos/wcbeard/bgbb_lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wcbeard/bgbb_lib/labels{/name}","releases_url":"https://api.github.com/repos/wcbeard/bgbb_lib/releases{/id}","deployments_url":"https://api.github.com/repos/wcbeard/bgbb_lib/deployments","created_at":"2018-10-31T14:09:23Z","updated_at":"2018-11-07T21:01:36Z","pushed_at":"2018-11-08T22:49:08Z","git_url":"git://github.com/wcbeard/bgbb_lib.git","ssh_url":"git@github.com:wcbeard/bgbb_lib.git","clone_url":"https://github.com/wcbeard/bgbb_lib.git","svn_url":"https://github.com/wcbeard/bgbb_lib","homepage":null,"size":31,"stargazers_count":0,"watchers_count":0,"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":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"wcbeard:master","ref":"master","sha":"5a1f2b5328db2231030995a0e4993865ed5fbb96","user":{"login":"wcbeard","id":379413,"node_id":"MDQ6VXNlcjM3OTQxMw==","avatar_url":"https://avatars0.githubusercontent.com/u/379413?v=4","gravatar_id":"","url":"https://api.github.com/users/wcbeard","html_url":"https://github.com/wcbeard","followers_url":"https://api.github.com/users/wcbeard/followers","following_url":"https://api.github.com/users/wcbeard/following{/other_user}","gists_url":"https://api.github.com/users/wcbeard/gists{/gist_id}","starred_url":"https://api.github.com/users/wcbeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcbeard/subscriptions","organizations_url":"https://api.github.com/users/wcbeard/orgs","repos_url":"https://api.github.com/users/wcbeard/repos","events_url":"https://api.github.com/users/wcbeard/events{/privacy}","received_events_url":"https://api.github.com/users/wcbeard/received_events","type":"User","site_admin":false},"repo":{"id":155568208,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU1NjgyMDg=","name":"bgbb_lib","full_name":"wcbeard/bgbb_lib","private":false,"owner":{"login":"wcbeard","id":379413,"node_id":"MDQ6VXNlcjM3OTQxMw==","avatar_url":"https://avatars0.githubusercontent.com/u/379413?v=4","gravatar_id":"","url":"https://api.github.com/users/wcbeard","html_url":"https://github.com/wcbeard","followers_url":"https://api.github.com/users/wcbeard/followers","following_url":"https://api.github.com/users/wcbeard/following{/other_user}","gists_url":"https://api.github.com/users/wcbeard/gists{/gist_id}","starred_url":"https://api.github.com/users/wcbeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcbeard/subscriptions","organizations_url":"https://api.github.com/users/wcbeard/orgs","repos_url":"https://api.github.com/users/wcbeard/repos","events_url":"https://api.github.com/users/wcbeard/events{/privacy}","received_events_url":"https://api.github.com/users/wcbeard/received_events","type":"User","site_admin":false},"html_url":"https://github.com/wcbeard/bgbb_lib","description":null,"fork":false,"url":"https://api.github.com/repos/wcbeard/bgbb_lib","forks_url":"https://api.github.com/repos/wcbeard/bgbb_lib/forks","keys_url":"https://api.github.com/repos/wcbeard/bgbb_lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wcbeard/bgbb_lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wcbeard/bgbb_lib/teams","hooks_url":"https://api.github.com/repos/wcbeard/bgbb_lib/hooks","issue_events_url":"https://api.github.com/repos/wcbeard/bgbb_lib/issues/events{/number}","events_url":"https://api.github.com/repos/wcbeard/bgbb_lib/events","assignees_url":"https://api.github.com/repos/wcbeard/bgbb_lib/assignees{/user}","branches_url":"https://api.github.com/repos/wcbeard/bgbb_lib/branches{/branch}","tags_url":"https://api.github.com/repos/wcbeard/bgbb_lib/tags","blobs_url":"https://api.github.com/repos/wcbeard/bgbb_lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wcbeard/bgbb_lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wcbeard/bgbb_lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/wcbeard/bgbb_lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wcbeard/bgbb_lib/statuses/{sha}","languages_url":"https://api.github.com/repos/wcbeard/bgbb_lib/languages","stargazers_url":"https://api.github.com/repos/wcbeard/bgbb_lib/stargazers","contributors_url":"https://api.github.com/repos/wcbeard/bgbb_lib/contributors","subscribers_url":"https://api.github.com/repos/wcbeard/bgbb_lib/subscribers","subscription_url":"https://api.github.com/repos/wcbeard/bgbb_lib/subscription","commits_url":"https://api.github.com/repos/wcbeard/bgbb_lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/wcbeard/bgbb_lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/wcbeard/bgbb_lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/wcbeard/bgbb_lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/wcbeard/bgbb_lib/contents/{+path}","compare_url":"https://api.github.com/repos/wcbeard/bgbb_lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wcbeard/bgbb_lib/merges","archive_url":"https://api.github.com/repos/wcbeard/bgbb_lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wcbeard/bgbb_lib/downloads","issues_url":"https://api.github.com/repos/wcbeard/bgbb_lib/issues{/number}","pulls_url":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls{/number}","milestones_url":"https://api.github.com/repos/wcbeard/bgbb_lib/milestones{/number}","notifications_url":"https://api.github.com/repos/wcbeard/bgbb_lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wcbeard/bgbb_lib/labels{/name}","releases_url":"https://api.github.com/repos/wcbeard/bgbb_lib/releases{/id}","deployments_url":"https://api.github.com/repos/wcbeard/bgbb_lib/deployments","created_at":"2018-10-31T14:09:23Z","updated_at":"2018-11-07T21:01:36Z","pushed_at":"2018-11-08T22:49:08Z","git_url":"git://github.com/wcbeard/bgbb_lib.git","ssh_url":"git@github.com:wcbeard/bgbb_lib.git","clone_url":"https://github.com/wcbeard/bgbb_lib.git","svn_url":"https://github.com/wcbeard/bgbb_lib","homepage":null,"size":31,"stargazers_count":0,"watchers_count":0,"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":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/4"},"html":{"href":"https://github.com/wcbeard/bgbb_lib/pull/4"},"issue":{"href":"https://api.github.com/repos/wcbeard/bgbb_lib/issues/4"},"comments":{"href":"https://api.github.com/repos/wcbeard/bgbb_lib/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wcbeard/bgbb_lib/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/wcbeard/bgbb_lib/statuses/63a1859d048622d1691e268c2648d878e0bafcb7"}},"author_association":"OWNER"}}
{"actor":{"display_login":"acmiyaguchi"}}