-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
162 lines (144 loc) · 4.6 KB
/
pyproject.toml
File metadata and controls
162 lines (144 loc) · 4.6 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[project]
name = "vajax"
dynamic = ["version"]
description = "JAX-based analog circuit simulator with Verilog-A support"
authors = [{name = "ChipFlow"}]
requires-python = ">=3.11"
license = "Apache-2.0"
dependencies = [
"jax>=0.9.0",
"jaxtyping>=0.2.0",
"numpy>=1.24.0",
"scipy>=1.11.0",
"matplotlib>=3.7.0",
"openvaf-py",
"simpleeval>=1.0.0",
"jaxlib>=0.9.0",
"va-builder",
]
[project.urls]
Homepage = "https://github.com/ChipFlow/vajax"
Documentation = "https://chipflow.github.io/vajax/"
Repository = "https://github.com/ChipFlow/vajax"
Issues = "https://github.com/ChipFlow/vajax/issues"
Changelog = "https://github.com/ChipFlow/vajax/releases"
[tool.uv.workspace]
members = ["openvaf_jax/openvaf_py", "openvaf_jax/osdi_py", "vajax/sparse", "va-builder"]
[tool.uv.sources]
openvaf-py = { workspace = true }
osdi-py = { workspace = true }
umfpack-jax = { workspace = true }
va-builder = { workspace = true }
[project.optional-dependencies]
cuda12 = [
# JAX 0.9+ uses jax-cuda12-plugin for CUDA support
"jax-cuda12-plugin>=0.9.0; sys_platform != 'darwin'",
# Spineax: cuDSS sparse solver with cached symbolic factorization
# Note: Only works on Linux with CUDA
"spineax-vajax>=0.0.2",
]
# UMFPACK solver for CPU sparse solving (requires libsuitesparse-dev + swig)
# Falls back to klujax if not available
umfpack = [
"scikit-umfpack>=0.4.2",
]
# UMFPACK FFI extension - zero callback overhead (requires libsuitesparse-dev)
umfpack-ffi = [
"umfpack-jax",
]
sax = [
"sax>=0.13.0",
]
docs = [
"mkdocs>=1.6,<2",
"mkdocs-material>=9.5",
]
# Test dependencies - minimal set for running tests
test = [
"pytest>=7.4.0",
"pytest-cov",
"beartype>=0.18.0", # Runtime type checking with jaxtyping
"osdi-py", # For OSDI vs JAX comparison tests
]
# Full dev dependencies - includes test + linting + CPU sparse solver
# Note: umfpack-jax (FFI extension) requires separate build step - use --extra umfpack-ffi after building
dev = [
"pytest>=7.4.0",
"pytest-cov",
"beartype>=0.18.0",
"ruff",
"pyright",
"osdi-py", # For OSDI vs JAX comparison tests
]
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "vajax/_version.py"
[dependency-groups]
dev = [
"radon>=6.0.1",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["vajax", "openvaf_jax"]
exclude = ["openvaf_jax/openvaf_py/target", "openvaf_jax/osdi_py/target"]
artifacts = ["vajax/devices/models/**"]
[tool.hatch.build.targets.sdist]
include = [
"vajax/**/*.py",
"vajax/devices/models/**",
"vajax/benchmarks/data/*",
"openvaf_jax/**/*.py",
]
[project.scripts]
vajax = "vajax.cli:main"
vajax-benchmark = "vajax.benchmarks.c6288:main"
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W"]
# Ignore variable naming rules for uppercase matrix/vector names (common in numerical code)
# N803: argument name should be lowercase (V_history, V_pred, etc.)
# N806: variable in function should be lowercase (V_pred, Q_prev, etc.)
# N815: variable in class scope should not be mixedCase (dQdt_prev)
# N802: function name should be lowercase (NR_solve, etc.)
# N816: variable in global scope should not be mixedCase
# E501: Line too long
# E402: Module level import not at top of file (intentional for lazy loading)
# E741: Ambiguous variable name (l, I, O) - common in circuit simulation (I=current, l=length)
# E721: Type comparison using == instead of isinstance (used intentionally with JAX arrays)
# F403/F405: Star imports (used in __init__.py for public API)
ignore = ["N803", "N806", "N815", "N802", "N816", "E501", "E402", "E741", "E721", "F403", "F405"]
[tool.ruff.lint.per-file-ignores]
# Allow star imports in __init__.py files
"__init__.py" = ["F401"]
# Auto-generated by hatch-vcs, don't lint
"vajax/_version.py" = ["I001"]
[tool.pyright]
pythonVersion = "3.11"
typeCheckingMode = "basic"
exclude = ["**/vendor/**", "openvaf_jax/openvaf_py/**"]
reportMissingImports = "warning"
reportAttributeAccessIssue = "warning"
reportArgumentType = "warning"
reportReturnType = "warning"
reportOptionalMemberAccess = "warning"
reportOptionalCall = "warning"
reportInvalidTypeForm = "warning"
reportOperatorIssue = "warning"
reportOptionalOperand = "warning"
[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = [
"ignore::DeprecationWarning",
]
markers = [
"public_api: tests public interface",
"internal: tests implementation details",
"experimental: tests unfinished features",
]