{"action":"created","comment":{"url":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/comments/232971888","pull_request_review_id":174255068,"id":232971888,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjk3MTg4OA==","diff_hunk":"@@ -0,0 +1,22 @@\n+from models.pc_object import PcObject\n+from utils.logger import logger\n+from utils.test_utils import create_stock_from_event_occurrence\n+\n+def create_industrial_event_stocks(event_occurrences_by_name):\n+    logger.info('create_industrial_event_stocks')\n+\n+    event_stocks_by_name = {}\n+\n+    for (event_occurrence_name, event_occurrence) in event_occurrences_by_name.items():\n+        available = 10\n+        price = 10\n+        name = event_occurrence_name + \"/\" + str(available) + \"/\" + str(price)","path":"sandboxes/scripts/creators/industrial/create_industrial_event_stocks.py","position":13,"original_position":13,"commit_id":"91bad3b8ff58fe1da6fb40835176553da9a2fb29","original_commit_id":"91bad3b8ff58fe1da6fb40835176553da9a2fb29","user":{"login":"sofcalca","id":10255447,"node_id":"MDQ6VXNlcjEwMjU1NDQ3","avatar_url":"https://avatars0.githubusercontent.com/u/10255447?v=4","gravatar_id":"","url":"https://api.github.com/users/sofcalca","html_url":"https://github.com/sofcalca","followers_url":"https://api.github.com/users/sofcalca/followers","following_url":"https://api.github.com/users/sofcalca/following{/other_user}","gists_url":"https://api.github.com/users/sofcalca/gists{/gist_id}","starred_url":"https://api.github.com/users/sofcalca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sofcalca/subscriptions","organizations_url":"https://api.github.com/users/sofcalca/orgs","repos_url":"https://api.github.com/users/sofcalca/repos","events_url":"https://api.github.com/users/sofcalca/events{/privacy}","received_events_url":"https://api.github.com/users/sofcalca/received_events","type":"User","site_admin":false},"body":"idem, il me semble qu'il te manque des espaces","created_at":"2018-11-13T10:09:54Z","updated_at":"2018-11-13T10:29:06Z","html_url":"https://github.com/betagouv/pass-culture-api/pull/288#discussion_r232971888","pull_request_url":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/288","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/comments/232971888"},"html":{"href":"https://github.com/betagouv/pass-culture-api/pull/288#discussion_r232971888"},"pull_request":{"href":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/288"}}},"pull_request":{"url":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/288","id":227086003,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MDg2MDAz","html_url":"https://github.com/betagouv/pass-culture-api/pull/288","diff_url":"https://github.com/betagouv/pass-culture-api/pull/288.diff","patch_url":"https://github.com/betagouv/pass-culture-api/pull/288.patch","issue_url":"https://api.github.com/repos/betagouv/pass-culture-api/issues/288","number":288,"state":"open","locked":false,"title":"#905 Sandbox brute force","user":{"login":"Ledoux","id":3239692,"node_id":"MDQ6VXNlcjMyMzk2OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/3239692?v=4","gravatar_id":"","url":"https://api.github.com/users/Ledoux","html_url":"https://github.com/Ledoux","followers_url":"https://api.github.com/users/Ledoux/followers","following_url":"https://api.github.com/users/Ledoux/following{/other_user}","gists_url":"https://api.github.com/users/Ledoux/gists{/gist_id}","starred_url":"https://api.github.com/users/Ledoux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ledoux/subscriptions","organizations_url":"https://api.github.com/users/Ledoux/orgs","repos_url":"https://api.github.com/users/Ledoux/repos","events_url":"https://api.github.com/users/Ledoux/events{/privacy}","received_events_url":"https://api.github.com/users/Ledoux/received_events","type":"User","site_admin":false},"body":"Un peu lourd comme PR...\r\n\r\ncela permet d'engendrer dans la sandbox un panel exhaustif d'offres pour tester tous les cas de decouverte, recherche.\r\n\r\nC'est du brute force quoi... et les parametres sont dans sandboxes/scripts/mocks/utils/params:\r\n\r\n1. avec PLACES : ce sont toutes les places barycentres d'un departement. (donc en theorie on en aurait une par departement). Pour chacune de ses places on engendre une grille de n offerers via get_all_offerer_mocks(geo_interval=0.1, geo_number=2) (en gros ca fait une grille de geoloc et on y associe des adresses d'offerers fictives grâce à l'api reverse de BAN). Pour chaque offerer, une venue (à la meme adresse que l'offerer) et une venue virtuelle sont creees.\r\n\r\n2. On engendre un event ou un thing pour chaque type d'offre (EventType.CINEMA, ... ThingType.MUSIQUE...)\r\n\r\n3. Pour chaque venue (ou sa venue virtuelle associée) on cree une offre pour chacune de ses 2. events/things/\r\n\r\n4. Pour les offres events on cree pour chacune d'entre elles 3 dates (une tt de suite, une dans 2 jours, une bcp plus tard).\r\n\r\n5. Dans les thumbs/mediations est ajouté des images mocks pour chacun des types d'offres, et on cree donc des mediations pour toutes ces offres.\r\n\r\n","created_at":"2018-10-30T21:21:41Z","updated_at":"2018-11-13T10:29:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6da5def8dc5307f684781d5e83c52f1ccab37b19","assignee":null,"assignees":[],"requested_reviewers":[{"login":"arnoo","id":185428,"node_id":"MDQ6VXNlcjE4NTQyOA==","avatar_url":"https://avatars0.githubusercontent.com/u/185428?v=4","gravatar_id":"","url":"https://api.github.com/users/arnoo","html_url":"https://github.com/arnoo","followers_url":"https://api.github.com/users/arnoo/followers","following_url":"https://api.github.com/users/arnoo/following{/other_user}","gists_url":"https://api.github.com/users/arnoo/gists{/gist_id}","starred_url":"https://api.github.com/users/arnoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnoo/subscriptions","organizations_url":"https://api.github.com/users/arnoo/orgs","repos_url":"https://api.github.com/users/arnoo/repos","events_url":"https://api.github.com/users/arnoo/events{/privacy}","received_events_url":"https://api.github.com/users/arnoo/received_events","type":"User","site_admin":false},{"login":"annemarie35","id":7688741,"node_id":"MDQ6VXNlcjc2ODg3NDE=","avatar_url":"https://avatars2.githubusercontent.com/u/7688741?v=4","gravatar_id":"","url":"https://api.github.com/users/annemarie35","html_url":"https://github.com/annemarie35","followers_url":"https://api.github.com/users/annemarie35/followers","following_url":"https://api.github.com/users/annemarie35/following{/other_user}","gists_url":"https://api.github.com/users/annemarie35/gists{/gist_id}","starred_url":"https://api.github.com/users/annemarie35/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annemarie35/subscriptions","organizations_url":"https://api.github.com/users/annemarie35/orgs","repos_url":"https://api.github.com/users/annemarie35/repos","events_url":"https://api.github.com/users/annemarie35/events{/privacy}","received_events_url":"https://api.github.com/users/annemarie35/received_events","type":"User","site_admin":false},{"login":"abel-andre","id":29952086,"node_id":"MDQ6VXNlcjI5OTUyMDg2","avatar_url":"https://avatars3.githubusercontent.com/u/29952086?v=4","gravatar_id":"","url":"https://api.github.com/users/abel-andre","html_url":"https://github.com/abel-andre","followers_url":"https://api.github.com/users/abel-andre/followers","following_url":"https://api.github.com/users/abel-andre/following{/other_user}","gists_url":"https://api.github.com/users/abel-andre/gists{/gist_id}","starred_url":"https://api.github.com/users/abel-andre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abel-andre/subscriptions","organizations_url":"https://api.github.com/users/abel-andre/orgs","repos_url":"https://api.github.com/users/abel-andre/repos","events_url":"https://api.github.com/users/abel-andre/events{/privacy}","received_events_url":"https://api.github.com/users/abel-andre/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/288/commits","review_comments_url":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/288/comments","review_comment_url":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/betagouv/pass-culture-api/issues/288/comments","statuses_url":"https://api.github.com/repos/betagouv/pass-culture-api/statuses/91bad3b8ff58fe1da6fb40835176553da9a2fb29","head":{"label":"betagouv:sandbox-offers-search","ref":"sandbox-offers-search","sha":"91bad3b8ff58fe1da6fb40835176553da9a2fb29","user":{"login":"betagouv","id":7874148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4NzQxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/7874148?v=4","gravatar_id":"","url":"https://api.github.com/users/betagouv","html_url":"https://github.com/betagouv","followers_url":"https://api.github.com/users/betagouv/followers","following_url":"https://api.github.com/users/betagouv/following{/other_user}","gists_url":"https://api.github.com/users/betagouv/gists{/gist_id}","starred_url":"https://api.github.com/users/betagouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betagouv/subscriptions","organizations_url":"https://api.github.com/users/betagouv/orgs","repos_url":"https://api.github.com/users/betagouv/repos","events_url":"https://api.github.com/users/betagouv/events{/privacy}","received_events_url":"https://api.github.com/users/betagouv/received_events","type":"Organization","site_admin":false},"repo":{"id":124255953,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQyNTU5NTM=","name":"pass-culture-api","full_name":"betagouv/pass-culture-api","private":false,"owner":{"login":"betagouv","id":7874148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4NzQxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/7874148?v=4","gravatar_id":"","url":"https://api.github.com/users/betagouv","html_url":"https://github.com/betagouv","followers_url":"https://api.github.com/users/betagouv/followers","following_url":"https://api.github.com/users/betagouv/following{/other_user}","gists_url":"https://api.github.com/users/betagouv/gists{/gist_id}","starred_url":"https://api.github.com/users/betagouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betagouv/subscriptions","organizations_url":"https://api.github.com/users/betagouv/orgs","repos_url":"https://api.github.com/users/betagouv/repos","events_url":"https://api.github.com/users/betagouv/events{/privacy}","received_events_url":"https://api.github.com/users/betagouv/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/betagouv/pass-culture-api","description":"API pour l'application Pass Culture","fork":false,"url":"https://api.github.com/repos/betagouv/pass-culture-api","forks_url":"https://api.github.com/repos/betagouv/pass-culture-api/forks","keys_url":"https://api.github.com/repos/betagouv/pass-culture-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/betagouv/pass-culture-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/betagouv/pass-culture-api/teams","hooks_url":"https://api.github.com/repos/betagouv/pass-culture-api/hooks","issue_events_url":"https://api.github.com/repos/betagouv/pass-culture-api/issues/events{/number}","events_url":"https://api.github.com/repos/betagouv/pass-culture-api/events","assignees_url":"https://api.github.com/repos/betagouv/pass-culture-api/assignees{/user}","branches_url":"https://api.github.com/repos/betagouv/pass-culture-api/branches{/branch}","tags_url":"https://api.github.com/repos/betagouv/pass-culture-api/tags","blobs_url":"https://api.github.com/repos/betagouv/pass-culture-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/betagouv/pass-culture-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/betagouv/pass-culture-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/betagouv/pass-culture-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/betagouv/pass-culture-api/statuses/{sha}","languages_url":"https://api.github.com/repos/betagouv/pass-culture-api/languages","stargazers_url":"https://api.github.com/repos/betagouv/pass-culture-api/stargazers","contributors_url":"https://api.github.com/repos/betagouv/pass-culture-api/contributors","subscribers_url":"https://api.github.com/repos/betagouv/pass-culture-api/subscribers","subscription_url":"https://api.github.com/repos/betagouv/pass-culture-api/subscription","commits_url":"https://api.github.com/repos/betagouv/pass-culture-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/betagouv/pass-culture-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/betagouv/pass-culture-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/betagouv/pass-culture-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/betagouv/pass-culture-api/contents/{+path}","compare_url":"https://api.github.com/repos/betagouv/pass-culture-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/betagouv/pass-culture-api/merges","archive_url":"https://api.github.com/repos/betagouv/pass-culture-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/betagouv/pass-culture-api/downloads","issues_url":"https://api.github.com/repos/betagouv/pass-culture-api/issues{/number}","pulls_url":"https://api.github.com/repos/betagouv/pass-culture-api/pulls{/number}","milestones_url":"https://api.github.com/repos/betagouv/pass-culture-api/milestones{/number}","notifications_url":"https://api.github.com/repos/betagouv/pass-culture-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/betagouv/pass-culture-api/labels{/name}","releases_url":"https://api.github.com/repos/betagouv/pass-culture-api/releases{/id}","deployments_url":"https://api.github.com/repos/betagouv/pass-culture-api/deployments","created_at":"2018-03-07T15:30:02Z","updated_at":"2018-11-13T10:17:00Z","pushed_at":"2018-11-13T10:17:08Z","git_url":"git://github.com/betagouv/pass-culture-api.git","ssh_url":"git@github.com:betagouv/pass-culture-api.git","clone_url":"https://github.com/betagouv/pass-culture-api.git","svn_url":"https://github.com/betagouv/pass-culture-api","homepage":null,"size":37927,"stargazers_count":1,"watchers_count":1,"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":20,"license":null,"forks":1,"open_issues":20,"watchers":1,"default_branch":"master"}},"base":{"label":"betagouv:master","ref":"master","sha":"c6ae2a3c1da73b1a49b2fde8833abee85ab9579b","user":{"login":"betagouv","id":7874148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4NzQxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/7874148?v=4","gravatar_id":"","url":"https://api.github.com/users/betagouv","html_url":"https://github.com/betagouv","followers_url":"https://api.github.com/users/betagouv/followers","following_url":"https://api.github.com/users/betagouv/following{/other_user}","gists_url":"https://api.github.com/users/betagouv/gists{/gist_id}","starred_url":"https://api.github.com/users/betagouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betagouv/subscriptions","organizations_url":"https://api.github.com/users/betagouv/orgs","repos_url":"https://api.github.com/users/betagouv/repos","events_url":"https://api.github.com/users/betagouv/events{/privacy}","received_events_url":"https://api.github.com/users/betagouv/received_events","type":"Organization","site_admin":false},"repo":{"id":124255953,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQyNTU5NTM=","name":"pass-culture-api","full_name":"betagouv/pass-culture-api","private":false,"owner":{"login":"betagouv","id":7874148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4NzQxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/7874148?v=4","gravatar_id":"","url":"https://api.github.com/users/betagouv","html_url":"https://github.com/betagouv","followers_url":"https://api.github.com/users/betagouv/followers","following_url":"https://api.github.com/users/betagouv/following{/other_user}","gists_url":"https://api.github.com/users/betagouv/gists{/gist_id}","starred_url":"https://api.github.com/users/betagouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betagouv/subscriptions","organizations_url":"https://api.github.com/users/betagouv/orgs","repos_url":"https://api.github.com/users/betagouv/repos","events_url":"https://api.github.com/users/betagouv/events{/privacy}","received_events_url":"https://api.github.com/users/betagouv/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/betagouv/pass-culture-api","description":"API pour l'application Pass Culture","fork":false,"url":"https://api.github.com/repos/betagouv/pass-culture-api","forks_url":"https://api.github.com/repos/betagouv/pass-culture-api/forks","keys_url":"https://api.github.com/repos/betagouv/pass-culture-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/betagouv/pass-culture-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/betagouv/pass-culture-api/teams","hooks_url":"https://api.github.com/repos/betagouv/pass-culture-api/hooks","issue_events_url":"https://api.github.com/repos/betagouv/pass-culture-api/issues/events{/number}","events_url":"https://api.github.com/repos/betagouv/pass-culture-api/events","assignees_url":"https://api.github.com/repos/betagouv/pass-culture-api/assignees{/user}","branches_url":"https://api.github.com/repos/betagouv/pass-culture-api/branches{/branch}","tags_url":"https://api.github.com/repos/betagouv/pass-culture-api/tags","blobs_url":"https://api.github.com/repos/betagouv/pass-culture-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/betagouv/pass-culture-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/betagouv/pass-culture-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/betagouv/pass-culture-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/betagouv/pass-culture-api/statuses/{sha}","languages_url":"https://api.github.com/repos/betagouv/pass-culture-api/languages","stargazers_url":"https://api.github.com/repos/betagouv/pass-culture-api/stargazers","contributors_url":"https://api.github.com/repos/betagouv/pass-culture-api/contributors","subscribers_url":"https://api.github.com/repos/betagouv/pass-culture-api/subscribers","subscription_url":"https://api.github.com/repos/betagouv/pass-culture-api/subscription","commits_url":"https://api.github.com/repos/betagouv/pass-culture-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/betagouv/pass-culture-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/betagouv/pass-culture-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/betagouv/pass-culture-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/betagouv/pass-culture-api/contents/{+path}","compare_url":"https://api.github.com/repos/betagouv/pass-culture-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/betagouv/pass-culture-api/merges","archive_url":"https://api.github.com/repos/betagouv/pass-culture-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/betagouv/pass-culture-api/downloads","issues_url":"https://api.github.com/repos/betagouv/pass-culture-api/issues{/number}","pulls_url":"https://api.github.com/repos/betagouv/pass-culture-api/pulls{/number}","milestones_url":"https://api.github.com/repos/betagouv/pass-culture-api/milestones{/number}","notifications_url":"https://api.github.com/repos/betagouv/pass-culture-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/betagouv/pass-culture-api/labels{/name}","releases_url":"https://api.github.com/repos/betagouv/pass-culture-api/releases{/id}","deployments_url":"https://api.github.com/repos/betagouv/pass-culture-api/deployments","created_at":"2018-03-07T15:30:02Z","updated_at":"2018-11-13T10:17:00Z","pushed_at":"2018-11-13T10:17:08Z","git_url":"git://github.com/betagouv/pass-culture-api.git","ssh_url":"git@github.com:betagouv/pass-culture-api.git","clone_url":"https://github.com/betagouv/pass-culture-api.git","svn_url":"https://github.com/betagouv/pass-culture-api","homepage":null,"size":37927,"stargazers_count":1,"watchers_count":1,"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":20,"license":null,"forks":1,"open_issues":20,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/288"},"html":{"href":"https://github.com/betagouv/pass-culture-api/pull/288"},"issue":{"href":"https://api.github.com/repos/betagouv/pass-culture-api/issues/288"},"comments":{"href":"https://api.github.com/repos/betagouv/pass-culture-api/issues/288/comments"},"review_comments":{"href":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/288/comments"},"review_comment":{"href":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/betagouv/pass-culture-api/pulls/288/commits"},"statuses":{"href":"https://api.github.com/repos/betagouv/pass-culture-api/statuses/91bad3b8ff58fe1da6fb40835176553da9a2fb29"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"sofcalca"}}