dial-memory 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dial_memory-0.1.1/.github/workflows/ci.yml +25 -0
- dial_memory-0.1.1/.github/workflows/publish.yml +74 -0
- dial_memory-0.1.1/.gitignore +6 -0
- dial_memory-0.1.1/CLAUDE.md +17 -0
- dial_memory-0.1.1/DESIGN.md +616 -0
- dial_memory-0.1.1/LICENSE +21 -0
- dial_memory-0.1.1/PKG-INFO +55 -0
- dial_memory-0.1.1/README.md +42 -0
- dial_memory-0.1.1/dial/MEMORY.md +39 -0
- dial_memory-0.1.1/dial_memory/__init__.py +0 -0
- dial_memory-0.1.1/dial_memory/provider.py +278 -0
- dial_memory-0.1.1/dial_memory/scorer.py +47 -0
- dial_memory-0.1.1/dial_memory/storage.py +69 -0
- dial_memory-0.1.1/pyproject.toml +24 -0
- dial_memory-0.1.1/tests/__init__.py +0 -0
- dial_memory-0.1.1/tests/test_provider.py +262 -0
- dial_memory-0.1.1/tests/test_scorer.py +65 -0
- dial_memory-0.1.1/tests/test_storage.py +62 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: ${{ matrix.python-version }}
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: |
|
|
22
|
+
pip install "strawpot @ git+https://github.com/strawpot/strawpot.git@main#subdirectory=cli"
|
|
23
|
+
pip install -e ".[dev]"
|
|
24
|
+
- name: Run tests
|
|
25
|
+
run: pytest --cov=dial_memory --cov-report=term-missing -v
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "dial_memory/**"
|
|
8
|
+
- "dial/**"
|
|
9
|
+
- "pyproject.toml"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
version:
|
|
13
|
+
description: "Version override (e.g. 0.2.0). Leave empty for auto patch bump."
|
|
14
|
+
required: false
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
id-token: write
|
|
18
|
+
contents: write
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
release:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
environment: pypi
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0
|
|
28
|
+
|
|
29
|
+
- uses: actions/setup-python@v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.12"
|
|
32
|
+
|
|
33
|
+
- name: Determine version
|
|
34
|
+
id: version
|
|
35
|
+
run: |
|
|
36
|
+
if [ -n "${{ inputs.version }}" ]; then
|
|
37
|
+
echo "version=${{ inputs.version }}" >> "$GITHUB_OUTPUT"
|
|
38
|
+
echo "tag=v${{ inputs.version }}" >> "$GITHUB_OUTPUT"
|
|
39
|
+
else
|
|
40
|
+
LATEST=$(git tag --list 'v*' --sort=-v:refname | head -n1)
|
|
41
|
+
if [ -z "$LATEST" ]; then
|
|
42
|
+
echo "version=0.1.0" >> "$GITHUB_OUTPUT"
|
|
43
|
+
echo "tag=v0.1.0" >> "$GITHUB_OUTPUT"
|
|
44
|
+
else
|
|
45
|
+
MAJOR=$(echo "$LATEST" | sed 's/^v//' | cut -d. -f1)
|
|
46
|
+
MINOR=$(echo "$LATEST" | sed 's/^v//' | cut -d. -f2)
|
|
47
|
+
PATCH=$(echo "$LATEST" | sed 's/^v//' | cut -d. -f3)
|
|
48
|
+
NEW_PATCH=$((PATCH + 1))
|
|
49
|
+
echo "version=${MAJOR}.${MINOR}.${NEW_PATCH}" >> "$GITHUB_OUTPUT"
|
|
50
|
+
echo "tag=v${MAJOR}.${MINOR}.${NEW_PATCH}" >> "$GITHUB_OUTPUT"
|
|
51
|
+
fi
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
- name: Create and push tag
|
|
55
|
+
run: |
|
|
56
|
+
git tag "${{ steps.version.outputs.tag }}"
|
|
57
|
+
git push origin "${{ steps.version.outputs.tag }}"
|
|
58
|
+
|
|
59
|
+
- name: Update version in pyproject.toml
|
|
60
|
+
run: |
|
|
61
|
+
sed -i "s/^version = .*/version = \"${{ steps.version.outputs.version }}\"/" pyproject.toml
|
|
62
|
+
|
|
63
|
+
- name: Build package
|
|
64
|
+
run: |
|
|
65
|
+
pip install build
|
|
66
|
+
python -m build
|
|
67
|
+
|
|
68
|
+
- name: Create GitHub release
|
|
69
|
+
run: gh release create "${{ steps.version.outputs.tag }}" --generate-notes
|
|
70
|
+
env:
|
|
71
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
72
|
+
|
|
73
|
+
- name: Publish to PyPI
|
|
74
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Claude Code Instructions
|
|
2
|
+
|
|
3
|
+
## Git workflow
|
|
4
|
+
|
|
5
|
+
- **Never push directly to `main`.** Always create a new branch and open a PR.
|
|
6
|
+
- Use the branch naming convention `claude/<branch-name>`.
|
|
7
|
+
- Do not bypass branch protection rules or skip required checks.
|
|
8
|
+
|
|
9
|
+
## After completing any code change
|
|
10
|
+
|
|
11
|
+
1. Show me the full `git diff` for review
|
|
12
|
+
2. Wait for my explicit approval before proceeding
|
|
13
|
+
3. Once approved:
|
|
14
|
+
- Rebase from `main` before committing (`git fetch origin && git rebase origin/main`)
|
|
15
|
+
- **If the current branch has an open PR**, push to that branch to update the existing PR.
|
|
16
|
+
- **If the current branch's PR is already merged** (or there is no PR), pull the latest `main` (`git checkout main && git pull origin main`), then create a fresh branch from `main` and open a new PR.
|
|
17
|
+
- Never reuse a branch whose PR has been merged. Each merged PR keeps its own branch.
|