Skip to content

Commit 360b66c

Browse files
committed
Make a separate codebase for the client
1 parent 6d4236e commit 360b66c

23 files changed

+2637
-360
lines changed
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
name: Agent Memory Client CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags:
7+
- 'client/v*.*.*'
8+
pull_request:
9+
branches: [main]
10+
11+
jobs:
12+
test:
13+
name: Test (Python ${{ matrix.python-version }})
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ["3.10", "3.11", "3.12"]
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v3
29+
30+
- name: Install dependencies
31+
run: |
32+
cd agent-memory-client
33+
uv sync --extra dev
34+
35+
- name: Lint with Ruff
36+
run: |
37+
cd agent-memory-client
38+
uv run ruff check agent_memory_client
39+
40+
- name: Check formatting with Ruff formatter
41+
run: |
42+
cd agent-memory-client
43+
uv run ruff format --check agent_memory_client
44+
45+
- name: Type check with mypy
46+
run: |
47+
cd agent-memory-client
48+
uv run mypy agent_memory_client
49+
50+
- name: Run tests
51+
run: |
52+
cd agent-memory-client
53+
uv run pytest tests/ --cov=agent_memory_client --cov-report=xml
54+
55+
publish-testpypi:
56+
name: Publish to TestPyPI
57+
needs: test
58+
if: startsWith(github.ref, 'refs/tags/client/') && contains(github.ref, '-')
59+
runs-on: ubuntu-latest
60+
environment: testpypi
61+
permissions:
62+
id-token: write
63+
contents: read
64+
steps:
65+
- uses: actions/checkout@v4
66+
67+
- name: Set up Python
68+
uses: actions/setup-python@v4
69+
with:
70+
python-version: '3.12'
71+
72+
- name: Install build tools
73+
run: |
74+
python -m pip install --upgrade pip
75+
pip install build
76+
77+
- name: Build package
78+
working-directory: agent-memory-client
79+
run: python -m build
80+
81+
- name: Publish package to TestPyPI
82+
uses: pypa/gh-action-pypi-publish@release/v1
83+
with:
84+
repository-url: https://test.pypi.org/legacy/
85+
packages-dir: agent-memory-client/dist/
86+
87+
publish-pypi:
88+
name: Publish to PyPI
89+
needs: test
90+
if: startsWith(github.ref, 'refs/tags/client/') && !contains(github.ref, '-')
91+
runs-on: ubuntu-latest
92+
environment: pypi
93+
permissions:
94+
id-token: write
95+
contents: read
96+
steps:
97+
- uses: actions/checkout@v4
98+
99+
- name: Set up Python
100+
uses: actions/setup-python@v4
101+
with:
102+
python-version: '3.12'
103+
104+
- name: Install build tools
105+
run: |
106+
python -m pip install --upgrade pip
107+
pip install build
108+
109+
- name: Build package
110+
working-directory: agent-memory-client
111+
run: python -m build
112+
113+
- name: Publish package to PyPI
114+
uses: pypa/gh-action-pypi-publish@release/v1
115+
with:
116+
packages-dir: agent-memory-client/dist/
117+
118+
# Alternative: API Token Authentication (if trusted publishing doesn't work)
119+
# Uncomment the sections below and add these secrets to your repository:
120+
# - TEST_PYPI_API_TOKEN (for TestPyPI)
121+
# - PYPI_API_TOKEN (for PyPI)
122+
#
123+
# For TestPyPI job, replace the publish step with:
124+
# - name: Publish package to TestPyPI
125+
# uses: pypa/gh-action-pypi-publish@release/v1
126+
# with:
127+
# repository-url: https://test.pypi.org/legacy/
128+
# packages-dir: agent-memory-client/dist/
129+
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
130+
#
131+
# For PyPI job, replace the publish step with:
132+
# - name: Publish package to PyPI
133+
# uses: pypa/gh-action-pypi-publish@release/v1
134+
# with:
135+
# packages-dir: agent-memory-client/dist/
136+
# password: ${{ secrets.PYPI_API_TOKEN }}

CLAUDE.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ pip install uv
88

99
```bash
1010
# Development workflow
11-
uv install # Install dependencies
11+
uv venv # Create a virtualenv (once)
12+
source .venv/bin/activate # Activate the virtualenv (start of terminal session)
13+
uv install --all-extras # Install dependencies
14+
uv sync --all-extras # Sync latest dependencies
1215
uv run ruff check # Run linting
1316
uv run ruff format # Format code
14-
uv run pytest # Run tests
15-
uv run pytest tests/ # Run specific test directory
17+
uv run pytest # Run tests
18+
uv run pytest tests/ # Run specific test directory
1619

1720
# Server commands
1821
uv run agent-memory api # Start REST API server (default port 8000)

0 commit comments

Comments
 (0)