Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Categorization! #473

Merged
merged 34 commits into from
Dec 29, 2016
Merged

Commits on Dec 28, 2016

  1. Configuration menu
    Copy the full SHA
    e18b2f2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7893307 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3854dfc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    55f201f View commit details
    Browse the repository at this point in the history
  5. Alphabetize mods

    I like when they match up with the filenames :)
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    e46971d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9c8ff2d View commit details
    Browse the repository at this point in the history
  7. Extract a method for encoding a crate without all its metadata

    I draw the line at 3 None arguments.
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    5e8d7be View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7cb99cf View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c8442ed View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    54c374b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    fcd7b28 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5a8ad82 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    6364c73 View commit details
    Browse the repository at this point in the history
  14. Use a pretty slug for categories in URLs

    Categories are now specified by slug in Cargo.toml. This will allow
    crates.io to change the display text of a category but still have crates
    in those categories.
    
    Characters allowed in slugs are from RFC 3986, those that are valid in
    path segments (pchar) https://tools.ietf.org/html/rfc3986#page-22
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    29f8e2e View commit details
    Browse the repository at this point in the history
  15. Change the header text on a category page

    Looking at some of the categories I have locally, I think, for example,
    "Command-line argument parsing Crates" is clearer than "All Crates for
    category 'Command-line argument parsing'"
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    d20cfc3 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    9c36d77 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    27b8f95 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    d421dbd View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    82f810c View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    a3655bd View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    cb7c262 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    2dcec87 View commit details
    Browse the repository at this point in the history
  23. Add a page listing all valid category slugs

    To direct people to when they have specified an invalid slug.
    
    JSON containing all the slugs is available at
    /api/v1/category_slugs, but visiting that in a browser doesn't work.
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    e3e10fd View commit details
    Browse the repository at this point in the history
  24. Make warnings about invalid crate names be JSON instead of text

    And cargo will handle making nice English messages out of them.
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    1cee6d8 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    f7d2780 View commit details
    Browse the repository at this point in the history
  26. Add descriptions to categories

    Have to switch from a nice batch insert to running a query for each
    category so that we can use apostrophes in the descriptions and have
    the string escaped for SQL.
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    9318605 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    f0733d5 View commit details
    Browse the repository at this point in the history
  28. Fix the query for subcategories to only include the next level

    And not all descendant categories
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    ef33d9c View commit details
    Browse the repository at this point in the history
  29. Add a heading for Crates on a category page

    To better distinguish subcategories and crates. This makes "crates" in
    the h1 redundant, especially when there *aren't* subcategories.
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    a2531d4 View commit details
    Browse the repository at this point in the history
  30. Sort crates within a category by downloads by default

    There will be an RFC soon about whether this is the best ordering or
    not.
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    c75bb56 View commit details
    Browse the repository at this point in the history
  31. Sum crate count in all subcategories in a better way

    And make the top-level query that does this consistent with
    subcategory queries.
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    c81c950 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    c2d5cf8 View commit details
    Browse the repository at this point in the history
  33. Use a different crate name in a test to prevent deadlocks

    This test does a lot of different manipulations of categories and crate
    categories and it was using a crate named foo. The good_categories test
    also used a crate named foo, and these two tests were causing a postgres
    deadlock.
    
    I was able to cause deadlocks more often by duplicating the update_crate
    test and the good_categories test:
    
    https://travis-ci.org/integer32llc/crates.io/builds/187302718
    
    Making this change and running the duplicated tests resulted in 0
    deadlocks:
    
    https://travis-ci.org/integer32llc/crates.io/builds/187306433
    
    This is unlikely to happen in production; requests get a database
    connection that gets closed when the request finishes, and the publish
    request only modifies the categories once, not as much as the
    update_crate test is. It seems unlikely that two people would publish
    the same crate at exactly the same time.
    carols10cents committed Dec 28, 2016
    Configuration menu
    Copy the full SHA
    c6de914 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2016

  1. Configuration menu
    Copy the full SHA
    bffd16a View commit details
    Browse the repository at this point in the history