[build-system] build-backend = "hatchling.build" requires = ["hatchling"] [project] dependencies = [] description = "精细化状态控制的 Python 管道任务控制工具" name = "chongming-task" readme = "README.md" requires-python = ">=3.11" version = "0.1.0" classifiers = [ "Development Status :: 3 - Alpha", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", ] [project.scripts] chongming-task = "chongming_task.cli.main:main" [project.optional-dependencies] postgres = [ "psycopg-pool>=3.2", "psycopg[binary]>=3.2", ] # 核心包运行时零第三方依赖(CLI 也只用标准库 argparse)。 # 观测后端等适配器在各自阶段追加为 [project.optional-dependencies]。 [dependency-groups] dev = [ "pytest>=8.0", "hypothesis>=6.100", "ruff>=0.6", "mypy>=1.11", "psycopg[binary]>=3.2", "psycopg-pool>=3.2", ] [tool.hatch.build.targets.wheel] packages = ["src/chongming_task"] # --------------------------------------------------------------------------- # 工具链 # --------------------------------------------------------------------------- [tool.ruff] line-length = 100 target-version = "py311" src = ["src", "tests"] # pytest 的临时目录默认落在项目根下,测试往里写的临时 .py 文件不该被 lint 扫到 # (其中不乏**故意写坏**的样本,例如"导入一个不存在的依赖")。 extend-exclude = ["pytest-of-*"] [tool.ruff.lint] select = ["E", "F", "I", "UP", "B", "SIM", "RUF", "C4", "PTH"] ignore = [ "RUF001", # 允许注释/字符串中的中文全角标点 "RUF002", "RUF003", ] [tool.ruff.lint.per-file-ignores] "tests/**" = ["B011"] [tool.ruff.lint.isort] known-first-party = ["chongming_task"] # 内核必须保持可被状态机属性测试穷举验证的纯粹性,故 src 全量 strict。 [tool.mypy] python_version = "3.11" strict = true warn_unreachable = true warn_redundant_casts = true show_error_codes = true files = ["src"] [[tool.mypy.overrides]] module = "tests.*" disallow_untyped_defs = false disallow_incomplete_defs = false [tool.pytest.ini_options] testpaths = ["tests"] addopts = "-ra --strict-markers --strict-config" markers = [ "slow: 耗时较长的集成测试", "windows_only: 仅在 Windows 上有意义的用例", "posix_only: 仅在 POSIX 上有意义的用例", ] filterwarnings = ["error"]