Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
108 lines (97 loc) · 3.34 KB
/
Copy pathpyproject.toml
File metadata and controls
108 lines (97 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "stata-code"
version = "0.18.0"
description = "Agent-native Stata bridge — one core, multiple frontends (MCP, Jupyter, VSCode)"
# The repo default README (README.md) is Chinese; keep the PyPI long description
# English by pointing at README.en.md.
readme = "README.en.md"
license = "MIT"
requires-python = ">=3.10"
authors = [
{ name = "Bryce Wang", email = "brycewang@stanford.edu" }
]
keywords = ["stata", "jupyter", "vscode", "mcp", "pystata", "causal-inference"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"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 :: Mathematics",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"pydantic>=2.0",
# `pystata` ships with Stata 17+ at /Applications/Stata/utilities/pystata
# (macOS) or equivalent — it is NOT on PyPI. Our `_runtime` module locates
# and adds it to sys.path on init, so we deliberately do not declare it
# as a runtime dependency. Users without Stata 17+ will get a clear
# `PystataNotAvailable` error.
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=4.0",
"ruff>=0.4.0",
"mypy>=1.8",
]
# Upper-bounded deliberately. mcp 2.0 is a breaking rewrite: `Server` dropped
# the `list_tools` / `call_tool` decorators this server registers through, and
# `Tool` / `ToolAnnotations` renamed every camelCase field (`inputSchema` →
# `input_schema`, `readOnlyHint` → `read_only_hint`, ...). Without the ceiling,
# a fresh `pip install "stata-code[mcp]"` resolves mcp 2.x and the server fails
# at import. Lift this only together with the 2.x port.
mcp = ["mcp>=1.27,<2"]
kernel = ["ipykernel>=6.0"]
all = ["stata-code[mcp,kernel]"]
[project.scripts]
stata-code = "stata_code.cli:run_main"
stata-code-kernel = "stata_code.kernel.kernel:run_main"
stata-code-mcp = "stata_code.mcp.server:run_main"
[project.urls]
Homepage = "https://github.com/brycewang-stanford/stata-code"
Repository = "https://github.com/brycewang-stanford/stata-code"
Issues = "https://github.com/brycewang-stanford/stata-code/issues"
Changelog = "https://github.com/brycewang-stanford/stata-code/blob/main/CHANGELOG.md"
[tool.hatch.build.targets.wheel]
packages = ["stata_code"]
[tool.hatch.build.targets.sdist]
include = [
"/stata_code",
"/tests",
"/schema",
"/scripts",
"/examples",
"/docs",
"/README.md",
"/README.en.md",
"/CHANGELOG.md",
"/LICENSE",
"/LICENSE-POLICY.md",
"/PUBLISHING.md",
"/SCHEMA.md",
"/pyproject.toml",
]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP"]
ignore = ["E501"]
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_defs = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
markers = [
"stata_required: test exercises a real Stata installation via pystata. Skipped automatically when pystata is not available; CI can also exclude with `pytest -m 'not stata_required'`.",
]