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