{"action":"created","issue":{"url":"https://api.github.com/repos/nextstrain/augur/issues/158","repository_url":"https://api.github.com/repos/nextstrain/augur","labels_url":"https://api.github.com/repos/nextstrain/augur/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/nextstrain/augur/issues/158/comments","events_url":"https://api.github.com/repos/nextstrain/augur/issues/158/events","html_url":"https://github.com/nextstrain/augur/pull/158","id":339551708,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMTc3MTE2","number":158,"title":"JSON schema 2.0 proposal","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":25,"created_at":"2018-07-09T18:05:04Z","updated_at":"2018-07-20T19:29:34Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/nextstrain/augur/pulls/158","html_url":"https://github.com/nextstrain/augur/pull/158","diff_url":"https://github.com/nextstrain/augur/pull/158.diff","patch_url":"https://github.com/nextstrain/augur/pull/158.patch"},"body":"As we roll out modular augur, this is the correct time to make breaking changes to the current JSON schema. Here is my proposal for the meta & tree JSONs (easiest to just read the schemas themselves: https://github.com/nextstrain/augur/blob/new-schema/augur/data/schema_tree.json & https://github.com/nextstrain/augur/blob/new-schema/augur/data/schema_meta.json). Please comment / add commits to this PR.\r\n\r\n**note: this schema is not yet supposed to be run by `augur validate` as it will fail**\r\n\r\n### Main changes\r\n* Make it clearer which values live on a tree node itself, and which in `node.attr` (or `node.traits` as I’ve called it).\r\n\t*  The “traits” store inferred data which is build-specific, as opposed to the properties on the node which should be present in most builds.\r\n\t* Confidence / entropy are stored together with the value itself. We have 2 types of confidence - `[x, y]` and `{valA: 0.4, valB: 0.3, …}`, maybe these should get different keys to distinguish them?\r\n* Everything’s camelCase\r\n* Keys have been renamed to make it clearer what they relate to\r\n* The color-bys specifications have been made clearer and more powerful (continuing from https://github.com/nextstrain/auspice/issues/571)\r\n* Vaccine information is now a property of the node, not in meta. I’m not sure what structure this should take.\r\n* `node.muts` and `node.aa_muts` are combined into `node.mutations` paralleling the structure of `metadataJSON.annotations`\r\n* The string version of a node date is gone and we just use `numDate` for everything\r\n* Missing values (i.e. unknown accession) are excluded from the JSON rather than getting a `?` or `null` value. Schema validation can enforce this.\r\n* Encode a JSON schema version in the metadata JSON\r\n\r\n### Should we combine the tree & meta JSONs\r\nI.e. a single JSON, with `json.tree`  referring to the nested node structure. There is probably a reason why y’all went with the two JSONs originally?\r\n\r\n\r\nAny other breaking changes we can think of should be added to this PR. "},"comment":{"url":"https://api.github.com/repos/nextstrain/augur/issues/comments/406704362","html_url":"https://github.com/nextstrain/augur/pull/158#issuecomment-406704362","issue_url":"https://api.github.com/repos/nextstrain/augur/issues/158","id":406704362,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjcwNDM2Mg==","user":{"login":"tsibley","id":79913,"node_id":"MDQ6VXNlcjc5OTEz","avatar_url":"https://avatars2.githubusercontent.com/u/79913?v=4","gravatar_id":"","url":"https://api.github.com/users/tsibley","html_url":"https://github.com/tsibley","followers_url":"https://api.github.com/users/tsibley/followers","following_url":"https://api.github.com/users/tsibley/following{/other_user}","gists_url":"https://api.github.com/users/tsibley/gists{/gist_id}","starred_url":"https://api.github.com/users/tsibley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsibley/subscriptions","organizations_url":"https://api.github.com/users/tsibley/orgs","repos_url":"https://api.github.com/users/tsibley/repos","events_url":"https://api.github.com/users/tsibley/events{/privacy}","received_events_url":"https://api.github.com/users/tsibley/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T19:29:34Z","updated_at":"2018-07-20T19:29:34Z","author_association":"CONTRIBUTOR","body":"I think that defaulting to `--schema-version 2` is fine, where \"2\" gets bumped with each new schema version.  That is, I don't think we need a special `latest` keyword/alias.  My point was mostly that we explicitly don't want to support arbitrary schema versions indefinitely.  This means that for now `--schema-version 1` and `--schema-version 2` will work, but eventually the former stops being supported. And the same with `--schema-version 2` once we have a version 3, etc."}}
{"actor":{"display_login":"tsibley"}}