Skip to content

Commit a43e1bd

Browse files
Merge pull request #191 from BrainBlend-AI/feature/uv-workspace
chore: migrate from Poetry to uv workspace
2 parents d494a00 + 07386b7 commit a43e1bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+4747
-48626
lines changed

.github/workflows/code-quality.yml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,48 +21,39 @@ jobs:
2121
with:
2222
python-version: '3.12'
2323

24-
- name: Install Poetry
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install poetry
28-
29-
- name: Configure Poetry
30-
run: |
31-
poetry config virtualenvs.create true
32-
poetry config virtualenvs.in-project true
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v4
26+
with:
27+
version: "latest"
3328

34-
- name: Cache Poetry virtualenv
29+
- name: Cache uv
3530
uses: actions/cache@v4
3631
id: cache
3732
with:
38-
path: ./.venv
39-
key: venv-${{ runner.os }}-python-${{ runner.python-version }}-${{ hashFiles('**/poetry.lock') }}
33+
path: ~/.cache/uv
34+
key: uv-${{ runner.os }}-python-${{ runner.python-version }}-${{ hashFiles('**/uv.lock') }}
4035
restore-keys: |
41-
venv-${{ runner.os }}-python-${{ runner.python-version }}-
42-
43-
- name: Select Python for Poetry
44-
run: |
45-
poetry env use $(which python)
36+
uv-${{ runner.os }}-python-${{ runner.python-version }}-
4637
4738
- name: Install Dependencies
4839
run: |
49-
poetry install --with dev
50-
poetry run pip list # Verify installation
40+
uv sync
41+
uv run pip list # Verify installation
5142
5243
- name: Verify Black Installation
5344
run: |
54-
poetry run which black || echo "Black not found"
55-
poetry run black --version
45+
uv run which black || echo "Black not found"
46+
uv run black --version
5647
5748
- name: Run Black Check
5849
run: |
59-
poetry run black --check atomic-agents atomic-assembler atomic-examples atomic-forge
50+
uv run black --check atomic-agents atomic-assembler atomic-examples atomic-forge
6051
if: success()
6152

6253
- name: Run Flake8
63-
run: poetry run flake8 --extend-exclude=.venv atomic-agents atomic-assembler atomic-examples atomic-forge
54+
run: uv run flake8 --extend-exclude=.venv atomic-agents atomic-assembler atomic-examples atomic-forge
6455
if: success()
6556

6657
- name: Run Tests
67-
run: poetry run pytest --cov=atomic_agents atomic-agents
58+
run: uv run pytest --cov=atomic_agents atomic-agents
6859
if: success()

.github/workflows/docs.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,39 @@ jobs:
2828
uses: actions/setup-python@v5
2929
with:
3030
python-version: '3.12' # ensure consistency with project requirement
31-
cache: 'pip'
31+
32+
- name: Install uv
33+
uses: astral-sh/setup-uv@v4
34+
with:
35+
version: "latest"
3236

3337
- name: Install dependencies
3438
run: |
35-
python -m pip install --upgrade pip
36-
pip install poetry
37-
poetry install
39+
uv sync
3840
3941
- name: Sync version from pyproject.toml
4042
run: |
41-
poetry run python scripts/sync_version.py
42-
43+
uv run python scripts/sync_version.py
44+
4345
- name: Build singlehtml for documentation extraction
4446
run: |
4547
cd docs
46-
poetry run make singlehtml
47-
48+
uv run make singlehtml
49+
4850
- name: Generate all llms.txt files
4951
run: |
50-
poetry run python scripts/generate_llms_files.py
52+
uv run python scripts/generate_llms_files.py
5153
# Copy to _static directory for Sphinx to process during build
5254
mkdir -p docs/_static
5355
cp docs/llms-*.txt docs/_static/
5456
echo "Generated llms files:"
5557
ls -lh docs/_static/llms-*.txt
56-
58+
5759
- name: Build HTML documentation
5860
run: |
5961
cd docs
60-
poetry run make html
61-
62+
uv run make html
63+
6264
- name: Verify llms files in build
6365
run: |
6466
echo "Checking for llms files in build directory:"

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,7 @@ To run the CLI, simply run the following command:
319319
atomic
320320
```
321321

322-
Or if you installed Atomic Agents with Poetry, for example:
323-
324-
```bash
325-
poetry run atomic
326-
```
327-
328-
Or if you installed Atomic Agents with uv:
322+
Or if you're running from a cloned repository with uv:
329323

330324
```bash
331325
uv run atomic
@@ -363,7 +357,13 @@ For local development, you can install from the repository:
363357
```bash
364358
git clone https://github.com/BrainBlend-AI/atomic-agents.git
365359
cd atomic-agents
366-
poetry install
360+
uv sync
361+
```
362+
363+
To install all workspace packages (examples and tools):
364+
365+
```bash
366+
uv sync --all-packages
367367
```
368368

369369
## Provider & Model Compatibility
@@ -377,9 +377,9 @@ We welcome contributions! Please see the [Contributing Guide](/docs/contributing
377377
1. Fork the repository
378378
2. Create a new branch (`git checkout -b feature-branch`)
379379
3. Make your changes
380-
4. Run tests (`poetry run pytest --cov=atomic_agents atomic-agents`)
381-
5. Format your code (`poetry run black atomic-agents atomic-assembler atomic-examples atomic-forge`)
382-
6. Lint your code (`poetry run flake8 --extend-exclude=.venv atomic-agents atomic-assembler atomic-examples atomic-forge`)
380+
4. Run tests (`uv run pytest --cov=atomic_agents atomic-agents`)
381+
5. Format your code (`uv run black atomic-agents atomic-assembler atomic-examples atomic-forge`)
382+
6. Lint your code (`uv run flake8 --extend-exclude=.venv atomic-agents atomic-assembler atomic-examples atomic-forge`)
383383
7. Commit your changes (`git commit -m 'Add some feature'`)
384384
8. Push to the branch (`git push origin feature-branch`)
385385
9. Open a pull request

UPGRADE_DOC.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Atomic Agents v2.0 introduces breaking changes to improve the developer experien
77
## Prerequisites
88

99
- **Python Version**: Ensure your environment is running Python 3.12 or higher (v2.0 requires >=3.12)
10-
- **Update Dependencies**:
10+
- **Update Dependencies**:
1111
```bash
12-
poetry update atomic-agents
12+
uv sync
1313
# or
1414
pip install --upgrade atomic-agents>=2.0.0
1515
```
@@ -467,8 +467,8 @@ This upgrade introduces breaking changes. All projects must be updated to use th
467467
### YouTube API Update
468468
The YouTube API dependency has been updated to version 1.1.1 to resolve compatibility issues with lower versions.
469469

470-
### Poetry Dependencies
471-
Examples and forge dependencies have been updated using `poetry update atomic-agents` to ensure compatibility with the new package structure.
470+
### Package Dependencies
471+
Examples and forge dependencies have been updated using `uv sync` to ensure compatibility with the new package structure.
472472

473473
## Version Information
474474

agents.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ atomic-monorepo/
3030
├── docs/ # Sphinx documentation
3131
├── guides/ # Development guides
3232
├── .github/workflows/ # CI/CD pipelines
33-
├── pyproject.toml # Poetry configuration
33+
├── pyproject.toml # Project configuration
3434
└── README.md # Main documentation
3535
```
3636

@@ -183,7 +183,7 @@ Full support for MCP enables connection to external tools and resources through
183183
- **CLI Framework:** Textual (TUI), Rich (terminal formatting)
184184
- **Testing:** pytest with coverage
185185
- **Documentation:** Sphinx + MyST + ReadTheDocs theme
186-
- **Build System:** Poetry
186+
- **Build System:** uv (with hatchling)
187187

188188
### LLM Provider Compatibility
189189

@@ -211,7 +211,7 @@ Through Instructor, Atomic Agents supports all major LLM providers:
211211
### Prerequisites
212212

213213
- Python ≥3.12, <4.0
214-
- Poetry (package manager)
214+
- [uv](https://docs.astral.sh/uv/) (package manager)
215215

216216
### Installation
217217

@@ -221,23 +221,23 @@ git clone https://github.com/BrainBlend-AI/atomic-agents.git
221221
cd atomic-monorepo
222222

223223
# Install dependencies
224-
poetry install
224+
uv sync
225225

226-
# Activate virtual environment
227-
poetry shell
226+
# Install all workspace packages (examples and tools)
227+
uv sync --all-packages
228228
```
229229

230230
### Development Commands
231231

232232
```bash
233233
# Code formatting
234-
poetry run black atomic-agents atomic-assembler atomic-examples atomic-forge
234+
uv run black atomic-agents atomic-assembler atomic-examples atomic-forge
235235

236236
# Linting
237-
poetry run flake8 --extend-exclude=.venv atomic-agents atomic-assembler atomic-examples atomic-forge
237+
uv run flake8 --extend-exclude=.venv atomic-agents atomic-assembler atomic-examples atomic-forge
238238

239239
# Testing
240-
poetry run pytest --cov=atomic_agents atomic-agents
240+
uv run pytest --cov=atomic_agents atomic-agents
241241

242242
# Build documentation
243243
cd docs && make html
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Atomic Assembler - CLI tool for assembling atomic projects

atomic-assembler/atomic_assembler/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def copy_atomic_tool(tool_path, destination):
8484
shutil.copytree(
8585
tool_path,
8686
local_tool_path,
87-
ignore=shutil.ignore_patterns("requirements.txt", "pyproject.toml", ".coveragerc", "poetry.lock"),
87+
ignore=shutil.ignore_patterns("requirements.txt", "pyproject.toml", ".coveragerc", "uv.lock"),
8888
)
8989
logging.info(f"Tool successfully copied to {local_tool_path}")
9090
return local_tool_path

atomic-examples/basic-multimodal/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ This example demonstrates how to use the Atomic Agents framework to analyze imag
2727
cd atomic-agents/atomic-examples/basic-multimodal
2828
```
2929

30-
3. Install dependencies using Poetry:
30+
3. Install dependencies using uv:
3131

3232
```bash
33-
poetry install
33+
uv sync
3434
```
3535

3636
4. Set up environment variables:
@@ -45,7 +45,7 @@ This example demonstrates how to use the Atomic Agents framework to analyze imag
4545
5. Run the example:
4646

4747
```bash
48-
poetry run python basic_multimodal/main.py
48+
uv run python basic_multimodal/main.py
4949
```
5050

5151
## Components

0 commit comments

Comments
 (0)