{"action":"opened","number":604,"pull_request":{"url":"https://api.github.com/repos/nextstrain/auspice/pulls/604","id":203727029,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNzI3MDI5","html_url":"https://github.com/nextstrain/auspice/pull/604","diff_url":"https://github.com/nextstrain/auspice/pull/604.diff","patch_url":"https://github.com/nextstrain/auspice/pull/604.patch","issue_url":"https://api.github.com/repos/nextstrain/auspice/issues/604","number":604,"state":"open","locked":false,"title":"Move logic to server","user":{"login":"jameshadfield","id":8350992,"node_id":"MDQ6VXNlcjgzNTA5OTI=","avatar_url":"https://avatars1.githubusercontent.com/u/8350992?v=4","gravatar_id":"","url":"https://api.github.com/users/jameshadfield","html_url":"https://github.com/jameshadfield","followers_url":"https://api.github.com/users/jameshadfield/followers","following_url":"https://api.github.com/users/jameshadfield/following{/other_user}","gists_url":"https://api.github.com/users/jameshadfield/gists{/gist_id}","starred_url":"https://api.github.com/users/jameshadfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameshadfield/subscriptions","organizations_url":"https://api.github.com/users/jameshadfield/orgs","repos_url":"https://api.github.com/users/jameshadfield/repos","events_url":"https://api.github.com/users/jameshadfield/events{/privacy}","received_events_url":"https://api.github.com/users/jameshadfield/received_events","type":"User","site_admin":false},"body":"This PR moves relevant functionality to the (auspice) server. There were lots of changes, so there's bound to be bugs -- some testing would be much appreciated!\r\n\r\n### Outward facing changes\r\n* The data source (e.g. staging server? local data?) is now specified by prepending the source to the URL\r\n    * To access a local copy of zika, the URL is `localhost:4000/local/zika`\r\n    * A list of local datasets is available at `localhost:4000/local` (same for staging)\r\n    * Github builds (i.e. JSONs committed to the repo in the `auspice` directory) are available at `localhost:4000/community/ORGNAME/REPONAME/EXTRA/PATHS`. For instance `localhost:4000/community/nextstrain/WNV/NA` loads the WNV build from https://github.com/nextstrain/WNV/. resolves #588\r\n    * Appending `:local` to npm commands to change the server functionality is now deprecated.\r\n    * In the future, the list of \"sources\" can be expanded, e.g. `s3::...` could specify an arbitrary S3 bucket.\r\n* The local data folder can be specified on the command line via `npm run server -- local:PATH`, `node server.js local:PATH`, `npm run dev -- local:PATH` etc. The `PATH` must currently be relative (to the auspice directory), but this will be improved as we make `auspice` globally installable. The default path is still `data/` in the auspice directory.\r\n* Tanglegrams are now specified like `/flu/seasonal/h3n2/3y/ha-na` instead of `/flu/seasonal/h3n2/3y/ha?tt=na`. A warning notification is given if you use the old syntax.\r\n* More descriptive errors are displayed on the splash page (when they arise)\r\n* A bunch of narrative bugs have been fixed (but plenty remain)\r\n    * resolves #602 resolves #601 \r\n\r\n### Internal changes\r\n* The server combines the tree & meta JSONs into a structure more similar to schema v2. This means the initial load only requires a single fetch from the client. This will make a transition to v2 much easier, and allow patching of the v1 schemas before they arrive at the client.\r\n* The manifest JSON is loaded by the server & turned into a list of available datasets, which is given to the client when needed. This is also build for local data by scanning the directory. The structure of the underlying manifest is only really used for ordering these paths. Changes to the manifest format are welcome, but beyond the scope of the PR.\r\n* Frequencies JSONs are only fetched when the metadata specifies this panel\r\n* Page changes & data loading logic is much simplified\r\n\r\nNot to self: the nextstrain.org server will need updating after this goes in.","created_at":"2018-07-25T05:43:08Z","updated_at":"2018-07-25T05:43:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nextstrain/auspice/pulls/604/commits","review_comments_url":"https://api.github.com/repos/nextstrain/auspice/pulls/604/comments","review_comment_url":"https://api.github.com/repos/nextstrain/auspice/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nextstrain/auspice/issues/604/comments","statuses_url":"https://api.github.com/repos/nextstrain/auspice/statuses/2481a8ac10ee09853e5205ed4995a5cb06cfa5f7","head":{"label":"nextstrain:server-side-json","ref":"server-side-json","sha":"2481a8ac10ee09853e5205ed4995a5cb06cfa5f7","user":{"login":"nextstrain","id":22159334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTU5MzM0","avatar_url":"https://avatars3.githubusercontent.com/u/22159334?v=4","gravatar_id":"","url":"https://api.github.com/users/nextstrain","html_url":"https://github.com/nextstrain","followers_url":"https://api.github.com/users/nextstrain/followers","following_url":"https://api.github.com/users/nextstrain/following{/other_user}","gists_url":"https://api.github.com/users/nextstrain/gists{/gist_id}","starred_url":"https://api.github.com/users/nextstrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextstrain/subscriptions","organizations_url":"https://api.github.com/users/nextstrain/orgs","repos_url":"https://api.github.com/users/nextstrain/repos","events_url":"https://api.github.com/users/nextstrain/events{/privacy}","received_events_url":"https://api.github.com/users/nextstrain/received_events","type":"Organization","site_admin":false},"repo":{"id":56881532,"node_id":"MDEwOlJlcG9zaXRvcnk1Njg4MTUzMg==","name":"auspice","full_name":"nextstrain/auspice","owner":{"login":"nextstrain","id":22159334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTU5MzM0","avatar_url":"https://avatars3.githubusercontent.com/u/22159334?v=4","gravatar_id":"","url":"https://api.github.com/users/nextstrain","html_url":"https://github.com/nextstrain","followers_url":"https://api.github.com/users/nextstrain/followers","following_url":"https://api.github.com/users/nextstrain/following{/other_user}","gists_url":"https://api.github.com/users/nextstrain/gists{/gist_id}","starred_url":"https://api.github.com/users/nextstrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextstrain/subscriptions","organizations_url":"https://api.github.com/users/nextstrain/orgs","repos_url":"https://api.github.com/users/nextstrain/repos","events_url":"https://api.github.com/users/nextstrain/events{/privacy}","received_events_url":"https://api.github.com/users/nextstrain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nextstrain/auspice","description":"Web app for visualizing pathogen evolution","fork":false,"url":"https://api.github.com/repos/nextstrain/auspice","forks_url":"https://api.github.com/repos/nextstrain/auspice/forks","keys_url":"https://api.github.com/repos/nextstrain/auspice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nextstrain/auspice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nextstrain/auspice/teams","hooks_url":"https://api.github.com/repos/nextstrain/auspice/hooks","issue_events_url":"https://api.github.com/repos/nextstrain/auspice/issues/events{/number}","events_url":"https://api.github.com/repos/nextstrain/auspice/events","assignees_url":"https://api.github.com/repos/nextstrain/auspice/assignees{/user}","branches_url":"https://api.github.com/repos/nextstrain/auspice/branches{/branch}","tags_url":"https://api.github.com/repos/nextstrain/auspice/tags","blobs_url":"https://api.github.com/repos/nextstrain/auspice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nextstrain/auspice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nextstrain/auspice/git/refs{/sha}","trees_url":"https://api.github.com/repos/nextstrain/auspice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nextstrain/auspice/statuses/{sha}","languages_url":"https://api.github.com/repos/nextstrain/auspice/languages","stargazers_url":"https://api.github.com/repos/nextstrain/auspice/stargazers","contributors_url":"https://api.github.com/repos/nextstrain/auspice/contributors","subscribers_url":"https://api.github.com/repos/nextstrain/auspice/subscribers","subscription_url":"https://api.github.com/repos/nextstrain/auspice/subscription","commits_url":"https://api.github.com/repos/nextstrain/auspice/commits{/sha}","git_commits_url":"https://api.github.com/repos/nextstrain/auspice/git/commits{/sha}","comments_url":"https://api.github.com/repos/nextstrain/auspice/comments{/number}","issue_comment_url":"https://api.github.com/repos/nextstrain/auspice/issues/comments{/number}","contents_url":"https://api.github.com/repos/nextstrain/auspice/contents/{+path}","compare_url":"https://api.github.com/repos/nextstrain/auspice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nextstrain/auspice/merges","archive_url":"https://api.github.com/repos/nextstrain/auspice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nextstrain/auspice/downloads","issues_url":"https://api.github.com/repos/nextstrain/auspice/issues{/number}","pulls_url":"https://api.github.com/repos/nextstrain/auspice/pulls{/number}","milestones_url":"https://api.github.com/repos/nextstrain/auspice/milestones{/number}","notifications_url":"https://api.github.com/repos/nextstrain/auspice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nextstrain/auspice/labels{/name}","releases_url":"https://api.github.com/repos/nextstrain/auspice/releases{/id}","deployments_url":"https://api.github.com/repos/nextstrain/auspice/deployments","created_at":"2016-04-22T19:54:18Z","updated_at":"2018-07-20T16:30:05Z","pushed_at":"2018-07-25T05:10:49Z","git_url":"git://github.com/nextstrain/auspice.git","ssh_url":"git@github.com:nextstrain/auspice.git","clone_url":"https://github.com/nextstrain/auspice.git","svn_url":"https://github.com/nextstrain/auspice","homepage":null,"size":6686,"stargazers_count":24,"watchers_count":24,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":8,"open_issues":59,"watchers":24,"default_branch":"master"}},"base":{"label":"nextstrain:master","ref":"master","sha":"592e8c443c44507b6bbd9c91496c34489f8bfd07","user":{"login":"nextstrain","id":22159334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTU5MzM0","avatar_url":"https://avatars3.githubusercontent.com/u/22159334?v=4","gravatar_id":"","url":"https://api.github.com/users/nextstrain","html_url":"https://github.com/nextstrain","followers_url":"https://api.github.com/users/nextstrain/followers","following_url":"https://api.github.com/users/nextstrain/following{/other_user}","gists_url":"https://api.github.com/users/nextstrain/gists{/gist_id}","starred_url":"https://api.github.com/users/nextstrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextstrain/subscriptions","organizations_url":"https://api.github.com/users/nextstrain/orgs","repos_url":"https://api.github.com/users/nextstrain/repos","events_url":"https://api.github.com/users/nextstrain/events{/privacy}","received_events_url":"https://api.github.com/users/nextstrain/received_events","type":"Organization","site_admin":false},"repo":{"id":56881532,"node_id":"MDEwOlJlcG9zaXRvcnk1Njg4MTUzMg==","name":"auspice","full_name":"nextstrain/auspice","owner":{"login":"nextstrain","id":22159334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTU5MzM0","avatar_url":"https://avatars3.githubusercontent.com/u/22159334?v=4","gravatar_id":"","url":"https://api.github.com/users/nextstrain","html_url":"https://github.com/nextstrain","followers_url":"https://api.github.com/users/nextstrain/followers","following_url":"https://api.github.com/users/nextstrain/following{/other_user}","gists_url":"https://api.github.com/users/nextstrain/gists{/gist_id}","starred_url":"https://api.github.com/users/nextstrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextstrain/subscriptions","organizations_url":"https://api.github.com/users/nextstrain/orgs","repos_url":"https://api.github.com/users/nextstrain/repos","events_url":"https://api.github.com/users/nextstrain/events{/privacy}","received_events_url":"https://api.github.com/users/nextstrain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nextstrain/auspice","description":"Web app for visualizing pathogen evolution","fork":false,"url":"https://api.github.com/repos/nextstrain/auspice","forks_url":"https://api.github.com/repos/nextstrain/auspice/forks","keys_url":"https://api.github.com/repos/nextstrain/auspice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nextstrain/auspice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nextstrain/auspice/teams","hooks_url":"https://api.github.com/repos/nextstrain/auspice/hooks","issue_events_url":"https://api.github.com/repos/nextstrain/auspice/issues/events{/number}","events_url":"https://api.github.com/repos/nextstrain/auspice/events","assignees_url":"https://api.github.com/repos/nextstrain/auspice/assignees{/user}","branches_url":"https://api.github.com/repos/nextstrain/auspice/branches{/branch}","tags_url":"https://api.github.com/repos/nextstrain/auspice/tags","blobs_url":"https://api.github.com/repos/nextstrain/auspice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nextstrain/auspice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nextstrain/auspice/git/refs{/sha}","trees_url":"https://api.github.com/repos/nextstrain/auspice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nextstrain/auspice/statuses/{sha}","languages_url":"https://api.github.com/repos/nextstrain/auspice/languages","stargazers_url":"https://api.github.com/repos/nextstrain/auspice/stargazers","contributors_url":"https://api.github.com/repos/nextstrain/auspice/contributors","subscribers_url":"https://api.github.com/repos/nextstrain/auspice/subscribers","subscription_url":"https://api.github.com/repos/nextstrain/auspice/subscription","commits_url":"https://api.github.com/repos/nextstrain/auspice/commits{/sha}","git_commits_url":"https://api.github.com/repos/nextstrain/auspice/git/commits{/sha}","comments_url":"https://api.github.com/repos/nextstrain/auspice/comments{/number}","issue_comment_url":"https://api.github.com/repos/nextstrain/auspice/issues/comments{/number}","contents_url":"https://api.github.com/repos/nextstrain/auspice/contents/{+path}","compare_url":"https://api.github.com/repos/nextstrain/auspice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nextstrain/auspice/merges","archive_url":"https://api.github.com/repos/nextstrain/auspice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nextstrain/auspice/downloads","issues_url":"https://api.github.com/repos/nextstrain/auspice/issues{/number}","pulls_url":"https://api.github.com/repos/nextstrain/auspice/pulls{/number}","milestones_url":"https://api.github.com/repos/nextstrain/auspice/milestones{/number}","notifications_url":"https://api.github.com/repos/nextstrain/auspice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nextstrain/auspice/labels{/name}","releases_url":"https://api.github.com/repos/nextstrain/auspice/releases{/id}","deployments_url":"https://api.github.com/repos/nextstrain/auspice/deployments","created_at":"2016-04-22T19:54:18Z","updated_at":"2018-07-20T16:30:05Z","pushed_at":"2018-07-25T05:10:49Z","git_url":"git://github.com/nextstrain/auspice.git","ssh_url":"git@github.com:nextstrain/auspice.git","clone_url":"https://github.com/nextstrain/auspice.git","svn_url":"https://github.com/nextstrain/auspice","homepage":null,"size":6686,"stargazers_count":24,"watchers_count":24,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":8,"open_issues":59,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nextstrain/auspice/pulls/604"},"html":{"href":"https://github.com/nextstrain/auspice/pull/604"},"issue":{"href":"https://api.github.com/repos/nextstrain/auspice/issues/604"},"comments":{"href":"https://api.github.com/repos/nextstrain/auspice/issues/604/comments"},"review_comments":{"href":"https://api.github.com/repos/nextstrain/auspice/pulls/604/comments"},"review_comment":{"href":"https://api.github.com/repos/nextstrain/auspice/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nextstrain/auspice/pulls/604/commits"},"statuses":{"href":"https://api.github.com/repos/nextstrain/auspice/statuses/2481a8ac10ee09853e5205ed4995a5cb06cfa5f7"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":19,"additions":996,"deletions":911,"changed_files":44}}
{"actor":{"display_login":"jameshadfield"}}