Skip to content

Commit

Permalink
Update frontend deps, first pass on a dev container
Browse files Browse the repository at this point in the history
  • Loading branch information
vanpelt committed Apr 1, 2024
1 parent 14914c4 commit a9fb7cb
Show file tree
Hide file tree
Showing 5 changed files with 2,938 additions and 3,139 deletions.
62 changes: 62 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "OpenUI Development",
"image": "mcr.microsoft.com/devcontainers/python:3.12",

// More features: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "lts",
"nvmVersion": "latest"
},
"ghcr.io/devcontainers/features/rust:1": {
"version": "latest",
"profile": "minimal"
}
},

"mounts": [
"source=codespaces-linux-cache,target=/home/vscode/.cache,consistency=delegated,type=volume"
],

"customizations": {
"vscode": {
"settings": {},
"extensions": [
"ms-python.python",
"bungcip.better-toml",
"charliermarsh.ruff",
"ms-toolsai.jupyter",
"ms-azuretools.vscode-docker",
"GitHub.copilot",
"ms-python.black-formatter"
]
}
},

"portsAttributes": {
"5173": {
"label": "OpenUI UI Dev Server"
},
"7878": {
"label": "OpenUI Server",
"onAutoForward": "notify"
}
},

"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh",

"secrets": {
"OPENAI_API_KEY": {
"description": "Your OpenAI API Key",
"documentationUrl": "https://platform.openai.com/api-keys"
},
"WANDB_API_KEY": {
"description": "Your W&B API Key",
"documentationUrl": "https://wandb.ai/authorize"
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
19 changes: 19 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Fix cache perms
mkdir -p $HOME/.cache
sudo chown -R $USER $HOME/.cache

# Ollama time
curl -fsSL https://ollama.com/install.sh | sh

# Install python packages
cd /workspaces/openui/backend
pip install -e .[test]

# addressing warning...
git config --unset-all core.hooksPath
pre-commit install

# pre-commit hooks cause permission weirdness
git config --global --add safe.directory /workspaces/openui
2 changes: 1 addition & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CI = "https://github.com/wandb/openui/actions"


[project.optional-dependencies]
test = ["pytest"]
test = ["pytest", "pre-commit"]
eval = [
"Pillow>=8.3.1",
"playwright>=1.41.0",
Expand Down
142 changes: 70 additions & 72 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"deploy": "npm run build -- --mode hosted && fly deploy ../backend",
"commit": "cz",
"dev": "vite --open",
"prepare": "husky install",
"prepare": "cd .. && husky install frontend/.husky",
"preview": "vite preview",
"preview:test": "start-server-and-test preview http://localhost:4173",
"test": "vitest",
Expand All @@ -25,9 +25,9 @@
"validate": "run-p lint test:ci test:e2e:headless"
},
"dependencies": {
"@codemirror/lang-javascript": "^6.2.1",
"@codemirror/lang-javascript": "^6.2.2",
"@codemirror/lang-markdown": "^6.2.4",
"@codemirror/language-data": "^6.4.0",
"@codemirror/language-data": "^6.4.1",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-icons": "^1.3.0",
Expand All @@ -36,92 +36,90 @@
"@radix-ui/react-slider": "^1.1.2",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tooltip": "^1.0.7",
"@tailwindcss/typography": "^0.5.10",
"@tanstack/react-query": "5.17.0",
"@tailwindcss/typography": "^0.5.12",
"@tanstack/react-query": "^5.28.9",
"@types/mdast": "^4.0.3",
"@uiw/codemirror-theme-vscode": "^4.21.21",
"@uiw/copy-to-clipboard": "^1.0.16",
"@uiw/react-codemirror": "^4.21.21",
"@uiw/codemirror-theme-vscode": "^4.21.25",
"@uiw/copy-to-clipboard": "^1.0.17",
"@uiw/react-codemirror": "^4.21.25",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"jotai": "^2.6.3",
"jotai": "^2.7.2",
"js-cookie": "^3.0.5",
"litellm": "^0.12.0",
"lucide-react": "^0.316.0",
"nanoid": "^5.0.4",
"ollama": "^0.4.4",
"openai": "^4.26.0",
"prettier": "3.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"lucide-react": "^0.363.0",
"nanoid": "^5.0.6",
"openai": "^4.31.0",
"prettier": "^3.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^9.0.1",
"react-router-dom": "6.21.1",
"react-router-dom": "^6.22.3",
"react-simple-code-editor": "^0.13.1",
"react-syntax-highlighter": "^15.5.0",
"remark": "^15.0.1",
"remark-frontmatter": "^5.0.0",
"remark-parse": "^11.0.0",
"tailwind-merge": "^2.2.1",
"tailwind-merge": "^2.2.2",
"tailwindcss-animate": "^1.0.7",
"unified": "^11.0.4"
},
"devDependencies": {
"@nabla/vite-plugin-eslint": "2.0.2",
"@tailwindcss/forms": "0.5.7",
"@testing-library/cypress": "10.0.1",
"@testing-library/dom": "9.3.3",
"@testing-library/jest-dom": "6.1.6",
"@testing-library/react": "14.1.2",
"@testing-library/user-event": "14.5.2",
"@types/css-mediaquery": "0.1.4",
"@nabla/vite-plugin-eslint": "^2.0.2",
"@tailwindcss/forms": "^0.5.7",
"@testing-library/cypress": "^10.0.1",
"@testing-library/dom": "^9.3.4",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.2",
"@testing-library/user-event": "^14.5.2",
"@types/css-mediaquery": "^0.1.4",
"@types/js-cookie": "^3.0.6",
"@types/react": "18.2.46",
"@types/react-dom": "18.2.18",
"@types/react-router-dom": "5.3.3",
"@types/react": "^18.2.73",
"@types/react-dom": "^18.2.23",
"@types/react-router-dom": "^5.3.3",
"@types/react-syntax-highlighter": "^15.5.11",
"@types/testing-library__jest-dom": "5.14.9",
"@typescript-eslint/eslint-plugin": "6.17.0",
"@typescript-eslint/parser": "6.17.0",
"@vitejs/plugin-react": "4.2.1",
"@vitest/coverage-istanbul": "1.1.1",
"autoprefixer": "10.4.16",
"commitizen": "4.3.0",
"css-mediaquery": "0.1.2",
"cypress": "13.3.1",
"cz-conventional-changelog": "3.3.0",
"eslint": "8.56.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-airbnb-typescript": "17.1.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-cypress": "2.15.1",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-prefer-function-component": "3.3.0",
"eslint-plugin-testing-library": "6.2.0",
"eslint-plugin-unicorn": "50.0.1",
"husky": "8.0.3",
"jsdom": "23.0.1",
"lint-staged": "15.2.0",
"msw": "2.1.6",
"npm-run-all": "4.1.5",
"postcss": "8.4.32",
"prettier-plugin-tailwindcss": "0.5.10",
"start-server-and-test": "2.0.3",
"stylelint": "16.1.0",
"stylelint-config-standard": "36.0.0",
"tailwindcss": "3.4.0",
"typescript": "5.3.3",
"vite": "5.0.12",
"vite-plugin-mkcert": "^1.17.3",
"vite-plugin-pwa": "0.17.4",
"vite-tsconfig-paths": "4.2.3",
"vitest": "1.1.1",
"whatwg-fetch": "3.6.20",
"workbox-build": "7.0.0",
"workbox-window": "7.0.0"
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-istanbul": "^1.4.0",
"autoprefixer": "^10.4.19",
"commitizen": "^4.3.0",
"css-mediaquery": "^0.1.2",
"cypress": "^13.7.1",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-prefer-function-component": "^3.3.0",
"eslint-plugin-testing-library": "^6.2.0",
"eslint-plugin-unicorn": "^51.0.1",
"husky": "^9.0.11",
"jsdom": "^24.0.0",
"lint-staged": "^15.2.2",
"msw": "^2.2.13",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.38",
"prettier-plugin-tailwindcss": "^0.5.13",
"start-server-and-test": "^2.0.3",
"stylelint": "^16.3.1",
"stylelint-config-standard": "^36.0.0",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.3",
"vite": "^5.2.7",
"vite-plugin-mkcert": "^1.17.5",
"vite-plugin-pwa": "^0.19.7",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.4.0",
"whatwg-fetch": "^3.6.20",
"workbox-build": "^7.0.0",
"workbox-window": "^7.0.0"
},
"browserslist": {
"production": "Edge >= 18, Firefox >= 60, Chrome >= 61, Safari >= 11, Opera >= 48",
Expand Down
Loading

0 comments on commit a9fb7cb

Please sign in to comment.