Skip to content

Commit ed0044b

Browse files
author
Memtext User
committed
v0.2.1: Add error handling, logging, and CI/CD
- Add error handling with MemTextError exception hierarchy - Add CLI exit codes (1=error, 2=not found, 3=db error, 4=validation) - Add verbose flag (-v) for debugging - Add logging_config.py with structured logging - Add GitHub Actions CI/CD workflow (.github/workflows/ci.yml) - Update version to 0.2.1 in pyproject.toml - Add optional dependencies: prolog, api extras
1 parent b79584f commit ed0044b

File tree

4 files changed

+516
-110
lines changed

4 files changed

+516
-110
lines changed

.github/workflows/ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e ".[dev]"
28+
29+
- name: Lint with ruff
30+
run: ruff check src/ tests/
31+
continue-on-error: true
32+
33+
- name: Run tests
34+
run: pytest tests/ -v --cov=memtext --cov-report=term-missing
35+
36+
build:
37+
runs-on: ubuntu-latest
38+
needs: test
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Set up Python
44+
uses: actions/setup-python@v5
45+
with:
46+
python-version: "3.12"
47+
48+
- name: Build package
49+
run: |
50+
pip install build
51+
python -m build
52+
53+
- name: Check package
54+
run: |
55+
pip install twine
56+
twine check dist/*
57+
58+
publish:
59+
runs-on: ubuntu-latest
60+
needs: build
61+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
62+
63+
steps:
64+
- uses: actions/checkout@v4
65+
66+
- name: Set up Python
67+
uses: actions/setup-python@v5
68+
with:
69+
python-version: "3.12"
70+
71+
- name: Build package
72+
run: |
73+
pip install build
74+
python -m build
75+
76+
- name: Publish to PyPI
77+
uses: pypa/gh-action-pypi-publish@release/v1
78+
with:
79+
password: ${{ secrets.PYPI_API_TOKEN }}
80+

pyproject.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
[project]
22
name = "memtext"
3-
version = "0.1.0"
3+
version = "0.2.1"
44
description = "Context offloading for AI agents - persistent memory across sessions"
55
readme = "README.md"
66
requires-python = ">=3.10"
7-
authors = [{name = "User"}]
7+
authors = [{name = "MemText Team"}]
88
classifiers = [
9-
"Development Status :: 3 - Alpha",
9+
"Development Status :: 4 - Beta",
1010
"Intended Audience :: Developers",
1111
"Programming Language :: Python :: 3.10",
1212
"Programming Language :: Python :: 3.11",
1313
"Programming Language :: Python :: 3.12",
14+
"Programming Language :: Python :: 3.13",
1415
]
1516
dependencies = []
1617

@@ -20,6 +21,13 @@ dev = [
2021
"pytest-cov>=4.0",
2122
"ruff>=0.1.0",
2223
]
24+
prolog = [
25+
"pyswip>=0.3.0",
26+
]
27+
api = [
28+
"fastapi>=0.100",
29+
"uvicorn>=0.23",
30+
]
2331

2432
[project.scripts]
2533
memtext = "memtext.cli:main"

0 commit comments

Comments
 (0)