deephaven-plugin-voice-table


Namedeephaven-plugin-voice-table JSON
Version 0.0.1.dev1 PyPI version JSON
download
home_pageNone
Summarydeephaven.ui plugin to use voice to control a table
upload_time2024-08-05 17:47:09
maintainerNone
docs_urlNone
authorMike Bender
requires_pythonNone
licenseNone
keywords deephaven plugin microphone voice table deephaven.ui
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # deephaven-plugin-voice-table

This is a Python plugin for Deephaven generated from a [deephaven-plugin](https://github.com/deephaven/deephaven-plugins) template.

This plugin display a table with a voice control interface. Press and hold the micrphone button, speak a command, and the table will update with the filters and sorts you specified.

## Plugin Structure

The `src` directory contains the Python and JavaScript code for the plugin.
Within the `src` directory, the deephaven_plugin_voice_table directory contains the Python code.

Additionally, the `test` directory contains Python tests for the plugin. This demonstrates how the embedded Deephaven server can be used in tests.
It's recommended to use `tox` to run the tests, and the `tox.ini` file is included in the project.

## Building the Plugin

To build the plugin, you will need `python` installed, as well as the `build` package for Python.
The python venv can be created and the recommended packages installed with the following commands:

```sh
cd deephaven_plugin_voice_table
python -m venv .venv
source .venv/bin/activate
pip install --upgrade -r requirements.txt
```

Then, build the Python plugin from the top-level directory:

```sh
python -m build --wheel
```

The built wheel file will be located in the `dist` directory.

## Installing the Plugin

The plugin can be installed into a Deephaven instance with `pip install <wheel file>`.
The wheel file is stored in the `dist` directory after building the plugin.
Exactly how this is done will depend on how you are running Deephaven.
If using the venv created above, the plugin and server can be created with the following commands:

```sh
pip install deephaven-server
pip install dist/deephaven_plugin_voice_table-0.0.1.dev0-py3-none-any.whl
deephaven server
```

See the [plug-in documentation](https://deephaven.io/core/docs/how-to-guides/use-plugins/) for more information.

## Using the Plugin

Once the Deephaven server is running, the plugin should be available to use.

For a basic example, run the following code:

```python
from deephaven import new_table
from deephaven.column import string_col, int_col
from deephaven_plugin_voice_table import ui_voice_table

_basic_table = new_table(
    [
        string_col("First", ["John", "Jane", "John", "Mike", "Jane", "Bob"]),
        string_col("Last", ["Doe", "Smith", "Cruise", "Smith", "Doe", "Smith"]),
        int_col("Id", [1, 2, 3, 4, 5, 6])
    ]
)

vc_basic_table = ui_voice_table(_basic_table)
```

A panel should appear with a table and a microphone. Click and hold the microphone, speak a command, and release the microphone to apply the command. Some example commands you could speak:

- Filter a column: "Filter <column> by <value>", e.g. "Filter First by John"
- Sort a column: "Sort <column> <ascending/descending>", e.g. "Sort First descending"
- Multiple commands you can separate with "and", e.g. "Filter First by John and Sort Last descending"

![Voice controlled table filtered](./assets/vc_basic_table.png)

For a more complex example, install the `deephaven-plugin-plotly-express` plugin for some extra data sets and run the following:

```python
from deephaven_plugin_voice_table import ui_voice_table
import deephaven.plot.express as dx

_stocks = dx.data.stocks()

vc_stocks = ui_voice_table(_stocks)
```

Say a command like "Filter sym by CAT and filter exchange by PETX and sort size down" to see the table update:
![Voice controlled stock table filtered and sorted](./assets/vc_stocks.png)

## Distributing the Plugin

To distribute the plugin, you can upload the wheel file to a package repository, such as [PyPI](https://pypi.org/).
The version of the plugin can be updated in the `setup.cfg` file.

There is a separate instance of PyPI for testing purposes.
Start by creating an account at [TestPyPI](https://test.pypi.org/account/register/).
Then, get an API token from [account management](https://test.pypi.org/manage/account/#api-tokens), setting the “Scope” to “Entire account”.

To upload to the test instance, use the following commands:

```sh
python -m pip install --upgrade twine
python -m twine upload --repository testpypi dist/*
```

Now, you can install the plugin from the test instance. The extra index is needed to find dependencies:

```sh
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ deephaven-plugin-voice-table
```

For a production release, create an account at [PyPI](https://pypi.org/account/register/).
Then, get an API token from [account management](https://pypi.org/manage/account/#api-tokens), setting the “Scope” to “Entire account”.

To upload to the production instance, use the following commands.
Note that `--repository` is the production instance by default, so it can be omitted:

```sh
python -m pip install --upgrade twine
python -m twine upload dist/*
```

Now, you can install the plugin from the production instance:

```sh
pip install deephaven-plugin-voice-table
```

See the [Python packaging documentation](https://packaging.python.org/en/latest/tutorials/packaging-projects/#uploading-the-distribution-archives) for more information.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "deephaven-plugin-voice-table",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "deephaven, plugin, microphone, voice, table, deephaven.ui",
    "author": "Mike Bender",
    "author_email": "mikebender@deephaven.io",
    "download_url": null,
    "platform": "any",
    "description": "# deephaven-plugin-voice-table\n\nThis is a Python plugin for Deephaven generated from a [deephaven-plugin](https://github.com/deephaven/deephaven-plugins) template.\n\nThis plugin display a table with a voice control interface. Press and hold the micrphone button, speak a command, and the table will update with the filters and sorts you specified.\n\n## Plugin Structure\n\nThe `src` directory contains the Python and JavaScript code for the plugin.\nWithin the `src` directory, the deephaven_plugin_voice_table directory contains the Python code.\n\nAdditionally, the `test` directory contains Python tests for the plugin. This demonstrates how the embedded Deephaven server can be used in tests.\nIt's recommended to use `tox` to run the tests, and the `tox.ini` file is included in the project.\n\n## Building the Plugin\n\nTo build the plugin, you will need `python` installed, as well as the `build` package for Python.\nThe python venv can be created and the recommended packages installed with the following commands:\n\n```sh\ncd deephaven_plugin_voice_table\npython -m venv .venv\nsource .venv/bin/activate\npip install --upgrade -r requirements.txt\n```\n\nThen, build the Python plugin from the top-level directory:\n\n```sh\npython -m build --wheel\n```\n\nThe built wheel file will be located in the `dist` directory.\n\n## Installing the Plugin\n\nThe plugin can be installed into a Deephaven instance with `pip install <wheel file>`.\nThe wheel file is stored in the `dist` directory after building the plugin.\nExactly how this is done will depend on how you are running Deephaven.\nIf using the venv created above, the plugin and server can be created with the following commands:\n\n```sh\npip install deephaven-server\npip install dist/deephaven_plugin_voice_table-0.0.1.dev0-py3-none-any.whl\ndeephaven server\n```\n\nSee the [plug-in documentation](https://deephaven.io/core/docs/how-to-guides/use-plugins/) for more information.\n\n## Using the Plugin\n\nOnce the Deephaven server is running, the plugin should be available to use.\n\nFor a basic example, run the following code:\n\n```python\nfrom deephaven import new_table\nfrom deephaven.column import string_col, int_col\nfrom deephaven_plugin_voice_table import ui_voice_table\n\n_basic_table = new_table(\n    [\n        string_col(\"First\", [\"John\", \"Jane\", \"John\", \"Mike\", \"Jane\", \"Bob\"]),\n        string_col(\"Last\", [\"Doe\", \"Smith\", \"Cruise\", \"Smith\", \"Doe\", \"Smith\"]),\n        int_col(\"Id\", [1, 2, 3, 4, 5, 6])\n    ]\n)\n\nvc_basic_table = ui_voice_table(_basic_table)\n```\n\nA panel should appear with a table and a microphone. Click and hold the microphone, speak a command, and release the microphone to apply the command. Some example commands you could speak:\n\n- Filter a column: \"Filter <column> by <value>\", e.g. \"Filter First by John\"\n- Sort a column: \"Sort <column> <ascending/descending>\", e.g. \"Sort First descending\"\n- Multiple commands you can separate with \"and\", e.g. \"Filter First by John and Sort Last descending\"\n\n![Voice controlled table filtered](./assets/vc_basic_table.png)\n\nFor a more complex example, install the `deephaven-plugin-plotly-express` plugin for some extra data sets and run the following:\n\n```python\nfrom deephaven_plugin_voice_table import ui_voice_table\nimport deephaven.plot.express as dx\n\n_stocks = dx.data.stocks()\n\nvc_stocks = ui_voice_table(_stocks)\n```\n\nSay a command like \"Filter sym by CAT and filter exchange by PETX and sort size down\" to see the table update:\n![Voice controlled stock table filtered and sorted](./assets/vc_stocks.png)\n\n## Distributing the Plugin\n\nTo distribute the plugin, you can upload the wheel file to a package repository, such as [PyPI](https://pypi.org/).\nThe version of the plugin can be updated in the `setup.cfg` file.\n\nThere is a separate instance of PyPI for testing purposes.\nStart by creating an account at [TestPyPI](https://test.pypi.org/account/register/).\nThen, get an API token from [account management](https://test.pypi.org/manage/account/#api-tokens), setting the \u201cScope\u201d to \u201cEntire account\u201d.\n\nTo upload to the test instance, use the following commands:\n\n```sh\npython -m pip install --upgrade twine\npython -m twine upload --repository testpypi dist/*\n```\n\nNow, you can install the plugin from the test instance. The extra index is needed to find dependencies:\n\n```sh\npip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ deephaven-plugin-voice-table\n```\n\nFor a production release, create an account at [PyPI](https://pypi.org/account/register/).\nThen, get an API token from [account management](https://pypi.org/manage/account/#api-tokens), setting the \u201cScope\u201d to \u201cEntire account\u201d.\n\nTo upload to the production instance, use the following commands.\nNote that `--repository` is the production instance by default, so it can be omitted:\n\n```sh\npython -m pip install --upgrade twine\npython -m twine upload dist/*\n```\n\nNow, you can install the plugin from the production instance:\n\n```sh\npip install deephaven-plugin-voice-table\n```\n\nSee the [Python packaging documentation](https://packaging.python.org/en/latest/tutorials/packaging-projects/#uploading-the-distribution-archives) for more information.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "deephaven.ui plugin to use voice to control a table",
    "version": "0.0.1.dev1",
    "project_urls": null,
    "split_keywords": [
        "deephaven",
        " plugin",
        " microphone",
        " voice",
        " table",
        " deephaven.ui"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6066a0d2e03d072e8028c392e631069f8e9dce7500f120eaf16fb525ad5476b9",
                "md5": "1b31cca423c526bc664b83c7df0f579e",
                "sha256": "c522ed902e97b994a3e2d878fe3dd5c276a17de523e412a84f75cca36ef3511f"
            },
            "downloads": -1,
            "filename": "deephaven_plugin_voice_table-0.0.1.dev1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1b31cca423c526bc664b83c7df0f579e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10718,
            "upload_time": "2024-08-05T17:47:09",
            "upload_time_iso_8601": "2024-08-05T17:47:09.601377Z",
            "url": "https://files.pythonhosted.org/packages/60/66/a0d2e03d072e8028c392e631069f8e9dce7500f120eaf16fb525ad5476b9/deephaven_plugin_voice_table-0.0.1.dev1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-05 17:47:09",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "deephaven-plugin-voice-table"
}
        
Elapsed time: 3.23843s