Skip to content

Commit 0e0e0dc

Browse files
authored
Uv workspaces and pydantic-ai-slim (#92)
1 parent 4060f48 commit 0e0e0dc

Some content is hidden

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

43 files changed

+336
-101
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
env:
3535
SKIP: no-commit-to-branch
3636

37+
- run: uv build --all-packages
38+
- run: ls -lh dist/
39+
3740
# mypy and lint are a bit slower than other jobs, so we run them separately
3841
mypy:
3942
runs-on: ubuntu-latest
@@ -193,7 +196,7 @@ jobs:
193196
with:
194197
version_file_path: pyproject.toml
195198

196-
- run: uv build
199+
- run: uv build --all-packages
197200

198201
- name: Publish to PyPI
199202
uses: pypa/gh-action-pypi-publish@release/v1

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
.PHONY: install # Install the package, dependencies, and pre-commit for local development
1212
install: .uv .pre-commit
13-
uv sync --frozen --all-extras --group lint --group docs
13+
uv sync --frozen --all-extras --all-packages --group lint --group docs
1414
pre-commit install --install-hooks
1515

1616
.PHONY: sync # Update local packages and uv.lock
1717
sync: .uv
18-
uv sync --all-extras --group lint --group docs
18+
uv sync --all-extras --all-packages --group lint --group docs
1919

2020
.PHONY: format # Format the code
2121
format:

docs/.hooks/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def sub_cf_video(m: re.Match[str]) -> str:
6767

6868
domain = 'https://customer-nmegqx24430okhaq.cloudflarestream.com'
6969
poster = f'{domain}/{video_id}/thumbnails/thumbnail.jpg?time={time}&height=600'
70-
print(poster)
7170
return f"""
7271
<div style="position: relative; padding-top: 67%;">
7372
<iframe

mkdocs.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ markdown_extensions:
131131
- sane_lists # this means you can start a list from any number
132132

133133
watch:
134-
- pydantic_ai
134+
- pydantic_ai_slim
135135
- pydantic_ai_examples
136136

137137
plugins:
@@ -141,7 +141,7 @@ plugins:
141141
- mkdocstrings:
142142
handlers:
143143
python:
144-
paths: [src/packages/pydantic_ai/pydantic_ai]
144+
paths: [src/packages/pydantic_ai_slim/pydantic_ai]
145145
options:
146146
relative_crossrefs: true
147147
members_order: source
@@ -153,8 +153,7 @@ plugins:
153153
heading_level: 3
154154
import:
155155
- url: https://docs.python.org/3/objects.inv
156-
# TODO use /latest/ not /dev/ when Pydantic 2.10 is released
157-
- url: https://docs.pydantic.dev/dev/objects.inv
156+
- url: https://docs.pydantic.dev/latest/objects.inv
158157
- url: https://fastapi.tiangolo.com/objects.inv
159158
- url: https://typing-extensions.readthedocs.io/en/latest/objects.inv
160159
- url: https://rich.readthedocs.io/en/stable/objects.inv

pydantic_ai_examples/.ruff.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "pydantic-ai-examples"
7+
version = "0.0.6a4"
8+
description = "Agent Framework / shim to use Pydantic with LLMs"
9+
authors = [
10+
{ name = "Samuel Colvin", email = "[email protected]" },
11+
]
12+
license = "MIT"
13+
readme = "README.md"
14+
classifiers = [
15+
"Development Status :: 4 - Beta",
16+
"Programming Language :: Python",
17+
"Programming Language :: Python :: 3",
18+
"Programming Language :: Python :: 3 :: Only",
19+
"Programming Language :: Python :: 3.9",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
24+
"Intended Audience :: Developers",
25+
"Intended Audience :: Information Technology",
26+
"Intended Audience :: System Administrators",
27+
"License :: OSI Approved :: MIT License",
28+
"Operating System :: Unix",
29+
"Operating System :: POSIX :: Linux",
30+
"Environment :: Console",
31+
"Environment :: MacOS X",
32+
"Topic :: Software Development :: Libraries :: Python Modules",
33+
"Topic :: Internet",
34+
]
35+
requires-python = ">=3.9"
36+
dependencies = [
37+
"pydantic-ai-slim[openai,vertexai,groq]==0.0.6a4",
38+
"asyncpg>=0.30.0",
39+
"fastapi>=0.115.4",
40+
"logfire[asyncpg,fastapi]>=2.3",
41+
"python-multipart>=0.0.17",
42+
"rich>=13.9.2",
43+
"uvicorn>=0.32.0",
44+
]
45+
46+
[tool.hatch.build]
47+
include = ["*.py", "*.html", "*.ts"]
48+
49+
[tool.hatch.build.targets.wheel.sources]
50+
"" = "pydantic_ai_examples"
51+
52+
[tool.uv.sources]
53+
pydantic-ai-slim = { workspace = true }
54+
55+
[tool.ruff]
56+
extend = "../pyproject.toml"
57+
line-length = 88

pydantic_ai_slim/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Coming soon
2+
3+
[![CI](https://github.com/pydantic/pydantic-ai/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/pydantic/pydantic-ai/actions/workflows/ci.yml?query=branch%3Amain)
4+
[![Coverage](https://coverage-badge.samuelcolvin.workers.dev/pydantic/pydantic-ai.svg)](https://coverage-badge.samuelcolvin.workers.dev/redirect/pydantic/pydantic-ai)
5+
[![PyPI](https://img.shields.io/pypi/v/pydantic-ai.svg)](https://pypi.python.org/pypi/pydantic-ai)
6+
[![versions](https://img.shields.io/pypi/pyversions/pydantic-ai.svg)](https://github.com/pydantic/pydantic-ai)
7+
[![license](https://img.shields.io/github/license/pydantic/pydantic-ai.svg?v)](https://github.com/pydantic/pydantic-ai/blob/main/LICENSE)

pydantic_ai/__init__.py renamed to pydantic_ai_slim/pydantic_ai/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
from .exceptions import ModelRetry, UnexpectedModelBehavior, UserError
66

77
__all__ = 'Agent', 'CallContext', 'ModelRetry', 'UnexpectedModelBehavior', 'UserError', '__version__'
8-
__version__ = version('pydantic_ai')
8+
__version__ = version('pydantic_ai_slim')
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)