Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
119 lines (107 loc) · 3.88 KB
/
Copy pathpyproject.toml
File metadata and controls
119 lines (107 loc) · 3.88 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
107
108
109
110
111
112
113
114
115
116
117
118
119
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "arke"
version = "0.1.0"
description = "AI-First Operator Description Language & Compiler Toolchain"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10"
authors = [
{name = "Arke Contributors"},
]
keywords = ["ai", "compiler", "dsl", "ir", "operator", "optimization", "gpu"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Compilers",
]
dependencies = [
"numpy>=1.24",
"jinja2>=3.1",
"httpx>=0.24",
"lark>=1.1",
"click>=8.0",
"rich>=13.0",
]
[project.optional-dependencies]
gpu = [
"torch>=2.0",
"triton>=2.0",
]
mlir-gpu = [
# Phase 3 P3-S1 GPU path: launch MLIR-generated PTX via the CUDA driver
# API. The Ubuntu mlir-18-tools build has NVPTX (emits PTX) but ships no
# libmlir_cuda_runtime, so we JIT-load the PTX with cuda-python instead.
"cuda-python>=12.0",
]
agent = [
# Live-LLM optimization driver (arke.agent.runner.LLMRunner). Both SDKs
# are supported transports; the OpenAI-protocol client also drives the
# yunwu.ai /v1 relay (the clean endpoint — see llm_config.py).
"anthropic>=0.40",
"openai>=1.40",
]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"pytest-xdist>=3.0", # --dist loadfile for FlagGems per-file isolation (C5)
"ruff>=0.4",
"mypy>=1.0",
"jsonschema>=4.20",
"numpy>=1.24",
]
# [project.scripts]
[project.urls]
Repository = "https://github.com/arke-lang/arke"
Documentation = "https://github.com/arke-lang/arke/tree/main/docs"
[tool.setuptools.packages.find]
where = ["."]
include = ["arke*", "arkec*", "benchmarks*"]
[project.scripts]
arke = "arke.cli:main"
[tool.ruff]
target-version = "py310"
line-length = 100
extend-exclude = ["benchmarks/results"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP"]
ignore = [
"N803", # argument name should be lowercase — we use A, B, X for tensors (math convention)
"N806", # variable in function should be lowercase — same reason
"N812", # lowercase imported as non-lowercase
"E741", # ambiguous variable name (l, O, I) — we use these in math context
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["E501"] # Allow longer lines in tests for readability
"arke/agent/prompts.py" = ["E501"] # System prompt strings are naturally long
"arke/agent/tools_schema.py" = ["E501"] # JSON schema descriptions are naturally long
"arke/parser/parser.py" = ["N802"] # Lark transformer methods must match UPPERCASE terminal names
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"cuda: tests that require CUDA availability",
]
# NOTE: The canonical full-suite command is:
# pytest tests/ --dist loadfile -n 4
# The `--dist loadfile` flag (pytest-xdist) runs each test FILE in its own
# worker process. This is REQUIRED to get a clean full-suite run: the FlagGems
# baseline (benchmarks/baselines/flaggems.py) permanently hijacks the torch
# `aten` dispatch table at import time via flag_gems.enable(), which cannot be
# reversed in-process (see docs/phase4/audit-2026-07-13.md C5). Per-file worker
# isolation confines that hijack to the workers that actually import FlagGems.
# Without it, ~50 triton-codegen/probe tests fail from cross-file pollution.
# We deliberately do NOT put `-n` in addopts so single-test debugging and IDE
# runs stay in-process; use the Makefile `test` target for the full green run.
[tool.mypy]
python_version = "3.10"
warn_return_any = false
warn_unused_configs = true
disallow_untyped_defs = false