Skip to content

Commit 64339ac

Browse files
committed
Intermediary commit. Much restructuring
1 parent 4afb3c3 commit 64339ac

293 files changed

Lines changed: 1287 additions & 981 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "setup-uv-env"
2+
description: "Composite action to setup the Python and uv environment."
3+
4+
inputs:
5+
python-version:
6+
required: false
7+
description: "The python version to use"
8+
default: "3.11"
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Install uv
14+
uses: astral-sh/uv@v5
15+
with:
16+
enable-cache: true
17+
cache-dependency-glob: "uv.lock"
18+
python-version: ${{ inputs.python-version }}
19+
20+
- name: Load cached venv
21+
id: cached-uv-dependencies
22+
uses: actions/cache@v4
23+
with:
24+
path: .venv
25+
key: venv-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('uv.lock') }}
26+
27+
- name: Install dependencies
28+
if: steps.cached-uv-dependencies.outputs.cache-hit != 'true'
29+
run: uv sync --locked --dev
30+
shell: bash

.github/workflows/main.yml

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
2121

2222
- name: Set up the environment
23-
uses: ./.github/actions/setup-poetry-env
23+
uses: ./.github/actions/setup-uv-env
2424

2525
- name: Run checks
2626
run: make check
2727

28-
tox:
28+
test:
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
@@ -35,30 +35,13 @@ jobs:
3535
- name: Check out
3636
uses: actions/checkout@v4
3737

38-
- name: Set up python
39-
uses: actions/setup-python@v5
38+
- name: Set up the environment
39+
uses: ./.github/actions/setup-uv-env
4040
with:
4141
python-version: ${{ matrix.python-version }}
4242

43-
- name: Install Poetry
44-
uses: snok/install-poetry@v1
45-
with:
46-
version: 1.8.5
47-
48-
- name: Load cached venv
49-
uses: actions/cache@v4
50-
with:
51-
path: .tox
52-
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('arcade/poetry.lock') }}
53-
54-
- name: Install tox
55-
run: |
56-
python -m pip install --upgrade pip
57-
python -m pip install tox tox-gh-actions
58-
59-
- name: Test with tox
60-
run: cd arcade && tox
61-
43+
- name: Test libs
44+
run: make test
6245
- name: Upload coverage reports to Codecov with GitHub Action on Python 3.10
6346
uses: codecov/codecov-action@v4.0.1
6447
if: ${{ matrix.python-version == '3.10' }}

.vscode/launch.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Debug `arcade workerup --no-auth`",
66
"type": "debugpy",
77
"request": "launch",
8-
"program": "${workspaceFolder}/arcade/run_cli.py",
8+
"program": "${workspaceFolder}/libs/arcadecli/run_cli.py",
99
"args": ["workerup", "--no-auth"],
1010
"console": "integratedTerminal",
1111
"jinja": true,
@@ -16,7 +16,7 @@
1616
"name": "Debug `arcade chat -d -h localhost`",
1717
"type": "debugpy",
1818
"request": "launch",
19-
"program": "${workspaceFolder}/arcade/run_cli.py",
19+
"program": "${workspaceFolder}/libs/arcadecli/run_cli.py",
2020
"args": ["chat", "-d", "-h", "localhost"],
2121
"console": "integratedTerminal",
2222
"jinja": true,
@@ -27,7 +27,7 @@
2727
"name": "Debug `arcade dev`",
2828
"type": "debugpy",
2929
"request": "launch",
30-
"program": "${workspaceFolder}/arcade/run_cli.py",
30+
"program": "${workspaceFolder}/libs/arcadecli/run_cli.py",
3131
"args": ["dev"],
3232
"console": "integratedTerminal",
3333
"jinja": true,
@@ -38,12 +38,23 @@
3838
"name": "Debug `arcade evals -d` on current file",
3939
"type": "debugpy",
4040
"request": "launch",
41-
"program": "${workspaceFolder}/arcade/run_cli.py",
41+
"program": "${workspaceFolder}/libs/arcadecli/run_cli.py",
4242
"args": ["evals", "-d", "${fileDirname}", "-h", "localhost"],
4343
"console": "integratedTerminal",
4444
"jinja": true,
4545
"justMyCode": true,
4646
"cwd": ""
47+
},
48+
{
49+
"name": "Debug `arcade serve --reload`",
50+
"type": "debugpy",
51+
"request": "launch",
52+
"program": "${workspaceFolder}/libs/arcadecli/run_cli.py",
53+
"args": ["serve", "--reload"],
54+
"console": "integratedTerminal",
55+
"jinja": true,
56+
"justMyCode": true,
57+
"cwd": ""
4758
}
4859
]
4960
}

CONTRIBUTING.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Please note this documentation assumes you already have `uv` and `Git` installed
5353

5454
```bash
5555
cd <directory_in_which_repo_should_be_created>
56-
git clone git@github.com:YOUR_NAME/arcade-ai.git
56+
git clone git@github.com:YOUR_GITHUB_USERNAME/arcade-ai.git
5757
```
5858

5959
3. Now we need to install the environment. Navigate into the directory
@@ -62,10 +62,10 @@ git clone git@github.com:YOUR_NAME/arcade-ai.git
6262
cd arcade-ai
6363
```
6464

65-
If you are using `pyenv`, select a version to use locally. (See installed versions with `pyenv versions`)
65+
Create your virtual environment
6666

6767
```bash
68-
pyenv local <x.y.z>
68+
uv venv --python 3.11.6
6969
```
7070

7171
4. Install the development environment and dependencies:
@@ -139,8 +139,7 @@ Before you submit a pull request, check that it meets these guidelines:
139139

140140
1. The pull request should include tests.
141141

142-
2. If the pull request adds functionality, the docs should be updated.
143-
Put your new functionality into a function with a docstring, and add the feature to the list in `README.md`.
142+
2. If the pull request adds functionality, the [docs](https://github.com/ArcadeAI/docs) should be updated.
144143

145144
3. If making contributions to multiple toolkits (i.e. Google and Slack, etc.), submit a separate pull request for each.
146145
This helps us segregate the changes during the review process making it more efficient.

Makefile

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ install-toolkits: ## Install dependencies for all toolkits
1515
for dir in toolkits/*/ ; do \
1616
if [ -d "$$dir" ] && [ -f "$$dir/pyproject.toml" ]; then \
1717
echo "📦 Installing dependencies for $$dir"; \
18-
if (cd $$dir && uv sync --dev); then \
18+
if (cd $$dir && uv sync --extra dev); then \
1919
successful=$$((successful + 1)); \
2020
else \
2121
echo "❌ Failed to install dependencies for $$dir"; \
@@ -43,15 +43,15 @@ check: ## Run code quality tools.
4343
@echo "🚀 Linting code: Running pre-commit"
4444
@uv run pre-commit run -a
4545
@echo "🚀 Static type checking: Running mypy on libs"
46-
@for lib in libs/arcade-*/ ; do \
46+
@for lib in libs/arcade*/ ; do \
4747
echo "🔍 Type checking $$lib"; \
4848
(cd $$lib && uv run mypy . || true); \
4949
done
5050

5151
.PHONY: check-libs
5252
check-libs: ## Run code quality tools for each lib package
5353
@echo "🚀 Running checks on each lib package"
54-
@for lib in libs/arcade-*/ ; do \
54+
@for lib in libs/arcade*/ ; do \
5555
echo "🛠️ Checking lib $$lib"; \
5656
(cd $$lib && uv run pre-commit run -a || true); \
5757
(cd $$lib && uv run mypy . || true); \
@@ -63,7 +63,7 @@ check-toolkits: ## Run code quality tools for each toolkit that has a Makefile
6363
@for dir in toolkits/*/ ; do \
6464
if [ -f "$$dir/Makefile" ]; then \
6565
echo "🛠️ Checking toolkit $$dir"; \
66-
(cd "$$dir" && make check); \
66+
(cd "$$dir" && uv run --active pre-commit run -a && uv run --active mypy --config-file=pyproject.toml); \
6767
else \
6868
echo "🛠️ Skipping toolkit $$dir (no Makefile found)"; \
6969
fi; \
@@ -72,12 +72,12 @@ check-toolkits: ## Run code quality tools for each toolkit that has a Makefile
7272
.PHONY: test
7373
test: ## Test the code with pytest
7474
@echo "🚀 Testing libs: Running pytest"
75-
@cd libs/tests && uv run pytest -W ignore -v --cov --cov-config=../../pyproject.toml --cov-report=xml
75+
@uv run pytest -W ignore -v --cov=libs/tests --cov-config=pyproject.toml --cov-report=xml
7676

7777
.PHONY: test-libs
7878
test-libs: ## Test each lib package individually
7979
@echo "🚀 Testing each lib package"
80-
@for lib in libs/arcade-*/ ; do \
80+
@for lib in libs/arcade*/ ; do \
8181
echo "🧪 Testing $$lib"; \
8282
(cd $$lib && uv run pytest -W ignore -v || true); \
8383
done
@@ -86,36 +86,38 @@ test-libs: ## Test each lib package individually
8686
test-toolkits: ## Iterate over all toolkits and run pytest on each one
8787
@echo "🚀 Testing code in toolkits: Running pytest"
8888
@for dir in toolkits/*/ ; do \
89-
(cd $$dir && uv run pytest -W ignore -v --cov --cov-config=../../pyproject.toml --cov-report=xml || exit 1); \
89+
toolkit_name=$$(basename "$$dir"); \
90+
echo "🧪 Testing $$toolkit_name toolkit"; \
91+
(cd $$dir && uv run pytest -W ignore -v --cov=arcade_$$toolkit_name --cov-report=xml || exit 1); \
9092
done
9193

9294
.PHONY: coverage
9395
coverage: ## Generate coverage report
9496
@echo "coverage report"
95-
@cd libs/tests && uv run coverage report
97+
@uv run coverage report
9698
@echo "Generating coverage report"
97-
@cd libs/tests && uv run coverage html
99+
@uv run coverage html
98100

99101
.PHONY: set-version
100102
set-version: ## Set the version in all lib pyproject.toml files
101103
@echo "🚀 Setting version to $(VERSION) in all lib packages"
102-
@for lib in libs/arcade-*/ ; do \
104+
@for lib in libs/arcade*/ ; do \
103105
echo "Setting version in $$lib"; \
104106
(cd $$lib && sed -i.bak 's/version = "[^"]*"/version = "$(VERSION)"/' pyproject.toml && rm pyproject.toml.bak); \
105107
done
106108

107109
.PHONY: unset-version
108110
unset-version: ## Reset version to 0.1.0 in all lib pyproject.toml files
109111
@echo "🚀 Resetting version to 0.1.0 in all lib packages"
110-
@for lib in libs/arcade-*/ ; do \
112+
@for lib in libs/arcade*/ ; do \
111113
echo "Resetting version in $$lib"; \
112114
(cd $$lib && sed -i.bak 's/version = "[^"]*"/version = "0.1.0"/' pyproject.toml && rm pyproject.toml.bak); \
113115
done
114116

115117
.PHONY: build
116118
build: clean-build ## Build wheel files using uv
117119
@echo "🚀 Creating wheel files for all lib packages"
118-
@for lib in libs/arcade-*/ ; do \
120+
@for lib in libs/arcade*/ ; do \
119121
echo "🛠️ Building $$lib"; \
120122
(cd $$lib && uv build); \
121123
done
@@ -155,14 +157,14 @@ build-toolkits: ## Build wheel files for all toolkits
155157
.PHONY: clean-build
156158
clean-build: ## clean build artifacts
157159
@echo "🗑️ Cleaning build artifacts"
158-
@for lib in libs/arcade-*/ ; do \
160+
@for lib in libs/arcade*/ ; do \
159161
(cd $$lib && rm -rf dist); \
160162
done
161163

162164
.PHONY: publish
163165
publish: ## publish a release to pypi.
164166
@echo "🚀 Publishing all lib packages to PyPI"
165-
@for lib in libs/arcade-*/ ; do \
167+
@for lib in libs/arcade*/ ; do \
166168
echo "📦 Publishing $$lib"; \
167169
(cd $$lib && uv publish --token $(PYPI_TOKEN) || true); \
168170
done
@@ -211,7 +213,7 @@ full-dist: clean-dist ## Build all projects and copy wheels to ./dist
211213
@mkdir -p dist
212214

213215
# Build all lib packages in dependency order
214-
@for lib in arcade-core arcade-tdk arcade-serve arcade-evals arcade-cli ; do \
216+
@for lib in arcade-core arcade-tdk arcade-serve arcade-evals arcadecli ; do \
215217
echo "🛠️ Building libs/$$lib wheel..."; \
216218
(cd libs/$$lib && uv build); \
217219
cp libs/$$lib/dist/*.whl dist/; \
@@ -235,7 +237,7 @@ clean-dist: ## Clean all built distributions
235237
@echo "🗑️ Cleaning dist directory"
236238
@rm -rf dist
237239
@echo "🗑️ Cleaning libs/*/dist directories"
238-
@for lib in libs/arcade-*/ ; do \
240+
@for lib in libs/arcade*/ ; do \
239241
rm -rf "$$lib"/dist; \
240242
done
241243
@echo "🗑️ Cleaning toolkits/*/dist directory"

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ Arcade is a developer platform that lets you build, deploy, and manage tools for
4444

4545
This repository contains the core Arcade libraries, organized as separate packages for maximum flexibility and modularity:
4646

47-
- **`arcade-core`** - Core platform functionality and schemas
48-
- **`arcade-tdk`** - Tool Development Kit with the `@tool` decorator
49-
- **`arcade-serve`** - Serving infrastructure for workers and MCP servers
50-
- **`arcade-evals`** - Evaluation framework for testing tool performance
51-
- **`arcade-cli`** - Command-line interface for the Arcade platform
47+
- [**`arcade-core`**](libs/arcade-core) - Core platform functionality and schemas
48+
- [**`arcade-tdk`**](libs/arcade-tdk) - Tool Development Kit with the `@tool` decorator
49+
- [**`arcade-serve`**](libs/arcade-serve) - Serving infrastructure for workers and MCP servers
50+
- [**`arcade-evals`**](libs/arcade-evals) - Evaluation framework for testing tool performance
51+
- [**`arcadecli`**](libs/arcadecli) - Command-line interface for the Arcade platform
5252

5353
![diagram](https://github.com/user-attachments/assets/1a567e5f-d6b4-4b1e-9918-c401ad232ebb)
5454

@@ -77,10 +77,10 @@ make install
7777
For production use, install individual packages as needed:
7878

7979
```bash
80-
pip install arcade-core arcade-tdk # Core + Tool Development Kit
80+
pip install arcade-core arcade-tdk # Core + Tool Development Kit
8181
pip install arcade-serve # Serving infrastructure
8282
pip install arcade-evals # Evaluation framework
83-
pip install arcade-cli # Command-line interface
83+
pip install arcadecli # Command-line interface
8484
```
8585

8686
### Development

examples/serving-tools/modal/run-arcade-worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
@app.function(image=image)
1414
@asgi_app()
1515
def fastapi_app():
16-
from arcade_core.toolkit import Toolkit
1716
from arcade_serve.fastapi.worker import FastAPIWorker
17+
from arcade_tdk import Toolkit
1818
from fastapi import FastAPI
1919

2020
web_app = FastAPI()

libs/arcade-core/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ classifiers = [
1515
"Programming Language :: Python :: 3.10",
1616
"Programming Language :: Python :: 3.11",
1717
"Programming Language :: Python :: 3.12",
18+
"Programming Language :: Python :: 3.13",
1819
]
1920
requires-python = ">=3.10"
2021
dependencies = [

libs/arcade-evals/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ suite = EvalSuite(cases=[case1], rubric=rubric)
8484
## Dependencies
8585

8686
- `arcade-core>=1.1.0` - Core Arcade functionality
87-
- `arcade-tdk>=1.1.0` - Tool development kit
8887
- `scipy>=1.14.0` - Scientific computing
8988
- `numpy>=2.0.0` - Numerical computing
9089
- `scikit-learn>=1.5.0` - Machine learning utilities

0 commit comments

Comments
 (0)