Skip to content

Commit ee1b8d6

Browse files
DouweMdmontagu
andauthored
Introduce new graph API in beta (#2982)
Co-authored-by: David Montague <[email protected]>
1 parent faa3868 commit ee1b8d6

Some content is hidden

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

65 files changed

+11066
-81
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@ permissions:
1818

1919
jobs:
2020
lint:
21+
name: lint on ${{ matrix.python-version }}
2122
runs-on: ubuntu-latest
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
# Typecheck both Python 3.10 and 3.13. We've had issues due to not checking against both.
27+
python-version: ["3.10", "3.13"]
28+
env:
29+
UV_PYTHON: ${{ matrix.python-version }}
30+
PYRIGHT_PYTHON: ${{ matrix.python-version }}
2231
steps:
2332
- uses: actions/checkout@v4
2433

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ lint: ## Lint the code
3636

3737
.PHONY: typecheck-pyright
3838
typecheck-pyright:
39+
@# To typecheck for a specific version of python, run 'make install-all-python' then set environment variable PYRIGHT_PYTHON=3.10 or similar
3940
@# PYRIGHT_PYTHON_IGNORE_WARNINGS avoids the overhead of making a request to github on every invocation
40-
PYRIGHT_PYTHON_IGNORE_WARNINGS=1 uv run pyright
41+
PYRIGHT_PYTHON_IGNORE_WARNINGS=1 uv run pyright $(if $(PYRIGHT_PYTHON),--pythonversion $(PYRIGHT_PYTHON))
4142

4243
.PHONY: typecheck-mypy
4344
typecheck-mypy:
@@ -51,7 +52,8 @@ typecheck-both: typecheck-pyright typecheck-mypy
5152

5253
.PHONY: test
5354
test: ## Run tests and collect coverage data
54-
uv run coverage run -m pytest -n auto --dist=loadgroup --durations=20
55+
@# To test using a specific version of python, run 'make install-all-python' then set environment variable PYTEST_PYTHON=3.10 or similar
56+
$(if $(PYTEST_PYTHON),UV_PROJECT_ENVIRONMENT=.venv$(subst .,,$(PYTEST_PYTHON))) uv run $(if $(PYTEST_PYTHON),--python $(PYTEST_PYTHON)) coverage run -m pytest -n auto --dist=loadgroup --durations=20
5557
@uv run coverage combine
5658
@uv run coverage report
5759

docs/api/pydantic_graph/beta.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `pydantic_graph.beta`
2+
3+
::: pydantic_graph.beta
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `pydantic_graph.beta.decision`
2+
3+
::: pydantic_graph.beta.decision
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `pydantic_graph.beta.graph`
2+
3+
::: pydantic_graph.beta.graph
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `pydantic_graph.beta.graph_builder`
2+
3+
::: pydantic_graph.beta.graph_builder
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `pydantic_graph.beta.join`
2+
3+
::: pydantic_graph.beta.join
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `pydantic_graph.beta.node`
2+
3+
::: pydantic_graph.beta.node
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `pydantic_graph.beta.step`
2+
3+
::: pydantic_graph.beta.step

0 commit comments

Comments
 (0)