Skip to content

Commit

Permalink
Merge pull request #1355 from mito-ds/dev
Browse files Browse the repository at this point in the history
Release 11/4/24
  • Loading branch information
aarondr77 authored Nov 5, 2024
2 parents 26e1f03 + f870c3a commit 0af61b0
Show file tree
Hide file tree
Showing 41 changed files with 1,233 additions and 221 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/test-mito-ai.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Test - Mito AI

on:
push:
branches: [ dev ]
paths:
- 'mito-ai/**'
pull_request:
paths:
- 'mito-ai/**'
jobs:
test-mitoai-frontend-jupyterlab:
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
matrix:
python-version: ['3.8', '3.10', '3.11']
fail-fast: false

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
mito-ai/setup.py
tests/requirements.txt
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: mito-ai/package-lock.json
- name: Install dependencies
run: |
cd tests
bash mac-setup.sh
- name: Setup JupyterLab
run: |
cd tests
source venv/bin/activate
cd ../mito-ai
jupyter labextension develop . --overwrite
jupyter server extension enable --py mito-ai
- name: Start a server and run tests
run: |
cd tests
source venv/bin/activate
jupyter lab --config jupyter_server_test_config.py &
npm run test:mitoai
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Upload test-results
uses: actions/upload-artifact@v3
if: failure()
with:
name: mitoai-jupyterlab-playwright-report-${{ matrix.python-version }}
path: tests/playwright-report/
retention-days: 14
2 changes: 1 addition & 1 deletion .github/workflows/test-mitosheet-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
branches: [ dev ]
paths:
- 'mitosheet/**'
- 'tests/**'
pull_request:
paths:
- 'mitosheet/**'
- 'tests/**'

jobs:
test-mitosheet-frontend-jupyterlab:
runs-on: ubuntu-20.04
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
scratch*

# Mac Specific

Expand Down
2 changes: 1 addition & 1 deletion mito-ai/Untitled.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.1"
"version": "3.10.4"
}
},
"nbformat": 4,
Expand Down
1 change: 1 addition & 0 deletions mito-ai/mito-ai/OpenAICompletionHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def post(self):
# TODO: In the future, instead of returning the raw response,
# return a cleaned up version of the response so we can support
# multiple models

self.finish(json.dumps(response_dict))
except Exception as e:
self.set_status(500)
Expand Down
9 changes: 6 additions & 3 deletions mito-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"files": [
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
"src/**/*.{ts,tsx}"
"src/**/*.{ts,tsx}",
"schema/*.json"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -63,7 +64,8 @@
"@types/react-dom": "^18.0.10",
"openai": "^4.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
"react-dom": "^18.0.0",
"vscode-diff": "^2.1.1"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0",
Expand Down Expand Up @@ -102,7 +104,8 @@
},
"jupyterlab": {
"extension": true,
"outputDir": "mito-ai/labextension"
"outputDir": "mito-ai/labextension",
"schemaDir": "schema"
},
"eslintIgnore": [
"node_modules",
Expand Down
16 changes: 16 additions & 0 deletions mito-ai/schema/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"jupyter.lab.shortcuts": [],
"title": "mito-ai",
"description": "mito-ai settings.",
"type": "object",
"properties": {},
"additionalProperties": false,
"jupyter.lab.toolbars": {
"Cell": [
{
"name": "explain-code",
"command": "toolbar-button:explain-code"
}
]
}
}
2 changes: 1 addition & 1 deletion mito-ai/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def get_data_files_from_data_files_spec(
packages=find_packages(),
install_requires=[
"jupyterlab>=4.0.0,<5",
"openai",
"openai>=1.0.0"
],
extras_require = {
'deploy': [
Expand Down
1 change: 0 additions & 1 deletion mito-ai/src/Extensions/AiChat/AiChatPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
JupyterFrontEnd,
JupyterFrontEndPlugin,
} from '@jupyterlab/application';

import { ICommandPalette, WidgetTracker } from '@jupyterlab/apputils';
import { INotebookTracker } from '@jupyterlab/notebook';
import { buildChatWidget } from './ChatWidget';
Expand Down
Loading

0 comments on commit 0af61b0

Please sign in to comment.