kicad-mcp/pyproject.toml
Ryan Malloy 57872e59c1 Replace kicad-sch-api with internal SchDocument engine
Eliminate the external kicad-sch-api dependency by migrating all MCP
tools to the internal SchDocument class built on sexp_tree.py. This
fixes three serialization bugs (dropped global labels, TypeError on
local labels, mis-quoted property private keywords) and removes ~1,900
lines of workaround code.

New modules:
- sexp_tree.py: S-expression parser and round-trip serializer
- sch_document.py: schematic read/write/mutate API
- lib_resolver.py: symbol library search and resolution
- sch_helpers.py: shared load/validate/expand helpers

Migrated all 9 tool files, resources, and tests. Removed 5 workaround
functions from sexp_parser.py. 531 tests pass, ruff + mypy clean.
2026-07-11 16:47:22 -06:00

118 lines
2.6 KiB
TOML

[build-system]
requires = ["hatchling>=1.28.0"]
build-backend = "hatchling.build"
[project]
name = "mckicad"
version = "2026.03.03"
description = "MCP server for KiCad electronic design automation"
readme = "README.md"
license = { text = "MIT" }
authors = [{ name = "Ryan Malloy", email = "ryan@supported.systems" }]
keywords = ["kicad", "eda", "electronics", "pcb", "mcp", "model-context-protocol"]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Typing :: Typed",
]
requires-python = ">=3.12"
dependencies = [
"fastmcp>=3.1.0",
"pyyaml>=6.0.3",
"defusedxml>=0.7.1",
"kicad-python>=0.5.0",
"requests>=2.32.5",
]
[project.urls]
Homepage = "https://git.supported.systems/warehack.ing/mckicad"
[project.scripts]
mckicad = "mckicad.server:main"
[tool.hatch.build.targets.wheel]
packages = ["src/mckicad"]
[dependency-groups]
dev = [
"pytest>=8.4.2",
"pytest-asyncio>=1.3.0",
"pytest-mock>=3.15.1",
"pytest-cov>=7.0.0",
"ruff>=0.15.1",
"mypy>=1.19.1",
]
[tool.ruff]
target-version = "py312"
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "W", "F", "I", "B", "C4", "UP", "SIM"]
ignore = ["E501", "B008", "C901", "B905"]
unfixable = ["B"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S101", "D103", "SLF001"]
[tool.ruff.lint.isort]
known-first-party = ["mckicad"]
force-sort-within-sections = true
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
show_error_codes = true
[[tool.mypy.overrides]]
module = ["kipy.*", "requests.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
minversion = "7.0"
addopts = [
"--strict-markers",
"--strict-config",
"-ra",
"--tb=short",
]
testpaths = ["tests"]
pythonpath = ["."]
python_files = ["test_*.py"]
python_functions = ["test_*"]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Tests that take more than a few seconds",
"requires_kicad: Tests that require KiCad CLI to be installed",
]
asyncio_mode = "auto"
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.coverage.run]
source = ["mckicad"]
branch = true
omit = ["tests/*"]
[tool.coverage.report]
precision = 2
show_missing = true