{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/crates.io/issues/473","repository_url":"https://api.github.com/repos/rust-lang/crates.io","labels_url":"https://api.github.com/repos/rust-lang/crates.io/issues/473/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/crates.io/issues/473/comments","events_url":"https://api.github.com/repos/rust-lang/crates.io/issues/473/events","html_url":"https://github.com/rust-lang/crates.io/pull/473","id":190114430,"number":473,"title":"Add Categorization!","user":{"login":"carols10cents","id":193874,"avatar_url":"https://avatars.githubusercontent.com/u/193874?v=3","gravatar_id":"","url":"https://api.github.com/users/carols10cents","html_url":"https://github.com/carols10cents","followers_url":"https://api.github.com/users/carols10cents/followers","following_url":"https://api.github.com/users/carols10cents/following{/other_user}","gists_url":"https://api.github.com/users/carols10cents/gists{/gist_id}","starred_url":"https://api.github.com/users/carols10cents/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carols10cents/subscriptions","organizations_url":"https://api.github.com/users/carols10cents/orgs","repos_url":"https://api.github.com/users/carols10cents/repos","events_url":"https://api.github.com/users/carols10cents/events{/privacy}","received_events_url":"https://api.github.com/users/carols10cents/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-11-17T17:39:31Z","updated_at":"2016-12-05T17:20:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/crates.io/pulls/473","html_url":"https://github.com/rust-lang/crates.io/pull/473","diff_url":"https://github.com/rust-lang/crates.io/pull/473.diff","patch_url":"https://github.com/rust-lang/crates.io/pull/473.patch"},"body":"Hiiii! This is the first part of adding categories to crates.io!\r\n\r\n## What this PR does\r\n\r\n- On server startup, take the list of categories in `src/categories.txt` and add or remove categories from the database as needed to make the database match the categories. This way, the list of available categories can be changed via pull request to this repo. \r\n- A `/categories` page not yet linked from anywhere that displays all the categories in alphabetical order\r\n- A `/categories/whatever` page that will list all the crates in a category\r\n- If a crate has categories, they will be listed on that crate's page in the sidebar under Keywords\r\n- If categories are specified in the metadata uploaded with a new crate request from cargo, they will be added to the crate. (Implemented in rust-lang/cargo#3301)\r\n\r\n## Testing this PR\r\n\r\n```\r\n$ cargo build\r\n$ cargo run --bin migrate\r\n$ cargo run --bin sync-categories\r\n$ cargo run --bin server\r\n```\r\n\r\nStart the frontend as well (Note: I had to use `ember server --proxy http://127.0.0.1:8888` instead of `yarn run start:local` with the latest version of yarn in order to actually use my local backend, I'm investigating why this is the case)\r\n\r\n- You should be able to go to `/categories` and see 2 categories, \"Development Tools\" and \"Libraries\"\r\n- You should be able to click on those categories and see 0 crates. They each have subcategories, that should also have 0 crates.\r\n- Publish a crate to your local crates.io (I had to comment out code uploading to s3 since I didn't want to do that)\r\n- Using rust-lang/cargo#3301, publish to your local index\r\n- You should see your crate on that category's page\r\n- You should see the category on the crate's page (might have to do a shift-reload because of ember caching)\r\n\r\n## Deploying this PR \r\n\r\nIt should be totally fine to deploy this PR to crates.io. Nothing links to /categories, and cargo does not publish category metadata yet-- and neither cargo nor crates.io will complain if a crate is not in any categories.\r\n\r\n## After this PR is merged\r\n\r\n- I will start a PR to categories.txt where we can bikeshed what we actually want the initial set of categories to be\r\n- I will open a PR to add a link to /categories somewhere \r\n- I will send some popular crates PRs to add categories\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/crates.io/issues/comments/264916511","html_url":"https://github.com/rust-lang/crates.io/pull/473#issuecomment-264916511","issue_url":"https://api.github.com/repos/rust-lang/crates.io/issues/473","id":264916511,"user":{"login":"carols10cents","id":193874,"avatar_url":"https://avatars.githubusercontent.com/u/193874?v=3","gravatar_id":"","url":"https://api.github.com/users/carols10cents","html_url":"https://github.com/carols10cents","followers_url":"https://api.github.com/users/carols10cents/followers","following_url":"https://api.github.com/users/carols10cents/following{/other_user}","gists_url":"https://api.github.com/users/carols10cents/gists{/gist_id}","starred_url":"https://api.github.com/users/carols10cents/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carols10cents/subscriptions","organizations_url":"https://api.github.com/users/carols10cents/orgs","repos_url":"https://api.github.com/users/carols10cents/repos","events_url":"https://api.github.com/users/carols10cents/events{/privacy}","received_events_url":"https://api.github.com/users/carols10cents/received_events","type":"User","site_admin":false},"created_at":"2016-12-05T17:20:57Z","updated_at":"2016-12-05T17:20:57Z","body":"IT'S PASSING IT'S PASSING!!!!!"}}
{"actor":{"display_login":"carols10cents"}}