Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/scripts/check_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
import sys
from typing import Dict

LIB_DIRS = ["libs/aws", "libs/langgraph-checkpoint-aws", "libs/agentcore-codeinterpreter"]
LIB_DIRS = [
"libs/aws",
"libs/langgraph-checkpoint-aws",
"libs/agentcore-codeinterpreter",
"libs/langchain-backend-aws",
]

if __name__ == "__main__":
files = sys.argv[1:]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- libs/aws
- libs/langgraph-checkpoint-aws
- libs/agentcore-codeinterpreter
- libs/langchain-backend-aws
dangerous-nonmaster-release:
required: false
type: boolean
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- libs/aws
- libs/langgraph-checkpoint-aws
- libs/agentcore-codeinterpreter
- libs/langchain-backend-aws
fork:
required: true
type: string
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
aws
langgraph-checkpoint-aws
agentcore-codeinterpreter
langchain-backend-aws
model-profiles
requireScope: false
disallowScopes: |
Expand Down
77 changes: 77 additions & 0 deletions libs/langchain-backend-aws/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
######################
# NON FILE TARGETS
######################
.PHONY: all format lint test tests integration_tests help coverage_tests coverage_integration_tests coverage_report coverage_html

######################
# ALL TARGETS
######################

all: help ## Default target = help

.EXPORT_ALL_VARIABLES:
UV_FROZEN = true

######################
# TEST CASES
######################

# Define a variable for the test file path.
test test_watch tests: TEST_FILE ?= tests/unit_tests/
integration_test integration_tests: TEST_FILE = tests/integration_tests/

# Define a variable for Python and notebook files.
PYTHON_FILES=.

tests: ## Run all unit tests
env -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY -u AWS_SESSION_TOKEN uv run --group test pytest --disable-socket --allow-unix-socket $(TEST_FILE)

test: ## Run individual unit test: make test TEST_FILE=tests/unit_tests/test.py
env -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY -u AWS_SESSION_TOKEN uv run --group test pytest --disable-socket --allow-unix-socket $(TEST_FILE)

integration_tests: ## Run all integration tests
uv run --group test --group test_integration pytest -n auto $(TEST_FILE)

integration_test: ## Run individual integration test: make integration_test TEST_FILE=tests/integration_tests/integ_test.py
uv run --group test --group test_integration pytest -n auto $(TEST_FILE)

coverage_tests: ## Run unit tests with coverage
env -u AWS_ACCESS_KEY_ID -u AWS_SECRET_ACCESS_KEY -u AWS_SESSION_TOKEN uv run --group test pytest --cov=langchain_backend_aws --cov-report=html --cov-report=term-missing --cov-branch tests/unit_tests/

coverage_integration_tests: ## Run integration tests with coverage
uv run --group test --group test_integration pytest --cov=langchain_backend_aws --cov-report=html --cov-report=term-missing --cov-branch tests/integration_tests/

coverage_report: ## Generate coverage report
uv run --group test coverage report

coverage_html: ## Generate HTML coverage report
uv run --group test coverage html

######################
# LINTING AND FORMATTING
######################

# Define a variable for Python and notebook files.
PYTHON_FILES=.
MYPY_CACHE=.mypy_cache
lint format: PYTHON_FILES=.
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=libs/langchain-backend-aws --name-only --diff-filter=d main | grep -E '\.py$$|\.ipynb$$')
lint_package: PYTHON_FILES=langchain_backend_aws
lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test

lint lint_diff lint_package lint_tests: ## Run linter
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES) --diff
[ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && uv run --all-groups mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)

format format_diff: ## Run code formatter
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)

######################
# HELP
######################

help: ## Print this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
334 changes: 334 additions & 0 deletions libs/langchain-backend-aws/README.md

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions libs/langchain-backend-aws/langchain_backend_aws/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""AWS-backed Deep Agents backends.

Top-level re-exports for convenience. For new code, prefer importing
from the specific subpackage:

.. code-block:: python

from langchain_backend_aws.s3 import S3Backend, S3BackendConfig
"""

from langchain_backend_aws.s3 import S3Backend, S3BackendConfig

__all__ = ["S3Backend", "S3BackendConfig"]
13 changes: 13 additions & 0 deletions libs/langchain-backend-aws/langchain_backend_aws/s3/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Amazon S3 backend for Deep Agents.

Public API surface — only the names listed in :data:`__all__` are
considered stable. Modules with a leading underscore
(``_config``, ``_internal``, ``_io``, ``_glob``, ``_grep``, ``_read``,
``_write``, ``_ls``, ``_ssrf``) are implementation details and may
change without notice.
"""

from langchain_backend_aws.s3._config import BinaryReadMode
from langchain_backend_aws.s3.backend import S3Backend, S3BackendConfig

__all__ = ["BinaryReadMode", "S3Backend", "S3BackendConfig"]
Loading
Loading