Skip to content
Merged
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
53 changes: 53 additions & 0 deletions .github/workflows/coverage-gist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Update Coverage Badge

on:
push:
branches: [ main ]

jobs:
coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3

- name: Install dependencies
run: |
poetry install --all-extras

- name: Start Redis Stack
run: |
docker run -d --name redis-stack -p 6379:6379 redis/redis-stack-server:latest

- name: Run tests with coverage
run: |
poetry run pytest --cov=langgraph --cov-report=term --cov-report=json
echo "COVERAGE=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")" >> $GITHUB_ENV

- name: Create Coverage Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_TOKEN }}
gistID: ${{ secrets.GIST_ID }}
filename: langgraph-redis-coverage.json
label: Coverage
message: ${{ env.COVERAGE }}%
color: ${{
env.COVERAGE < 70 && 'red' ||
env.COVERAGE < 80 && 'yellow' ||
'green'
}}

- name: Stop Redis
if: always()
run: docker stop redis-stack && docker rm redis-stack
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# LangGraph Redis

[![PyPI version](https://badge.fury.io/py/langgraph-checkpoint-redis.svg)](https://badge.fury.io/py/langgraph-checkpoint-redis)
[![Python versions](https://img.shields.io/pypi/pyversions/langgraph-checkpoint-redis.svg)](https://pypi.org/project/langgraph-checkpoint-redis/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Tests](https://github.com/redis-developer/langgraph-redis/actions/workflows/test.yml/badge.svg)](https://github.com/redis-developer/langgraph-redis/actions/workflows/test.yml)
[![Coverage](https://img.shields.io/endpoint?url=https://gist.github.com/bsbodden/4b5aae70fef2c9606648bce5d010e129/raw/langgraph-redis-coverage.json)](https://github.com/redis-developer/langgraph-redis/actions/workflows/coverage-gist.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![Checked with mypy](https://img.shields.io/badge/mypy-checked-blue)](http://mypy-lang.org/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Downloads](https://static.pepy.tech/badge/langgraph-checkpoint-redis)](https://pepy.tech/project/langgraph-checkpoint-redis)
[![Redis](https://img.shields.io/badge/Redis-8.0%2B-DC382D?logo=redis&logoColor=white)](https://redis.io)

This repository contains Redis implementations for LangGraph, providing both Checkpoint Savers and Stores functionality.

## Overview
Expand Down Expand Up @@ -80,11 +92,13 @@ saver.setup()
#### Azure Cache for Redis Specific Settings

For Azure Cache for Redis Enterprise tier:

- **Port**: Use port `10000` for Enterprise tier with TLS, or `6379` for standard
- **Modules**: Enterprise tier includes RediSearch and RedisJSON by default
- **SSL/TLS**: Always enabled, minimum TLS 1.2 for Enterprise

Example for Azure Cache for Redis Enterprise:

```python
client = Redis(
host="your-cache.redisenterprise.cache.azure.net",
Expand Down
Loading