-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
106 lines (94 loc) · 3.85 KB
/
pyproject.toml
File metadata and controls
106 lines (94 loc) · 3.85 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
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "m-cli"
version = "0.1.0"
description = "The M (MUMPS) source-level toolchain — `m fmt`, `m lint`, `m test`. Tier 1 of the M ecosystem gap-remediation plan."
readme = "README.md"
requires-python = ">=3.12"
authors = [{ name = "Rafael Richards" }]
license = { text = "AGPL-3.0" }
keywords = ["mumps", "m", "yottadb", "formatter", "linter", "tree-sitter"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Compilers",
"Topic :: Text Processing :: Linguistic",
]
dependencies = [
"tree-sitter~=0.24",
"tree-sitter-m",
]
[project.scripts]
m = "m_cli.cli:main"
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov",
"pytest-watch",
"pytest-randomly",
"ruff",
"mypy",
"pre-commit",
"pygls~=2.1",
]
lsp = [
"pygls~=2.1",
]
[tool.uv]
# Restrict the universal lock to the four platforms tree-sitter-m
# publishes wheels for. Without this, uv tries to resolve
# tree-sitter-m for every PEP-508 platform combination in the
# universe (Linux i686/ppc64le/s390x, Intel macOS, ARM Windows,
# FreeBSD, etc.) and fails because we have no URL for those.
environments = [
"sys_platform == 'linux' and platform_machine == 'x86_64'",
"sys_platform == 'linux' and platform_machine == 'aarch64'",
"sys_platform == 'darwin' and platform_machine == 'arm64'",
"sys_platform == 'win32' and platform_machine == 'AMD64'",
]
[tool.uv.sources]
# Track C2 of the m-dev-tools self-containment sprint: pin to the
# wheel attached to tree-sitter-m's GitHub Release rather than a
# sibling local checkout. cibuildwheel produces one cp310-abi3 wheel
# per platform; markers route uv to the right one. Cuts the
# clone-and-install requirement for fresh installs of m-cli.
#
# To bump: change the version in the URLs (and pin) and run
# `uv lock`. The template is documented in tree-sitter-m's
# RELEASE.md §5.5.
# Each entry is a single-line inline table — TOML spec forbids
# newlines inside `{ ... }`, and stdlib tomllib (used by setuptools
# at editable-build time) rejects multi-line inline tables even
# though uv's lenient parser accepts them. Lines are long; that's
# the trade-off for staying spec-conformant.
tree-sitter-m = [
{ url = "https://github.com/m-dev-tools/tree-sitter-m/releases/download/v0.1.1/tree_sitter_m-0.1.1-cp310-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", marker = "sys_platform == 'linux' and platform_machine == 'x86_64'" },
{ url = "https://github.com/m-dev-tools/tree-sitter-m/releases/download/v0.1.1/tree_sitter_m-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", marker = "sys_platform == 'linux' and platform_machine == 'aarch64'" },
{ url = "https://github.com/m-dev-tools/tree-sitter-m/releases/download/v0.1.1/tree_sitter_m-0.1.1-cp310-abi3-macosx_11_0_arm64.whl", marker = "sys_platform == 'darwin' and platform_machine == 'arm64'" },
{ url = "https://github.com/m-dev-tools/tree-sitter-m/releases/download/v0.1.1/tree_sitter_m-0.1.1-cp310-abi3-win_amd64.whl", marker = "sys_platform == 'win32' and platform_machine == 'AMD64'" },
]
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --tb=short"
# Pin cache inside this repo so pytest never walks up to ~/m-dev-tools/
# and writes a shared .pytest_cache that parallel sessions in sibling
# repos would all stomp on. See .github/docs/dev-practices/
# parallel-multi-repo-git-hygiene.md.
cache_dir = ".pytest_cache"
[tool.coverage.run]
source = ["src"]
[tool.coverage.report]
fail_under = 70
show_missing = true
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "I"]
[tool.mypy]
python_version = "3.12"
strict = false
ignore_missing_imports = true