Skip to content

chore: create-llama monorepo #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/plenty-spies-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-llama": patch
---

chore: create-llama monorepo
26 changes: 13 additions & 13 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: E2E Tests
name: E2E Tests for create-llama package
on:
push:
branches: [main]
paths-ignore:
- "llama-index-server/**"
- "python/llama-index-server/**"
pull_request:
branches: [main]
paths-ignore:
- "llama-index-server/**"
- "python/llama-index-server/**"

jobs:
e2e-python:
Expand Down Expand Up @@ -51,15 +51,15 @@ jobs:

- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
working-directory: .
working-directory: packages/create-llama

- name: Build create-llama
run: pnpm run build
working-directory: .
working-directory: packages/create-llama

- name: Install
run: pnpm run pack-install
working-directory: .
working-directory: packages/create-llama

- name: Run Playwright tests for Python
run: pnpm run e2e:python
Expand All @@ -70,13 +70,13 @@ jobs:
DATASOURCE: ${{ matrix.datasources }}
PYTHONIOENCODING: utf-8
PYTHONLEGACYWINDOWSSTDIO: utf-8
working-directory: .
working-directory: packages/create-llama

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-python-${{ matrix.os }}-${{ matrix.frameworks }}-${{ matrix.datasources }}
path: ./playwright-report/
path: packages/create-llama/playwright-report/
overwrite: true
retention-days: 30

Expand Down Expand Up @@ -121,15 +121,15 @@ jobs:

- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
working-directory: .
working-directory: packages/create-llama

- name: Build create-llama
run: pnpm run build
working-directory: .
working-directory: packages/create-llama

- name: Install
run: pnpm run pack-install
working-directory: .
working-directory: packages/create-llama

- name: Run Playwright tests for TypeScript
run: pnpm run e2e:typescript
Expand All @@ -138,12 +138,12 @@ jobs:
LLAMA_CLOUD_API_KEY: ${{ secrets.LLAMA_CLOUD_API_KEY }}
FRAMEWORK: ${{ matrix.frameworks }}
DATASOURCE: ${{ matrix.datasources }}
working-directory: .
working-directory: packages/create-llama

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-typescript-${{ matrix.os }}-${{ matrix.frameworks }}-${{ matrix.datasources }}-node${{ matrix.node-version }}
path: ./playwright-report/
path: packages/create-llama/playwright-report/
overwrite: true
retention-days: 30
2 changes: 2 additions & 0 deletions .github/workflows/lint_on_push_or_pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ jobs:
uses: chartboost/ruff-action@v1
with:
args: "format --check"
src: "python/llama-index-server"

- name: Run Python lint
uses: chartboost/ruff-action@v1
with:
args: "check"
src: "python/llama-index-server"
8 changes: 4 additions & 4 deletions .github/workflows/release_llama_index_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
paths:
- "llama-index-server/**"
- "python/llama-index-server/**"
- ".github/workflows/release_llama_index_server.yml"
pull_request:
types:
Expand All @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./llama-index-server
working-directory: ./python/llama-index-server
if: |
github.event_name == 'push' &&
!startsWith(github.ref, 'refs/heads/release/llama-index-server-v')
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./llama-index-server
working-directory: ./python/llama-index-server
if: |
github.event_name == 'pull_request' &&
github.event.pull_request.merged == true &&
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
with:
python_version: "3.11"
pypi_token: ${{ secrets.PYPI_TOKEN }}
package_directory: "llama-index-server"
package_directory: "python/llama-index-server"
poetry_install_options: "--without dev"

- name: Create GitHub Release
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_llama_index_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: llama-index-server
working-directory: python/llama-index-server
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: llama-index-server
working-directory: python/llama-index-server
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: llama-index-server
working-directory: python/llama-index-server
steps:
- uses: actions/checkout@v4
- name: Install Poetry
Expand All @@ -108,4 +108,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: llama-index-server
path: llama-index-server/dist/
path: python/llama-index-server/dist/
26 changes: 0 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ node_modules
.pnpm-store
.pnp.js

# testing
coverage
.coverage

# next.js
.next/
out/
Expand All @@ -35,31 +31,9 @@ yarn-error.log*
dist/
lib/

# e2e
.cache
test-results/
playwright-report/
blob-report/
playwright/.cache/
.tsbuildinfo
e2e/cache

# intellij
**/.idea

# Python
.mypy_cache/
venv/
.venv/
dist/
.__pycache__
__pycache__
.python-version
.ui

# build artifacts
create-llama-*.tgz

# vscode
.vscode
!.vscode/settings.json
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pnpm format
pnpm lint
uvx ruff format --check templates/
uvx ruff format --check packages/create-llama/templates/
121 changes: 37 additions & 84 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,86 +1,39 @@
{
"name": "create-llama",
"version": "0.5.10",
"description": "Create LlamaIndex-powered apps with one command",
"keywords": [
"rag",
"llamaindex",
"next.js"
],
"repository": {
"type": "git",
"url": "https://github.com/run-llama/create-llama",
"directory": "packages/create-llama"
},
"license": "MIT",
"bin": {
"create-llama": "./dist/index.js"
},
"files": [
"dist"
],
"scripts": {
"build": "bash ./scripts/build.sh",
"build:ncc": "pnpm run clean && ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register",
"clean": "rimraf --glob ./dist ./templates/**/__pycache__ ./templates/**/node_modules ./templates/**/poetry.lock",
"dev": "ncc build ./index.ts -w -o dist/",
"e2e": "playwright test",
"e2e:python": "playwright test e2e/shared e2e/python",
"e2e:typescript": "playwright test e2e/shared e2e/typescript",
"format": "prettier --ignore-unknown --cache --check .",
"format:write": "prettier --ignore-unknown --write .",
"lint": "eslint . --ignore-pattern dist --ignore-pattern e2e/cache",
"new-snapshot": "pnpm run build && changeset version --snapshot",
"new-version": "pnpm run build && changeset version",
"pack-install": "bash ./scripts/pack.sh",
"prepare": "husky",
"release": "pnpm run build && changeset publish",
"release-snapshot": "pnpm run build && changeset publish --tag snapshot"
},
"dependencies": {
"@types/async-retry": "1.4.2",
"@types/ci-info": "2.0.0",
"@types/cross-spawn": "6.0.0",
"@types/fs-extra": "11.0.4",
"@types/node": "^20.11.7",
"@types/prompts": "2.4.2",
"@types/tar": "6.1.5",
"@types/validate-npm-package-name": "3.0.0",
"async-retry": "1.3.1",
"async-sema": "3.0.1",
"ci-info": "github:watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
"commander": "12.1.0",
"cross-spawn": "7.0.3",
"fast-glob": "3.3.1",
"fs-extra": "11.2.0",
"global-agent": "^3.0.0",
"got": "10.7.0",
"ollama": "^0.5.0",
"ora": "^8.0.1",
"picocolors": "1.0.0",
"prompts": "2.4.2",
"smol-toml": "^1.1.4",
"tar": "6.1.15",
"terminal-link": "^3.0.0",
"update-check": "1.5.4",
"validate-npm-package-name": "3.0.0",
"yaml": "2.4.1"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@playwright/test": "^1.41.1",
"@vercel/ncc": "0.38.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.10.0",
"husky": "^9.0.10",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"rimraf": "^5.0.5",
"typescript": "^5.3.3",
"wait-port": "^1.1.0"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=16.14.0"
}
"name": "create-llama-monorepo",
"version": "1.0.0",
"private": true,
"description": "Monorepo for create-llama",
"keywords": [
"rag",
"llamaindex"
],
"repository": {
"type": "git",
"url": "https://github.com/run-llama/create-llama"
},
"license": "MIT",
"workspaces": [
"packages/*"
],
"scripts": {
"prepare": "husky",
"new-snapshot": "pnpm -r build && changeset version --snapshot",
"new-version": "pnpm -r build && changeset version",
"release": "pnpm -r build && changeset publish",
"release-snapshot": "pnpm -r build && changeset publish --tag snapshot",
"build": "pnpm -r --filter create-llama build",
"e2e": "pnpm -r --filter create-llama e2e",
"dev": "pnpm -r --filter create-llama dev",
"format": "pnpm -r --filter create-llama format",
"format:write": "pnpm -r --filter create-llama format:write",
"lint": "pnpm -r --filter create-llama lint"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"husky": "^9.0.10"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=16.14.0"
}
}
File renamed without changes.
Loading