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

Provide a way to get a list of all trove classifiers #1241

Closed
brettcannon opened this issue Jun 6, 2016 · 8 comments
Closed

Provide a way to get a list of all trove classifiers #1241

brettcannon opened this issue Jun 6, 2016 · 8 comments
Labels
feature request good first issue This issue is ideal for first-time contributors!

Comments

@brettcannon
Copy link
Contributor

I.e. https://pypi.python.org/pypi?%3Aaction=list_classifiers

@dstufft dstufft added this to the Launch milestone Jun 6, 2016
@alex
Copy link
Member

alex commented Jun 6, 2016

Would a JSON endpoint that returns a list of trove classifiers work, or do
you care about that exact format?

On Mon, Jun 6, 2016 at 7:09 PM, Brett Cannon [email protected]
wrote:

I.e. https://pypi.python.org/pypi?%3Aaction=list_classifiers


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1241, or mute the thread
https://github.com/notifications/unsubscribe/AAADBG-YlEJv6FQTgmUPbdETbPLh3TRrks5qJKi4gaJpZM4IvZ8i
.

"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: D1B3 ADC0 E023 8CA6

@dstufft
Copy link
Member

dstufft commented Jun 6, 2016

We should probably implement the old format either way since it's fairly trivial to do and I'm sure Brett isn't the only person relying on it.

@alex
Copy link
Member

alex commented Jun 6, 2016

@dstufft Can you mark this with a "good for new contributor" label?

@dstufft dstufft added the good first issue This issue is ideal for first-time contributors! label Jun 6, 2016
@brettcannon
Copy link
Contributor Author

Just an FYI a JSON value would be great as that's cleaner to work with.

@dstufft
Copy link
Member

dstufft commented Jun 6, 2016

To be clear, I think we should get a JSON API for it too. Sorting out a JSON endpoint for this might be a good excuse to sit down and do #284, but I think we should also implement the old format too :)

@karan
Copy link

karan commented Jun 7, 2016

I might be able to take this on. A couple questions before I start:

  1. Would this go under legacy?
  2. What would the end point be (same as pypi)?

@dstufft
Copy link
Member

dstufft commented Jun 7, 2016

Yea it'd go under legacy, you could just stick it in warehouse/legacy/api/pypi.py. The doap view in that same file is a good example of how to register something that uses the ?:action= dispatching. that should look something like:

@view_config(route_name="legacy.api.pypi.list_classifiers")
def list_classifiers(request):
    pass  # TODO: Add an Implementation

You'll also need to add a route in warehouse/routes.py, again you can use the doap as an example, and it should look something like:

config.add_pypi_action_route(
    "legacy.api.pypi.list_classifiers",
    "list_classifiers",
    domain=warehouse,
)

@dstufft
Copy link
Member

dstufft commented Jun 7, 2016

Fixed in #1243, added #1244 explicitly for the JSON side of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request good first issue This issue is ideal for first-time contributors!
Projects
None yet
Development

No branches or pull requests

5 participants