Files
nanobot/pyproject.toml
T

212 lines
5.6 KiB
TOML
Raw Normal View History

2026-02-01 07:36:42 +00:00
[project]
name = "nanobot-ai"
2026-11-21 17:37:19 +08:00
version = "0.4.2"
2026-02-01 07:36:42 +00:00
description = "A lightweight personal AI assistant framework"
2026-03-16 15:27:40 +00:00
readme = { file = "README.md", content-type = "text/markdown" }
2026-02-01 07:36:42 +00:00
requires-python = ">=3.11"
license = {text = "MIT"}
authors = [
2026-04-29 08:25:09 +00:00
{name = "Xubin Ren"},
{name = "the nanobot contributors"}
2026-02-01 07:36:42 +00:00
]
keywords = ["ai", "agent", "chatbot"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
license-files = [
"LICENSE",
"THIRD_PARTY_NOTICES.md",
]
2026-02-01 07:36:42 +00:00
dependencies = [
2026-02-19 17:28:13 +00:00
"typer>=0.20.0,<1.0.0",
"anthropic>=0.100.0,<1.0.0",
2026-02-19 17:28:13 +00:00
"pydantic>=2.12.0,<3.0.0",
"pydantic-settings>=2.12.0,<3.0.0",
2026-07-28 22:55:59 +08:00
# Feishu's lark-oapi currently requires websockets<16; core supports 15 and 16.
"websockets>=15.0,<17.0",
2026-08-19 10:48:43 +08:00
"httpx[socks]>=0.28.0,<1.0.0",
"aiohttp>=3.14.3,<4.0.0",
"yarl>=1.17.0,<2.0.0",
"cryptography>=46.0.0",
"sigstore==4.5.0",
2026-10-25 00:30:59 +08:00
"ddgs>=9.16.1,<10.0.0",
"oauth-cli-kit>=0.1.6,<1.0.0",
2026-02-19 17:28:13 +00:00
"loguru>=0.7.3,<1.0.0",
"readability-lxml>=0.8.4,<1.0.0",
"lxml-html-clean>=0.4.0,<1.0.0",
2026-02-19 17:28:13 +00:00
"rich>=14.0.0,<15.0.0",
"markdown-it-py>=3.0.0,<5.0.0",
2026-08-10 13:41:02 +08:00
"qrcode[pil]>=8.0",
"pillow>=13.0.0,<14.0.0",
2026-02-19 17:28:13 +00:00
"croniter>=6.0.0,<7.0.0",
"prompt-toolkit>=3.0.52,<4.0.0",
"setproctitle>=1.3.7,<2.0.0; sys_platform != 'win32'",
"questionary>=2.1.1,<3.0.0",
2026-02-19 17:28:13 +00:00
"mcp>=1.26.0,<2.0.0",
# 4.21 fixes recursive enum equality for booleans versus 0/1.
"jsonschema>=4.21.0,<5.0.0",
"referencing>=0.30.0,<1.0.0",
"regex>=2024.11.6",
2026-02-19 17:28:13 +00:00
"json-repair>=0.57.0,<1.0.0",
"chardet>=3.0.2,<6.0.0",
"openai>=2.8.0",
"tiktoken>=0.12.0,<1.0.0",
"jinja2>=3.1.0,<4.0.0",
"dulwich>=1.2.20,<2.0.0",
"rapidfuzz>=3.14.6,<4.0.0",
"pyyaml>=6.0,<7.0.0",
2026-04-08 11:35:32 +08:00
"filelock>=3.25.2",
"watchfiles>=1.1.1,<2.0.0",
"packaging>=24.0",
"tzdata>=2025.2",
"tzlocal>=5.3.1,<6.0.0",
2026-07-13 13:11:46 +08:00
"defusedxml>=0.7.1,<1.0.0",
"pypdf>=6.21.3,<7.0.0",
2026-07-13 13:11:46 +08:00
"python-docx>=1.1.0,<2.0.0",
"openpyxl>=3.1.0,<4.0.0",
"python-pptx>=1.0.0,<2.0.0",
]
[project.optional-dependencies]
# Keep this empty extra so older updaters can preserve recorded installations.
api = []
2026-05-31 15:08:01 +00:00
azure = [
"azure-identity>=1.19.0,<2.0.0",
]
bedrock = [
"boto3>=1.43.0",
"botocore>=1.43.0,<2.0.0",
]
documents = [
2026-07-13 13:11:46 +08:00
# Compatibility extra: document readers are bundled since v0.2.3.
"defusedxml>=0.7.1,<1.0.0",
"pypdf>=6.21.3,<7.0.0",
"python-docx>=1.1.0,<2.0.0",
"openpyxl>=3.1.0,<4.0.0",
"python-pptx>=1.0.0,<2.0.0",
]
2026-07-13 13:11:46 +08:00
langfuse = [
"langfuse>=4.7.0,<5.0.0",
2026-07-13 13:11:46 +08:00
]
2026-04-10 15:44:50 +00:00
pdf = [
2026-07-13 13:11:46 +08:00
# Compatibility extra: PDF reading is bundled since v0.2.3.
"pypdf>=6.21.3,<7.0.0",
2026-04-10 15:44:50 +00:00
]
2026-04-28 18:30:30 +08:00
olostep = [
2026-07-28 22:55:59 +08:00
"olostep>=0.1.0; python_version < '3.14'",
2026-04-28 18:30:30 +08:00
]
2026-02-01 07:36:42 +00:00
dev = [
"hatchling",
2026-02-19 17:28:13 +00:00
"pytest>=9.0.0,<10.0.0",
"pytest-asyncio>=1.3.0,<2.0.0",
"aiohttp>=3.9.0,<4.0.0",
"pytest-cov>=6.0.0,<7.0.0",
# Empty subprocess data crashes combine: https://github.com/coveragepy/coveragepy/issues/2356
"coverage!=7.17.1",
2026-07-28 22:55:59 +08:00
"pytest-xdist>=3.8.0,<4.0.0",
"virtualenv>=20.35.4,<21.0.0",
2026-02-01 07:36:42 +00:00
"ruff>=0.1.0",
"basedpyright>=1.39.0,<2.0.0",
"types-jsonschema>=4.20.0,<5.0.0",
"types-regex>=2024.11.6",
"setproctitle>=1.3.7,<2.0.0",
"pymupdf>=1.25.0",
"pypdf>=6.21.3,<7.0.0",
"python-docx>=1.1.0,<2.0.0",
"openpyxl>=3.1.0,<4.0.0",
"python-pptx>=1.0.0,<2.0.0",
"python-socketio>=5.16.0,<6.0.0",
"msgpack>=1.1.0,<2.0.0",
2026-02-01 07:36:42 +00:00
]
[project.scripts]
2026-08-18 16:03:15 +08:00
nanobot = "nanobot.cli.entry:main"
nanobot-desktop-tui = "nanobot.cli.desktop_tui:main"
2026-02-01 07:36:42 +00:00
[build-system]
requires = ["hatchling", "filelock>=3.25.2"]
2026-02-01 07:36:42 +00:00
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
2026-02-01 07:36:42 +00:00
[tool.hatch.build.hooks.custom]
2026-02-01 07:36:42 +00:00
[tool.hatch.build]
include = [
"nanobot/**/*.py",
"nanobot/cli/assets/*.png",
"nanobot/update_contract.json",
"nanobot/webui/mcp_presets.json",
"nanobot/templates/**/*.md",
2026-02-01 07:36:42 +00:00
"nanobot/skills/**/*.md",
"nanobot/skills/**/*.sh",
"nanobot/channels/*/webui/**/*",
"nanobot/web/dist/**/*",
]
# nanobot/web/dist/ is produced by `cd webui && bun run build` and is
# git-ignored. List it as an artifact so hatch ships it in both wheel and
# sdist even though VCS does not track it.
artifacts = [
"nanobot/web/dist/**/*",
]
2026-02-01 07:36:42 +00:00
[tool.hatch.build.targets.wheel]
packages = ["nanobot"]
exclude = ["nanobot/channels/*/tests/**"]
[tool.hatch.build.targets.wheel.sources]
"nanobot" = "nanobot"
2026-02-01 07:36:42 +00:00
[tool.hatch.build.targets.sdist]
include = [
"docs/**/*.md",
2026-02-01 07:36:42 +00:00
"nanobot/",
"nanobot/web/dist/",
"hatch_build.py",
2026-02-01 07:36:42 +00:00
"README.md",
"LICENSE",
"THIRD_PARTY_NOTICES.md",
"pyproject.toml",
2026-02-01 07:36:42 +00:00
]
exclude = ["nanobot/channels/*/tests/**", "docs/plans/**", "docs/superpowers/**"]
2026-02-01 07:36:42 +00:00
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W"]
ignore = ["E501"]
[tool.basedpyright]
include = ["nanobot"]
exclude = ["**/tests"]
typeCheckingMode = "strict"
pythonVersion = "3.11"
2026-02-01 07:36:42 +00:00
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests", "nanobot/channels"]
[tool.coverage.run]
source = ["nanobot"]
omit = ["tests/*", "**/tests/*"]
[tool.coverage.report]
2026-06-26 11:28:49 +08:00
fail_under = 75
# Discovery of unexecuted source files also includes colocated channel tests.
# Match run.omit so the application gate never counts test bodies as product code.
omit = ["tests/*", "**/tests/*"]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]