chore: tighten chromadb version range and add py.typed marker#142
chore: tighten chromadb version range and add py.typed marker#142bensig merged 2 commits intoMemPalace:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates MemPalace packaging/dependencies and adds a PEP 561 marker so type checkers can discover inline annotations.
Changes:
- Tightens the
chromadbdependency range and modernizes packaging metadata (hatchling, dependency groups, optional deps). - Adds
mempalace/py.typed(PEP 561) and aligns__version__with the project version. - Adds a new test suite with shared fixtures covering search, MCP server tooling/dispatch, knowledge graph, and dialect.
Reviewed changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Pins chromadb range; adds optional spellcheck extra; switches build backend to hatchling / dependency-groups. |
requirements.txt |
Removed legacy requirements file. |
mempalace/__init__.py |
Updates __version__ to 3.0.0. |
mempalace/py.typed |
Adds PEP 561 marker file. |
tests/conftest.py |
Adds fixtures and HOME isolation for safe, hermetic tests. |
tests/test_searcher.py |
Adds tests for programmatic search_memories. |
tests/test_mcp_server.py |
Adds tests for MCP JSON-RPC dispatch and tool handlers. |
tests/test_knowledge_graph.py |
Adds tests for KnowledgeGraph CRUD + temporal querying. |
tests/test_dialect.py |
Adds tests for AAAK dialect compression/encoding/decoding. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [dependency-groups] | ||
| dev = ["pytest>=7.0", "ruff>=0.4.0"] | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.hatch.build.targets.wheel] | ||
| packages = ["mempalace"] |
There was a problem hiding this comment.
The PR title/description focus on tightening the chromadb range and adding a py.typed marker, but this change also switches the build backend to hatchling and adds dependency-groups. Please update the PR description (or split the packaging/build-system change into a separate PR) so reviewers can evaluate the extra release-impacting changes explicitly.
|
|
||
|
|
||
| @pytest.fixture(scope="session", autouse=True) | ||
| def _isolate_home(tmp_path_factory): |
There was a problem hiding this comment.
The session-scoped autouse fixture _isolate_home accepts tmp_path_factory but never uses it. This adds noise and can trip unused-argument linters; consider removing the parameter (or use tmp_path_factory to create the session temp dir instead of tempfile.mkdtemp).
| def _isolate_home(tmp_path_factory): | |
| def _isolate_home(): |
| """MemPalace — Give your AI a memory. No API key required.""" | ||
|
|
||
| __version__ = "2.0.0" | ||
| __version__ = "3.0.0" | ||
|
|
||
| from .cli import main |
There was a problem hiding this comment.
Bumping __version__ to 3.0.0 makes the MCP initialize response version inconsistent: mempalace/mcp_server.py currently returns serverInfo.version as the hard-coded string "2.0.0". Consider deriving the MCP serverInfo version from mempalace.__version__ (and updating tests to assert the version) so clients don’t see conflicting version information.
| dependencies = [ | ||
| "chromadb>=0.4.0,<1", | ||
| "chromadb>=0.5.0,<0.7", | ||
| "pyyaml>=6.0", | ||
| ] |
There was a problem hiding this comment.
requirements.txt is removed in this PR, but the CI workflow still runs pip install -r requirements.txt pytest (see .github/workflows/ci.yml). Unless the workflow is updated to install from pyproject.toml (e.g., pip install -e . plus test deps, or uv sync), CI will fail with a missing file error.
|
Hey Igor — CI is failing, looks like it needs a rebase on main (we've merged a bunch of changes recently). Can you rebase and push? |
- Tighten chromadb dependency from >=0.4.0,<1 to >=0.5.0,<0.7 (the collection API changed significantly across majors; this pins to the tested range) - Add optional 'spellcheck' extras for the undeclared autocorrect dependency used in spellcheck.py - Add PEP 561 py.typed marker for type checker support Findings: MemPalace#10 (HIGH — chromadb range too wide), MemPalace#30 (LOW — undeclared autocorrect), MemPalace#32 (LOW — missing py.typed) Includes test infrastructure from PR MemPalace#131. 92 tests pass.
0727744 to
541e9bd
Compare
541e9bd to
45c2c92
Compare
…nused fixture param
Changes
1. Tighten chromadb version range (#10 — HIGH)
The collection API changed significantly across major versions. This pins to the tested, compatible range (tested with 0.6.3).
2. Declare optional spellcheck dependency (#30 — LOW)
mempalace/spellcheck.pyimportsautocorrectbut it was never declared as a dependency. Now installable viapip install mempalace[spellcheck].3. Add PEP 561 py.typed marker (#32 — LOW)
Empty
mempalace/py.typedfile so type checkers (mypy, pyright) discover the package's inline type annotations.92 tests pass (includes test infrastructure from PR #131).