{"action":"closed","number":419,"pull_request":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/419","id":102449898,"html_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/419","diff_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/419.diff","patch_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/419.patch","issue_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/419","number":419,"state":"closed","locked":false,"title":"[#136176723] Briefs blueprint split","user":{"login":"allait","id":246664,"avatar_url":"https://avatars.githubusercontent.com/u/246664?v=3","gravatar_id":"","url":"https://api.github.com/users/allait","html_url":"https://github.com/allait","followers_url":"https://api.github.com/users/allait/followers","following_url":"https://api.github.com/users/allait/following{/other_user}","gists_url":"https://api.github.com/users/allait/gists{/gist_id}","starred_url":"https://api.github.com/users/allait/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allait/subscriptions","organizations_url":"https://api.github.com/users/allait/orgs","repos_url":"https://api.github.com/users/allait/repos","events_url":"https://api.github.com/users/allait/events{/privacy}","received_events_url":"https://api.github.com/users/allait/received_events","type":"User","site_admin":false},"body":"Splitting brief-related modules into a separate blueprint to make moving them to a new app easier.\r\n\r\n### What's done\r\n\r\nMost of the application and test code is now split between `buyers/` and `main/`. `buyers` will become the base for the separate briefs app.\r\n\r\nThere should be no direct imports between the packages, but there are still indirect dependencies that would need to be copied (eg application error handlers are defined for the entire app in `main.errors`)\r\n\r\n#### Move presenters and related helpers to main/\r\n#### Split helpers and move brief start pages to buyers/\r\n\r\nBrief start pages for each lot have a `/buyers` prefix, so in order to allow routing between different apps they'd have to be part of the briefs app.\r\n\r\nUnlike every other route in buyers they don't require a login so we create an additional blueprint (`dos` to match the view name, but this can be changed later) in `app.buyers` that doesn't require authorization.\r\n\r\nSplit the rest of the helpers and associated tests.\r\n\r\n#### Move /buyers URL prefix to the blueprints\r\n\r\nThis makes sure that all brief URLs start with /buyers.\r\n\r\nThe only remaining views that use the same prefix outside the buyers blueprint are `/buyers/create` GET and POST views. Moving them from main requires duplicating a lot of the forms and helper functions, and it feels like the right solution for them is a separate users app.\r\n\r\nThe simplest thing we can do right now would be to change URLs to eg `/create/buyer`. But I don't want to introduce any functional changes with this split, so I'm leaving this for now.\r\n\r\n#### Split tests between blueprints\r\n\r\nMove test files from tests/app and tests/unit to tests/main and tests/buyers, with the nested directory structure mirroring the structure in app/\r\n\r\n### What's not done\r\n\r\n* Templates - it's possible to define blueprint `template_folder`, but it adds directories to the search path, so it's still hard to verify that templates aren't using anything outside their own namespace\r\n* Static files - we'd have to split, copy or move to frontend toolkit any js/css files that are currently part of the buyer frontend\r\n* `/buyers/create` views to create buyer users are still part of `app.main`. Those URLs would probably need to change before the split. We could also consider moving user management to a separate application\r\n* Some of the application setup code is done in `app.main`. Things like Flask error handlers would have to be copied when the apps are split\r\n* We probably should consider moving things like the status blueprint and `tests/helpers.py` to shared libraries. They're duplicated between the apps, and `/_status` feels like it's definitely part of the contract all apps need to follow.","created_at":"2017-01-20T11:54:08Z","updated_at":"2017-01-26T11:08:14Z","closed_at":"2017-01-26T11:08:14Z","merged_at":"2017-01-26T11:08:14Z","merge_commit_sha":"c8e27fd65af268e3518ed3894934e95c24c37d3a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/419/commits","review_comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/419/comments","review_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/419/comments","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/statuses/54d8de5ad26183abd94195eae398ee894ddeaa0e","head":{"label":"alphagov:buyers-blueprint-split","ref":"buyers-blueprint-split","sha":"54d8de5ad26183abd94195eae398ee894ddeaa0e","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":31320841,"name":"digitalmarketplace-buyer-frontend","full_name":"alphagov/digitalmarketplace-buyer-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend","description":"Frontend buyer application for the digital marketplace","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/deployments","created_at":"2015-02-25T15:42:09Z","updated_at":"2016-10-24T09:56:55Z","pushed_at":"2017-01-26T11:08:14Z","git_url":"git://github.com/alphagov/digitalmarketplace-buyer-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-buyer-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend","homepage":"","size":1756,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"9c4eb76af12467581604bb3fa18bd1b2a935884a","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":31320841,"name":"digitalmarketplace-buyer-frontend","full_name":"alphagov/digitalmarketplace-buyer-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend","description":"Frontend buyer application for the digital marketplace","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/deployments","created_at":"2015-02-25T15:42:09Z","updated_at":"2016-10-24T09:56:55Z","pushed_at":"2017-01-26T11:08:14Z","git_url":"git://github.com/alphagov/digitalmarketplace-buyer-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-buyer-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-buyer-frontend","homepage":"","size":1756,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/419"},"html":{"href":"https://github.com/alphagov/digitalmarketplace-buyer-frontend/pull/419"},"issue":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/419"},"comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/issues/419/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/419/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/pulls/419/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-buyer-frontend/statuses/54d8de5ad26183abd94195eae398ee894ddeaa0e"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"allait","id":246664,"avatar_url":"https://avatars.githubusercontent.com/u/246664?v=3","gravatar_id":"","url":"https://api.github.com/users/allait","html_url":"https://github.com/allait","followers_url":"https://api.github.com/users/allait/followers","following_url":"https://api.github.com/users/allait/following{/other_user}","gists_url":"https://api.github.com/users/allait/gists{/gist_id}","starred_url":"https://api.github.com/users/allait/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allait/subscriptions","organizations_url":"https://api.github.com/users/allait/orgs","repos_url":"https://api.github.com/users/allait/repos","events_url":"https://api.github.com/users/allait/events{/privacy}","received_events_url":"https://api.github.com/users/allait/received_events","type":"User","site_admin":false},"comments":1,"review_comments":1,"maintainer_can_modify":false,"commits":5,"additions":75,"deletions":78,"changed_files":50}}
{"actor":{"display_login":"allait"}}