gabriel / muse public
pyproject.toml
128 lines 3.6 KB
9d49af7a feat: semantic TOML and Markdown adapters for the code domain plugin Gabriel Cardona <gabriel@tellurstori.com> 1d ago
1 [project]
2 name = "muse"
3 version = "0.1.5"
4 description = "Muse — domain-agnostic version control for multidimensional state"
5 readme = "README.md"
6 license = {text = "MIT"}
7 requires-python = ">=3.14"
8 dependencies = [
9 "typer>=0.24.0",
10 "mido>=1.3.3",
11 "defusedxml>=0.7.1",
12 # tree-sitter: professional AST parsing for the code domain plugin.
13 # Used by GitHub Copilot, VS Code, Neovim, and Zed — the industry standard.
14 "tree-sitter>=0.25.0",
15 "tree-sitter-javascript>=0.25.0",
16 "tree-sitter-typescript>=0.23.2",
17 "tree-sitter-java>=0.23.5",
18 "tree-sitter-go>=0.25.0",
19 "tree-sitter-rust>=0.24.0",
20 "tree-sitter-c>=0.24.1",
21 "tree-sitter-cpp>=0.23.4",
22 "tree-sitter-c-sharp>=0.23.1",
23 "tree-sitter-ruby>=0.23.1",
24 "tree-sitter-kotlin>=1.1.0",
25 # Prose and web language grammars.
26 "tree-sitter-markdown>=0.5.1",
27 "tree-sitter-html>=0.23.2",
28 "tree-sitter-css>=0.25.0",
29 # Swift: py-tree-sitter-swift must be built from source; omitted here to
30 # avoid breaking CI on machines without Xcode CLT. Install manually with:
31 # pip install py-tree-sitter-swift
32 # The adapter degrades gracefully to file-level tracking without it.
33 ]
34
35 [project.scripts]
36 muse = "muse.cli.app:main"
37
38 [project.optional-dependencies]
39 dev = [
40 "pytest>=9.0.2",
41 "pytest-asyncio>=1.3.0",
42 "pytest-cov>=7.0.0",
43 "anyio>=4.12.0",
44 "mypy>=1.19.1",
45 "hypothesis>=6.100.0",
46 "types-defusedxml>=0.7.0.20240218",
47 ]
48
49 [build-system]
50 requires = ["hatchling>=1.29.0"]
51 build-backend = "hatchling.build"
52
53 [tool.pytest.ini_options]
54 asyncio_mode = "auto"
55 testpaths = ["tests"]
56 cache_dir = "/tmp/pytest_cache"
57 addopts = "-v --tb=short"
58
59 [tool.coverage.run]
60 source = ["muse"]
61 omit = [
62 # Hub/remote authentication — future feature, requires network fixtures
63 "muse/cli/config.py",
64 # MIDI binary parser — requires MIDI fixture files to test meaningfully
65 "muse/cli/midi_parser.py",
66 # Backward-compat re-export shim — trivially thin wrapper
67 "muse/cli/models.py",
68 ]
69
70 [tool.coverage.report]
71 exclude_lines = [
72 "pragma: no cover",
73 "if TYPE_CHECKING:",
74 "raise NotImplementedError",
75 ]
76
77 [tool.mypy]
78 python_version = "3.14"
79 strict = true
80 explicit_package_bases = true
81 namespace_packages = true
82 warn_unreachable = true
83 show_error_codes = true
84 # Exclude deferred files not yet ported to the strict typed surface.
85 exclude = [
86 "muse/plugins/music/services/",
87 "muse/cli/commands/emotion_diff\\.py",
88 "muse/cli/commands/groove_check\\.py",
89 ]
90
91 [[tool.mypy.overrides]]
92 module = ["tests.*"]
93 disallow_untyped_decorators = false
94 disallow_untyped_defs = false
95 disallow_incomplete_defs = false
96
97 [[tool.mypy.overrides]]
98 module = ["mido"]
99 ignore_missing_imports = true
100
101 [[tool.mypy.overrides]]
102 # tree-sitter and its grammar packages ship compiled C extensions. The core
103 # package (tree_sitter) provides py.typed stubs when run via `python -m mypy`
104 # from the project venv, but a globally-installed mypy cannot resolve them.
105 # Grammar packages never ship stubs. Marking all of them ignore_missing_imports
106 # keeps both invocation styles green; the venv mypy still validates our usage
107 # against the stubs when they are findable (CI).
108 module = [
109 "tree_sitter",
110 "tree_sitter_javascript",
111 "tree_sitter_typescript",
112 "tree_sitter_java",
113 "tree_sitter_go",
114 "tree_sitter_rust",
115 "tree_sitter_c",
116 "tree_sitter_cpp",
117 "tree_sitter_c_sharp",
118 "tree_sitter_ruby",
119 "tree_sitter_kotlin",
120 "tree_sitter_markdown",
121 "tree_sitter_html",
122 "tree_sitter_css",
123 "py_tree_sitter_swift",
124 ]
125 ignore_missing_imports = true
126
127 [tool.hatch.build.targets.wheel]
128 packages = ["muse"]