Skip to content

Make a separate codebase for the client #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 18, 2025
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
131 changes: 131 additions & 0 deletions .github/workflows/agent-memory-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Agent Memory Client CI

on:
push:
branches: [main]
tags:
- 'client/v*.*.*'
pull_request:
branches: [main]

jobs:
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Install dependencies
working-directory: agent-memory-client
run: uv sync --extra dev

- name: Lint with Ruff
working-directory: agent-memory-client
run: uv run ruff check agent_memory_client

- name: Check formatting with Ruff formatter
working-directory: agent-memory-client
run: uv run ruff format --check agent_memory_client

- name: Type check with mypy
working-directory: agent-memory-client
run: uv run mypy agent_memory_client

- name: Run tests
working-directory: agent-memory-client
run: uv run pytest tests/ --cov=agent_memory_client --cov-report=xml

publish-testpypi:
name: Publish to TestPyPI
needs: test
if: startsWith(github.ref, 'refs/tags/client/') && contains(github.ref, '-')
runs-on: ubuntu-latest
environment: testpypi
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4

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

- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build

- name: Build package
working-directory: agent-memory-client
run: python -m build

- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: agent-memory-client/dist/

publish-pypi:
name: Publish to PyPI
needs: test
if: startsWith(github.ref, 'refs/tags/client/') && !contains(github.ref, '-')
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4

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

- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build

- name: Build package
working-directory: agent-memory-client
run: python -m build

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: agent-memory-client/dist/

# Alternative: API Token Authentication (if trusted publishing doesn't work)
# Uncomment the sections below and add these secrets to your repository:
# - TEST_PYPI_API_TOKEN (for TestPyPI)
# - PYPI_API_TOKEN (for PyPI)
#
# For TestPyPI job, replace the publish step with:
# - name: Publish package to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
# packages-dir: agent-memory-client/dist/
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
#
# For PyPI job, replace the publish step with:
# - name: Publish package to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# packages-dir: agent-memory-client/dist/
# password: ${{ secrets.PYPI_API_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ jobs:
pip install uv
uv sync --all-extras

- name: Install agent-memory-client
run: |
uv pip install -e ./agent-memory-client

- name: Run tests
run: |
uv run pytest --run-api-tests
Expand Down
11 changes: 8 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ pip install uv

```bash
# Development workflow
uv install # Install dependencies
uv venv # Create a virtualenv (once)
source .venv/bin/activate # Activate the virtualenv (start of terminal session)
uv install --all-extras # Install dependencies
uv sync --all-extras # Sync latest dependencies
uv run ruff check # Run linting
uv run ruff format # Format code
uv run pytest # Run tests
uv run pytest tests/ # Run specific test directory
uv run pytest # Run tests
uv run pytest tests/ # Run specific test directory
uv add <dependency> # Add a dependency to pyproject.toml and update lock file
uv remove <dependency> # Remove a dependency from pyproject.toml and update lock file

# Server commands
uv run agent-memory api # Start REST API server (default port 8000)
Expand Down
Loading