-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
94 lines (83 loc) · 3.7 KB
/
Copy pathpyproject.toml
File metadata and controls
94 lines (83 loc) · 3.7 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "c64-tools"
version = "1.0.0"
description = "AI-oriented toolset for developing and debugging Commodore 64 software on VICE"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
dependencies = ["click>=8.1", "numpy>=1.26", "pillow>=10", "pyyaml>=6", "mcp>=1.28"]
[project.optional-dependencies]
dev = ["pytest>=8", "coverage>=7.10", "ruff>=0.15"]
[project.scripts]
c64 = "c64lib.cli:main"
c64-tools-mcp = "c64lib.mcp_server:main"
[tool.hatch.build]
# cart.inc and the ROM label tables are data, not modules, and hatchling selects
# files through the VCS: `*.lbl` in .gitignore silently dropped basic2.lbl from
# the wheel. `artifacts` overrides that, so `cart_include_dir()` and
# `romdoc.rom_labels()` both resolve in an installed package. Declared for ALL
# targets, not just the wheel: an sdist that drops the data files builds a
# broken wheel downstream, which is the harder failure to trace.
artifacts = ["src/c64lib/data/**"]
[tool.hatch.build.targets.wheel]
packages = ["src/c64lib"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"vice: requires a working x64sc (VICE) installation on PATH",
"needs_c1541: requires VICE's c1541 utility (PATH or C64_TOOLS_C1541)",
]
[tool.coverage.run]
source = ["c64lib"]
branch = true
parallel = true
sigterm = true
patch = ["subprocess"]
[tool.coverage.report]
show_missing = true
fail_under = 90
[tool.pyright]
# venvPath/venv are load-bearing: pyright is a developer-local tool (brew/npm,
# not in `[dev]`), so without them it resolves imports against whatever
# interpreter is first on PATH and invents ~70 phantom missing-import errors,
# plus knock-on failures wherever those imports are used.
#
# `tests` is in `include` on purpose, at the same `standard` mode as `src`.
# The suite is not scaffolding: conftest.py and vice_helpers.py own the shared
# emulator and every timeout in the live tests, and test_mcp_scaffold.py is
# imported by eight other test modules — every other `test_mcp_*` file, plus
# test_integration_mcp.py. Dropping tests from `include`, or giving them a
# lower mode via `executionEnvironments`, would stop checking that code to
# silence findings that turned out to be tractable — of the 87 test findings
# this policy started from, 80 were resolved at their cause and 7 needed a
# per-site suppression.
#
# `skills` is in `include` for the same reason: a skill's `references/` may
# ship a runnable script — the first is 6502-assembly's fix-branch-range.py,
# which the skill tells an agent to pipe a failed build into, and which
# rewrites the agent's source files in place. That is code, and it was
# type-checked exactly once, by hand, before this line existed. Demo `tools/`
# scripts are deliberately NOT here: each is its own demo's artifact, tested
# by that demo, and pulling them in would gate this repo on their style.
#
# Suppressions are per-site `# pyright: ignore[<rule>]` with a comment saying
# why, never a bare `# type: ignore` and never a rule switched off here. If a
# whole file needs one, that is evidence the code wants changing instead.
venvPath = "."
venv = ".venv"
include = ["src", "tests", "skills"]
typeCheckingMode = "standard"
[tool.ruff]
line-length = 100
[tool.ruff.lint]
# PLW1514 (unspecified-encoding) is still a ruff preview rule, so preview must be
# on for it to fire at all. `explicit-preview-rules` keeps that from dragging in
# every other preview rule under the E/F/W/B/UP/I prefixes: only preview rules
# named by their exact code are enabled.
preview = true
explicit-preview-rules = true
select = ["E", "F", "W", "B", "UP", "I", "PLW1514"]
ignore = ["E702"] # `a(); b()` teardown pairs in tests are house idiom