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

/-/plugins shows incorrect name for plugins #606

Closed
simonw opened this issue Oct 24, 2019 · 3 comments
Closed

/-/plugins shows incorrect name for plugins #606

simonw opened this issue Oct 24, 2019 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented Oct 24, 2019

https://fivethirtyeight.datasettes.com/-/plugins

[
    {
        "name": "datasette_jellyfish",
        "static": false,
        "templates": false,
        "version": "0.3"
    },
    {
        "name": "datasette_vega",
        "static": true,
        "templates": false,
        "version": "0.6.2"
    }
]

These should be shown as datasette-jellyfish and datasette-vega since those are the names on PyPI.

@simonw
Copy link
Owner Author

simonw commented Oct 24, 2019

Here's a clue as to where to get it from:

In [20]: mod, dist = pm.list_plugin_distinfo()[0]                                                                                                           

In [21]: print(str(dist.metadata))                                                                                                                          
Metadata-Version: 2.1
Name: datasette-haversine
Version: 0.1
Summary: Datasette plugin that adds a custom SQL function for haversine distances
Home-page: https://github.com/simonw/datasette-haversine
Author: Simon Willison
License: Apache License, Version 2.0
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: datasette
Requires-Dist: haversine
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

# datasette-haversine

[![PyPI](https://img.shields.io/pypi/v/datasette-haversine.svg)](https://pypi.org/project/datasette-haversine/)
[![CircleCI](https://circleci.com/gh/simonw/datasette-haversine.svg?style=svg)](https://circleci.com/gh/simonw/datasette-haversine)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-haversine/blob/master/LICENSE)

Datasette plugin that adds a custom SQL function for haversine distances

@simonw
Copy link
Owner Author

simonw commented Oct 24, 2019

Actually this is better:

In [26]: dist.project_name                                                                                                                                  
Out[26]: 'datasette-haversine'

@simonw simonw closed this as completed in 937828f Nov 1, 2019
@simonw
Copy link
Owner Author

simonw commented Nov 1, 2019

Couldn't easily write a test for this as plugin tests don't currently work against packaged plugins.

Here's the new datasette plugins output:

$ datasette plugins
[
    {
        "name": "datasette-cluster-map",
        "static": true,
        "templates": false,
        "version": "0.6"
    },
    {
        "name": "datasette-json-html",
        "static": false,
        "templates": false,
        "version": "0.5"
    },
    {
        "name": "datasette-vega",
        "static": true,
        "templates": false,
        "version": "0.6.2"
    }
]

Same output from /-/plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant