pyproject.toml•8.11 kB
[project]
name = "selfmemory"
dynamic = ["version"] # Version will be determined from git tags
description = "Enhanced Memory Management for AI Agents with zero-setup simplicity"
readme = "README.md"
requires-python = ">=3.10"
authors = [
{name = "SelfMemory Team", email = "shrijayan@cpluz.com"}
]
maintainers = [
{name = "SelfMemory Team", email = "shrijayan@cpluz.com"}
]
license = "Apache-2.0"
keywords = [
"memory", "ai", "ml", "vector", "search", "embeddings",
"agents", "llm", "artificial-intelligence", "qdrant", "semantic-search"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Database :: Database Engines/Servers",
"Topic :: Text Processing :: Indexing",
"Typing :: Typed"
]
dependencies = [
# Core dependencies for zero-setup Memory class
"chromadb>=0.4.0", # Primary vector database (zero-setup)
"qdrant-client>=1.6.0", # Vector database (enterprise)
"pydantic>=2.0.0,<3.0.0", # Data validation
"python-dotenv>=1.0.0", # Environment variables
"cryptography>=40.0.0", # Security
"httpx>=0.25.0", # HTTP client
# Server capabilities (FastAPI + Uvicorn)
"fastapi>=0.100.0", # API server
"uvicorn>=0.20.0", # ASGI server
"starlette>=0.27.0", # Web framework
"psutil>=5.9.0", # System and process utilities for health checks
"pymongo>=4.0.0", # MongoDB backend for multi-tenant server
# Embedding providers
"ollama>=0.1.0", # Ollama embeddings
"openai>=1.0.0", # OpenAI embeddings
# Configuration support
"pyyaml>=6.0.0", # YAML config files
"mcp[cli]>=1.13.0",
]
[project.urls]
Homepage = "https://selfmemory.com"
Repository = "https://github.com/selfmemory/selfmemory"
Documentation = "https://github.com/selfmemory/selfmemory/wiki"
Issues = "https://github.com/selfmemory/selfmemory/issues"
Changelog = "https://github.com/selfmemory/selfmemory/blob/main/CHANGELOG.md"
[project.optional-dependencies]
# Enterprise features (MongoDB + OAuth + Multi-user + MCP)
enterprise = [
"pymongo>=4.0.0", # MongoDB backend
"authlib>=1.2.0", # OAuth authentication
"google-auth>=2.15.0", # Google OAuth
"mcp[cli]>=1.0.0; python_version>='3.10'", # MCP server support
"fastmcp>=2.0.0; python_version>='3.10'" # FastMCP
]
# Testing dependencies
test = [
"pytest>=7.0.0", # Modern version with Python 3.10+ support
"pytest-asyncio>=0.21.0", # Modern version with Python 3.10+ support
"pytest-mock>=3.10.0", # Modern version with Python 3.10+ support
"pytest-cov>=4.0.0", # Code coverage reporting
"responses>=0.23.0", # Mock HTTP responses for client testing
"httpx>=0.25.0", # HTTP client for testing (already in main deps)
]
[project.scripts]
selfmemory = "selfmemory.cli:main"
[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=8.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["selfmemory*"]
# setuptools-scm configuration for version from git tags
[tool.setuptools_scm]
# Version derived from git tags
version_scheme = "post-release"
local_scheme = "no-local-version"
fallback_version = "0.3.0" # Fallback if no git tags found
write_to = "selfmemory/_version.py" # Optional: write version to file
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as Black.
line-length = 88
indent-width = 4
# Target Python 3.10+ for modern compatibility
target-version = "py310"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = [
"E4",
"E7",
"E9",
"F",
"W",
"B", # flake8-bugbear
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"PTH", # flake8-use-pathlib
"SIM", # flake8-simplify
"RET", # flake8-return
"TCH", # flake8-type-checking
]
ignore = [
"E501", # Line too long, handled by formatter
"B008", # Do not perform function calls in argument defaults
"RET504", # Unnecessary variable assignment before `return` statement
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
docstring-code-format = false
# Set the line length limit used by the formatter.
docstring-code-line-length = "dynamic"
[dependency-groups]
dev = [
"build>=1.3.0",
"pre-commit>=4.3.0",
"ruff>=0.12.9",
"twine>=6.1.0",
"python-semantic-release>=9.0.0",
]
# Pytest configuration for test discovery and execution
[tool.pytest.ini_options]
pythonpath = ["."]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--verbose",
"-ra",
"--cov=selfmemory",
"--cov-report=term-missing",
"--cov-report=html:htmlcov",
"--cov-report=xml",
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow tests",
"network: Tests that require network access",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.uv.workspace]
members = [
"selfmemory-mcp",
]
# Convenience scripts for development tasks (uv)
# Python Semantic Release configuration
# NO-COMMIT MODE: Creates tags and releases without committing version changes
# This avoids branch protection conflicts while maintaining full automation
[tool.semantic_release]
# Branch configuration
branch = "master"
# Commit parser - use 'angular' for conventional commits
commit_parser = "angular"
# Build and publishing
build_command = "pip install build && python -m build"
dist_path = "dist/"
upload_to_pypi = true
upload_to_release = true
remove_dist = false
# Git tagging (no version file updates or commits)
tag_commit = true
tag_format = "v{version}"
# GitHub configuration
major_on_zero = false
allow_zero_version = true
[tool.semantic_release.commit_parser_options]
allowed_tags = [
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore"
]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
[tool.semantic_release.changelog.default_template]
changelog_file = "CHANGELOG.md"
exclude_commit_patterns = []
[tool.semantic_release.changelog.environment]
block_start_string = "{%"
block_end_string = "%}"
variable_start_string = "{{"
variable_end_string = "}}"
comment_start_string = "{#"
comment_end_string = "#}"
trim_blocks = false
lstrip_blocks = false
newline_sequence = "\n"
keep_trailing_newline = false
extensions = []
autoescape = true