mito-ai


Namemito-ai JSON
Version 0.1.6 PyPI version JSON
download
home_pageNone
SummaryAI chat for JupyterLab
upload_time2024-12-06 18:47:39
maintainerNone
docs_urlNone
authorAaron Diamond-Reivich
requires_python>=3.8
licenseGNU Affero General Public License v3
keywords ai jupyter mito
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mito_ai

[![Github Actions Status](/workflows/Build/badge.svg)](/actions/workflows/build.yml)

AI chat for JupyterLab. This codebase contains two main components:
1. A Jupyter server extension that handles the backend logic for the chat.
2. Several JupyterLab extensions that handle the frontend logic for interacting with the AI, including the chat sidebar and the error message rendermime.

## Requirements

- JupyterLab >= 4.0.0

## Install

To install the extension, execute:

```bash
pip install mito-ai
```

## Uninstall

To remove the extension, execute:

```bash
pip uninstall mito-ai
```

## Contributing

### Development install

To ensure consistent package management, please use `jlpm` instead of `npm` for this project.

Note: You will need NodeJS to build the extension package.

The `jlpm` command is JupyterLab's pinned version of
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. 

```bash
# Clone the repo to your local environment
# Change directory to the mito-ai directory

# Required to deal with Yarn 3 workspace rules
touch yarn.lock

# Install package in development mode
pip install -e ".[test, deploy]"

# Install the node modules
jlpm install

# Build the extension
jlpm build

# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite

# Start the jupyter server extension for development
jupyter server extension enable --py mito-ai

# Watch the source directory in one terminal, automatically rebuilding when needed
# In case of Error: If this command fails because the lib directory was not created (the error will say something like
# unable to find main entry point) then run `jlpm run clean:lib` first to get rid of the old buildcache 
# that might be preventing a new lib directory from getting created. 
jlpm watch
```

Then, in a new terminal, run:

```bash
# Run JupyterLab in another terminal
jupyter lab
```

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:

```bash
jupyter lab build --minimize=False
```

### Development uninstall

```bash
pip uninstall mito-ai
```

In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
folder is located. Then you can remove the symlink named `mito-ai` within that folder.

### Testing the extension

#### Frontend tests

This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.

To execute them, execute:

```sh
jlpm
jlpm test
```

#### Integration tests

This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.

More information are provided within the [ui-tests](./ui-tests/README.md) README.

### Packaging the extension

See [RELEASE](RELEASE.md)



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mito-ai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "AI, Jupyter, Mito",
    "author": "Aaron Diamond-Reivich",
    "author_email": "aaron@sagacollab.com",
    "download_url": "https://files.pythonhosted.org/packages/2f/2b/fccd308e553fe6b902f1e04586e0b2d078e503ffa398ff32287a77dcd3b0/mito-ai-0.1.6.tar.gz",
    "platform": null,
    "description": "# mito_ai\n\n[![Github Actions Status](/workflows/Build/badge.svg)](/actions/workflows/build.yml)\n\nAI chat for JupyterLab. This codebase contains two main components:\n1. A Jupyter server extension that handles the backend logic for the chat.\n2. Several JupyterLab extensions that handle the frontend logic for interacting with the AI, including the chat sidebar and the error message rendermime.\n\n## Requirements\n\n- JupyterLab >= 4.0.0\n\n## Install\n\nTo install the extension, execute:\n\n```bash\npip install mito-ai\n```\n\n## Uninstall\n\nTo remove the extension, execute:\n\n```bash\npip uninstall mito-ai\n```\n\n## Contributing\n\n### Development install\n\nTo ensure consistent package management, please use `jlpm` instead of `npm` for this project.\n\nNote: You will need NodeJS to build the extension package.\n\nThe `jlpm` command is JupyterLab's pinned version of\n[yarn](https://yarnpkg.com/) that is installed with JupyterLab. \n\n```bash\n# Clone the repo to your local environment\n# Change directory to the mito-ai directory\n\n# Required to deal with Yarn 3 workspace rules\ntouch yarn.lock\n\n# Install package in development mode\npip install -e \".[test, deploy]\"\n\n# Install the node modules\njlpm install\n\n# Build the extension\njlpm build\n\n# Link your development version of the extension with JupyterLab\njupyter labextension develop . --overwrite\n\n# Start the jupyter server extension for development\njupyter server extension enable --py mito-ai\n\n# Watch the source directory in one terminal, automatically rebuilding when needed\n# In case of Error: If this command fails because the lib directory was not created (the error will say something like\n# unable to find main entry point) then run `jlpm run clean:lib` first to get rid of the old buildcache \n# that might be preventing a new lib directory from getting created. \njlpm watch\n```\n\nThen, in a new terminal, run:\n\n```bash\n# Run JupyterLab in another terminal\njupyter lab\n```\n\nWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).\n\nBy default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:\n\n```bash\njupyter lab build --minimize=False\n```\n\n### Development uninstall\n\n```bash\npip uninstall mito-ai\n```\n\nIn development mode, you will also need to remove the symlink created by `jupyter labextension develop`\ncommand. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`\nfolder is located. Then you can remove the symlink named `mito-ai` within that folder.\n\n### Testing the extension\n\n#### Frontend tests\n\nThis extension is using [Jest](https://jestjs.io/) for JavaScript code testing.\n\nTo execute them, execute:\n\n```sh\njlpm\njlpm test\n```\n\n#### Integration tests\n\nThis extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).\nMore precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.\n\nMore information are provided within the [ui-tests](./ui-tests/README.md) README.\n\n### Packaging the extension\n\nSee [RELEASE](RELEASE.md)\n\n\n",
    "bugtrack_url": null,
    "license": "GNU Affero General Public License v3",
    "summary": "AI chat for JupyterLab",
    "version": "0.1.6",
    "project_urls": null,
    "split_keywords": [
        "ai",
        " jupyter",
        " mito"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d1a44f106c87ef5325c4fcfffec95316e8df3822d1fbaa3065525852b84b2de",
                "md5": "ae0a223ed1a6cda828c7bbfeab8cdf5c",
                "sha256": "b3f123c975dd06c973582be0b47d9ace85dca3b8c044fc015e4788dd13988012"
            },
            "downloads": -1,
            "filename": "mito_ai-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ae0a223ed1a6cda828c7bbfeab8cdf5c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 415983,
            "upload_time": "2024-12-06T18:47:37",
            "upload_time_iso_8601": "2024-12-06T18:47:37.269466Z",
            "url": "https://files.pythonhosted.org/packages/3d/1a/44f106c87ef5325c4fcfffec95316e8df3822d1fbaa3065525852b84b2de/mito_ai-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f2bfccd308e553fe6b902f1e04586e0b2d078e503ffa398ff32287a77dcd3b0",
                "md5": "39b3be01cf350c0bfdba5537f9fdc0b1",
                "sha256": "bb053909b32d04d87196bc8a779339c0ebc546a282799ff6805224fee8c5b094"
            },
            "downloads": -1,
            "filename": "mito-ai-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "39b3be01cf350c0bfdba5537f9fdc0b1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 204708,
            "upload_time": "2024-12-06T18:47:39",
            "upload_time_iso_8601": "2024-12-06T18:47:39.331839Z",
            "url": "https://files.pythonhosted.org/packages/2f/2b/fccd308e553fe6b902f1e04586e0b2d078e503ffa398ff32287a77dcd3b0/mito-ai-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-06 18:47:39",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mito-ai"
}
        
Elapsed time: 0.76558s