datasette-comments


Namedatasette-comments JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryA Datasette plugin for commenting on tables, rows, and values
upload_time2023-11-30 18:25:43
maintainer
docs_urlNone
authorAlex Garcia
requires_python
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # datasette-comments

[![PyPI](https://img.shields.io/pypi/v/datasette-comments.svg)](https://pypi.org/project/datasette-comments/)
[![Changelog](https://img.shields.io/github/v/release/datasette/datasette-comments?include_prereleases&label=changelog)](https://github.com/datasette/datasette-comments/releases)
[![Tests](https://github.com/datasette/datasette-comments/workflows/Test/badge.svg)](https://github.com/datasette/datasette-comments/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/datasette/datasette-comments/blob/main/LICENSE)

A Datasette plugin for commenting on tables, rows, and values. Work in progress, not ready yet!

## Installation

Install this plugin in the same environment as Datasette.
```bash
datasette install datasette-comments
```
## Usage

Once installed, users with the `datasette-comments-access` will be able to view and add comments on rows within their Datasette instance.

## Plugin hooks

This plugin provies the following plugin hook which can be used to customize its behavior:

### datasette_comments_users(datasette)

This hook should return a list of dictionaries, each representing a user that should be made available to the plugin. Each dictionary should have the following keys:

- `id`: A unique ID of the user, same as the actor ID.
- `username`: A unique string that is used in searches and @ mentions.
- `name`: A string of the user's natural name.
- `profile_photo_url`: Optional URL to the user's profile pic.
- `email`: Optional email used for gravatar profile photo, if enabled.

The plugin hook can return a list, or it can return an awaitable function that returns a list.

## Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:
```bash
cd datasette-comments
python3 -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```bash
pip install -e '.[test]'
```
And for the JavaScript dependencies (needed to run a JavaScript build):
```bash
npm install
```
To run the tests:
```bash
pytest
```

To rebuild the minified JavaScript after making a change to a `.ts` or `.tsx` file:

```bash
just js
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "datasette-comments",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Alex Garcia",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/b3/f5/4cbf49ac7556f4b0590f77edcf273cd36de45ae1231157ceddea2fe23644/datasette-comments-0.1.0.tar.gz",
    "platform": null,
    "description": "# datasette-comments\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-comments.svg)](https://pypi.org/project/datasette-comments/)\n[![Changelog](https://img.shields.io/github/v/release/datasette/datasette-comments?include_prereleases&label=changelog)](https://github.com/datasette/datasette-comments/releases)\n[![Tests](https://github.com/datasette/datasette-comments/workflows/Test/badge.svg)](https://github.com/datasette/datasette-comments/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/datasette/datasette-comments/blob/main/LICENSE)\n\nA Datasette plugin for commenting on tables, rows, and values. Work in progress, not ready yet!\n\n## Installation\n\nInstall this plugin in the same environment as Datasette.\n```bash\ndatasette install datasette-comments\n```\n## Usage\n\nOnce installed, users with the `datasette-comments-access` will be able to view and add comments on rows within their Datasette instance.\n\n## Plugin hooks\n\nThis plugin provies the following plugin hook which can be used to customize its behavior:\n\n### datasette_comments_users(datasette)\n\nThis hook should return a list of dictionaries, each representing a user that should be made available to the plugin. Each dictionary should have the following keys:\n\n- `id`: A unique ID of the user, same as the actor ID.\n- `username`: A unique string that is used in searches and @ mentions.\n- `name`: A string of the user's natural name.\n- `profile_photo_url`: Optional URL to the user's profile pic.\n- `email`: Optional email used for gravatar profile photo, if enabled.\n\nThe plugin hook can return a list, or it can return an awaitable function that returns a list.\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd datasette-comments\npython3 -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```bash\npip install -e '.[test]'\n```\nAnd for the JavaScript dependencies (needed to run a JavaScript build):\n```bash\nnpm install\n```\nTo run the tests:\n```bash\npytest\n```\n\nTo rebuild the minified JavaScript after making a change to a `.ts` or `.tsx` file:\n\n```bash\njust js\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A Datasette plugin for commenting on tables, rows, and values",
    "version": "0.1.0",
    "project_urls": {
        "CI": "https://github.com/datasette/datasette-comments/actions",
        "Changelog": "https://github.com/datasette/datasette-comments/releases",
        "Homepage": "https://github.com/datasette/datasette-comments",
        "Issues": "https://github.com/datasette/datasette-comments/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e74ed6163b8d5918fbd98286260efbfc09ac02b44b6313570a4d113b783ef489",
                "md5": "db7a91d1524ea1490076b97ddc3fd73f",
                "sha256": "d740f93c66dd50c3b6e1bf5bc3ae1518dea1f4a57a1c780ff669bf5e328b9da5"
            },
            "downloads": -1,
            "filename": "datasette_comments-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "db7a91d1524ea1490076b97ddc3fd73f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 53780,
            "upload_time": "2023-11-30T18:25:41",
            "upload_time_iso_8601": "2023-11-30T18:25:41.716722Z",
            "url": "https://files.pythonhosted.org/packages/e7/4e/d6163b8d5918fbd98286260efbfc09ac02b44b6313570a4d113b783ef489/datasette_comments-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b3f54cbf49ac7556f4b0590f77edcf273cd36de45ae1231157ceddea2fe23644",
                "md5": "61bbd08da649849c768cffa6fa6de641",
                "sha256": "5b29abdb2bb9b115fae4f68c0d84560213ba63682dc6711fc571a86b0ee9cbfb"
            },
            "downloads": -1,
            "filename": "datasette-comments-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "61bbd08da649849c768cffa6fa6de641",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 47579,
            "upload_time": "2023-11-30T18:25:43",
            "upload_time_iso_8601": "2023-11-30T18:25:43.620327Z",
            "url": "https://files.pythonhosted.org/packages/b3/f5/4cbf49ac7556f4b0590f77edcf273cd36de45ae1231157ceddea2fe23644/datasette-comments-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-30 18:25:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "datasette",
    "github_project": "datasette-comments",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "datasette-comments"
}
        
Elapsed time: 0.44422s