.gitignore•6.74 kB
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# Plugin
SuperClaude/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be added to the global gitignore or merged into this project gitignore. For a PyCharm
# project, it is recommended to uncomment the following line:
#.idea/
# Application specific
logs/
*.log
temp_docx/
.DS_Store
# Neo4j
data/
import/
logs/
plugins/
conf/
# MCP Server
mcp_server.log
# Notion cache
.notion_cache/
pyproject.toml
# Wechat data
local_data/wechat[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
dev-dependencies = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"black>=23.0.0",
"ruff>=0.1.0",
"mypy>=1.7.0",
"pre-commit>=3.5.0",
]
[project]
name = "personal-ai-memory"
version = "0.1.0"
description = "Personal AI Memory System - Project Chimera"
readme = "README.md"
requires-python = ">=3.11"
authors = [
{name = "Hank", email = "your-email@example.com"},
]
license = {text = "MIT"}
keywords = ["ai", "memory", "notion", "neo4j", "mcp"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
# 核心框架
"pydantic>=2.5.0",
"pydantic-settings>=2.1.0",
"python-dotenv>=1.0.0",
"loguru>=0.7.0",
"neo4j>=5.15.0",
# Notion API
"notion-client>=2.2.1",
# MCP 框架
"mcp>=1.0.0",
"fastmcp>=0.2.0",
# HTTP 客户端
"httpx>=0.25.0",
"aiohttp>=3.9.0",
# AI/LLM 相关
"google-generativeai>=0.3.0",
"openai>=1.3.0",
"langchain>=0.3.26",
"langchain-google-genai>=2.0.10",
"tiktoken>=0.5.0",
# 机器学习
"numpy==1.24.0",
"scikit-learn>=1.3.0,<1.4.0",
# 文档处理
"PyPDF2>=3.0.0",
"python-docx>=1.1.0",
"openpyxl>=3.1.0",
"aiofiles>=24.1.0",
# 工具库
"asyncio-throttle>=1.0.2",
"schedule>=1.2.0",
"typer>=0.9.0",
"rich>=13.0.0",
"graphiti-core[google-genai]==0.17.5",
"fastapi>=0.116.1",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"black>=23.0.0",
"ruff>=0.1.0",
"mypy>=1.7.0",
"pre-commit>=3.5.0",
]
[project.urls]
"Homepage" = "https://github.com/your-username/personal-ai-memory"
"Bug Tracker" = "https://github.com/your-username/personal-ai-memory/issues"
[project.scripts]
chimera-sync = "run_chimera:main"
chimera-mcp = "fastmcp_server:main"
chimera-setup = "scripts.setup_database:main"
chimera-health = "scripts.health_check:main"
[tool.hatch.build.targets.wheel]
packages = ["config", "core", "sync_service", "mcp_server", "utils", "scripts"]
[tool.hatch.version]
path = "core/__init__.py"
[tool.black]
line-length = 100
target-version = ['py311']
include = '\.pyi?$'
extend-exclude = '''
/(
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[tool.ruff]
target-version = "py311"
line-length = 100
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]
[tool.mypy]
python_version = "3.11"
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
strict_equality = true
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "auto"