ci: migrate to uv! (#4698)

* Migrate to `uv`
* Format `pyproject.toml` files properly
* Remove upper bounds on dependencies, and bounds on dev dependencies
(we should be using latest)
* Move to hatch for packaing

In the future we should:
* Set up dependabot / automate lockfile updates and tests
* Add tests for min compatible versions (I'll do this right after merge)
* Use dynamic versioning
* Bump `pydantic` to v2.11.4 in the lockfile, we have some tests failing
This commit is contained in:
Sydney Runkle
2025-05-15 17:39:14 -07:00
committed by GitHub
parent 217795eb72
commit 228a08b966
94 changed files with 19388 additions and 23600 deletions
@@ -1,5 +1,6 @@
import json
from typing import Any, Dict, Optional, Sequence, Tuple
from collections.abc import Sequence
from typing import Any, Optional
from langchain_core.runnables import RunnableConfig
@@ -7,8 +8,8 @@ from langgraph.checkpoint.base import get_checkpoint_id
def _metadata_predicate(
metadata_filter: Dict[str, Any],
) -> Tuple[Sequence[str], Sequence[Any]]:
metadata_filter: dict[str, Any],
) -> tuple[Sequence[str], Sequence[Any]]:
"""Return WHERE clause predicates for (a)search() given metadata filter.
This method returns a tuple of a string and a tuple of values. The string
@@ -17,7 +18,7 @@ def _metadata_predicate(
for each of the corresponding parameters.
"""
def _where_value(query_value: Any) -> Tuple[str, Any]:
def _where_value(query_value: Any) -> tuple[str, Any]:
"""Return tuple of operator and value for WHERE clause predicate."""
if query_value is None:
return ("IS ?", None)
@@ -52,9 +53,9 @@ def _metadata_predicate(
def search_where(
config: Optional[RunnableConfig],
filter: Optional[Dict[str, Any]],
filter: Optional[dict[str, Any]],
before: Optional[RunnableConfig] = None,
) -> Tuple[str, Sequence[Any]]:
) -> tuple[str, Sequence[Any]]:
"""Return WHERE clause predicates for (a)search() given metadata filter
and `before` config.